---
title: "drawsOutsideLineFragment(forGlyphAt:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/nslayoutmanager/drawsoutsidelinefragment(forglyphat:)"
---

# drawsOutsideLineFragment(forGlyphAt:)

Indicates whether the glyph draws outside its line fragment rectangle.

## Declaration

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

## Parameters

- `glyphIndex`: Index of the glyph.

## Return Value

Return Value true if the glyph at glyphIndex exceeds the bounds of the line fragment where it’s laid out, false otherwise.

## Discussion

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:) and rectArray(forGlyphRange:withinSelectedGlyphRange:in:rectCount:) methods. They are, however, considered by boundingRect(forGlyphRange:in:).

## See Also

### Getting layout information

- [attachmentSize(forGlyphAt:)](uikit/nslayoutmanager/attachmentsize(forglyphat:).md)
- [extraLineFragmentRect](uikit/nslayoutmanager/extralinefragmentrect.md)
- [extraLineFragmentTextContainer](uikit/nslayoutmanager/extralinefragmenttextcontainer.md)
- [extraLineFragmentUsedRect](uikit/nslayoutmanager/extralinefragmentusedrect.md)
- [firstUnlaidCharacterIndex()](uikit/nslayoutmanager/firstunlaidcharacterindex().md)
- [firstUnlaidGlyphIndex()](uikit/nslayoutmanager/firstunlaidglyphindex().md)
- [getFirstUnlaidCharacterIndex(_:glyphIndex:)](uikit/nslayoutmanager/getfirstunlaidcharacterindex(_:glyphindex:).md)
- [lineFragmentRect(forGlyphAt:effectiveRange:)](uikit/nslayoutmanager/linefragmentrect(forglyphat:effectiverange:).md)
- [lineFragmentRect(forGlyphAt:effectiveRange:withoutAdditionalLayout:)](uikit/nslayoutmanager/linefragmentrect(forglyphat:effectiverange:withoutadditionallayout:).md)
- [lineFragmentUsedRect(forGlyphAt:effectiveRange:)](uikit/nslayoutmanager/linefragmentusedrect(forglyphat:effectiverange:).md)
- [lineFragmentUsedRect(forGlyphAt:effectiveRange:withoutAdditionalLayout:)](uikit/nslayoutmanager/linefragmentusedrect(forglyphat:effectiverange:withoutadditionallayout:).md)
- [location(forGlyphAt:)](uikit/nslayoutmanager/location(forglyphat:).md)
- [notShownAttribute(forGlyphAt:)](uikit/nslayoutmanager/notshownattribute(forglyphat:).md)
- [truncatedGlyphRange(inLineFragmentForGlyphAt:)](uikit/nslayoutmanager/truncatedglyphrange(inlinefragmentforglyphat:).md)
