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

# setDrawsOutsideLineFragment(_:forGlyphRange:)

Sets whether the specified glyphs exceed the bounds of the line fragment in which they are laid out.

## Declaration

```swift
func setDrawsOutsideLineFragment(_ flag: Bool, forGlyphRange glyphRange: NSRange)
```

## Parameters

- `flag`: doc://com.apple.documentation/documentation/Swift/true if the glyphs in glyphRange exceed the bounds of the line fragment in which they are laid out, doc://com.apple.documentation/documentation/Swift/false otherwise.
- `glyphRange`: The range of the glyphs in question.

## Discussion

Discussion This can happen when text is set at a fixed line height. For example, if the user specifies a fixed line height of 12 points and sets the font size to 24 points, the glyphs will exceed their layout rectangles. 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)
- [setAttachmentSize(_:forGlyphRange:)](appkit/nstypesetter/setattachmentsize(_:forglyphrange:).md)
- [setBidiLevels(_:forGlyphRange:)](appkit/nstypesetter/setbidilevels(_: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)
