<!--
{
  "availability" : [
    "macOS: 10.7.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSLayoutManager/drawsOutsideLineFragment(forGlyphAt:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSLayoutManager(im)drawsOutsideLineFragmentForGlyphAtIndex:"
  },
  "title" : "drawsOutsideLineFragment(forGlyphAt:)"
}
-->

# drawsOutsideLineFragment(forGlyphAt:)

Indicates whether the glyph draws outside its line fragment rectangle.

```
func drawsOutsideLineFragment(forGlyphAt glyphIndex: Int) -> Bool
```

## Parameters

`glyphIndex`

Index of the glyph.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if the glyph at `glyphIndex` exceeds the bounds of the line fragment where it’s laid out, <doc://com.apple.documentation/documentation/Swift/false> otherwise.

## Discussion

Exceeding bounds 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.

This method causes glyph generation and layout for the line fragment containing the specified glyph, or if noncontiguous layout is not enabled, up to and including that line fragment.

Glyphs that draw outside their line fragment rectangles aren’t considered when calculating enclosing rectangles with the [`rectArray(forCharacterRange:withinSelectedCharacterRange:in:rectCount:)`](/documentation/AppKit/NSLayoutManager/rectArray(forCharacterRange:withinSelectedCharacterRange:in:rectCount:)) and [`rectArray(forGlyphRange:withinSelectedGlyphRange:in:rectCount:)`](/documentation/AppKit/NSLayoutManager/rectArray(forGlyphRange:withinSelectedGlyphRange:in:rectCount:)) methods. They are, however, considered by [`boundingRect(forGlyphRange:in:)`](/documentation/AppKit/NSLayoutManager/boundingRect(forGlyphRange:in:)).

---

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)