---
title: "setAttachmentSize(_:forGlyphRange:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nstypesetter/setattachmentsize(_:forglyphrange:)"
---

# setAttachmentSize(_:forGlyphRange:)

Sets the size the specified glyphs (assumed to be attachments) will be asked to draw themselves at.

## Declaration

```swift
func setAttachmentSize(_ attachmentSize: NSSize, forGlyphRange glyphRange: NSRange)
```

## Parameters

- `attachmentSize`: The size the glyphs in glyphRange (assumed to be attachments) will be asked to draw themselves at.
- `glyphRange`: The range of glyphs the attachment size applies to.

## Discussion

Discussion A subclass can override this method to interact with custom glyph storage.

## See Also

### Interfacing with Glyph Storage

- [characterRange(forGlyphRange:actualGlyphRange:)](appkit/nstypesetter/characterrange(forglyphrange:actualglyphrange:).md)
- [glyphRange(forCharacterRange:actualCharacterRange:)](appkit/nstypesetter/glyphrange(forcharacterrange:actualcharacterrange:).md)
- [setBidiLevels(_:forGlyphRange:)](appkit/nstypesetter/setbidilevels(_:forglyphrange:).md)
- [setDrawsOutsideLineFragment(_:forGlyphRange:)](appkit/nstypesetter/setdrawsoutsidelinefragment(_:forglyphrange:).md)
- [setLineFragmentRect(_:forGlyphRange:usedRect:baselineOffset:)](appkit/nstypesetter/setlinefragmentrect(_:forglyphrange:usedrect:baselineoffset:).md)
- [setLocation(_:withAdvancements:forStartOfGlyphRange:)](appkit/nstypesetter/setlocation(_:withadvancements:forstartofglyphrange:).md)
- [setNotShownAttribute(_:forGlyphRange:)](appkit/nstypesetter/setnotshownattribute(_:forglyphrange:).md)
