<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTypesetter/setDrawsOutsideLineFragment(_:forGlyphRange:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSTypesetter(im)setDrawsOutsideLineFragment:forGlyphRange:"
  },
  "title" : "setDrawsOutsideLineFragment(_:forGlyphRange:)"
}
-->

# setDrawsOutsideLineFragment(_:forGlyphRange:)

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

```
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

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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)