---
title: "setDrawsOutsideLineFragment(_:forGlyphAt:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/nslayoutmanager/setdrawsoutsidelinefragment(_:forglyphat:)"
---

# setDrawsOutsideLineFragment(_:forGlyphAt:)

Indicates whether the specified glyph exceeds the bounds of the line fragment for its layout.

## Declaration

```swift
func setDrawsOutsideLineFragment(_ flag: Bool, forGlyphAt glyphIndex: Int)
```

## Parameters

- `flag`: If doc://com.apple.documentation/documentation/Swift/true, sets the given glyph to draw outside its line fragment; if doc://com.apple.documentation/documentation/Swift/false, the glyph does not draw outside.
- `glyphIndex`: Index of the glyph to set.

## 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. This information is important for determining whether additional lines need to be redrawn as a result of changes to any given line fragment. This method is used by the layout mechanism and should be invoked only during typesetting, in almost all cases only by the typesetter. For example, a custom typesetter might invoke it.

## See Also

### Related Documentation

- [drawsOutsideLineFragment(forGlyphAt:)](uikit/nslayoutmanager/drawsoutsidelinefragment(forglyphat:).md)

### Setting layout information

- [setAttachmentSize(_:forGlyphRange:)](uikit/nslayoutmanager/setattachmentsize(_:forglyphrange:).md)
- [setExtraLineFragmentRect(_:usedRect:textContainer:)](uikit/nslayoutmanager/setextralinefragmentrect(_:usedrect:textcontainer:).md)
- [setLineFragmentRect(_:forGlyphRange:usedRect:)](uikit/nslayoutmanager/setlinefragmentrect(_:forglyphrange:usedrect:).md)
- [setLocation(_:forStartOfGlyphRange:)](uikit/nslayoutmanager/setlocation(_:forstartofglyphrange:).md)
- [setNotShownAttribute(_:forGlyphAt:)](uikit/nslayoutmanager/setnotshownattribute(_:forglyphat:).md)
