---
title: "lineSpacing(afterGlyphAt:withProposedLineFragmentRect:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nstypesetter/linespacing(afterglyphat:withproposedlinefragmentrect:)"
---

# lineSpacing(afterGlyphAt:withProposedLineFragmentRect:)

Returns the line spacing in effect following the specified glyph.

## Declaration

```swift
func lineSpacing(afterGlyphAt glyphIndex: Int, withProposedLineFragmentRect rect: NSRect) -> CGFloat
```

## Parameters

- `glyphIndex`: The index of the glyph in question.
- `rect`: The proposed line fragment rectangle.

## Return Value

Return Value The line spacing in effect following the glyph at glyphIndex.

## Discussion

Discussion The NSATSTypesetter calls this method to determine the number of points of space to include below the descenders in the used rectangle for the proposed line fragment rectangle rect. Line spacing, also called leading, is an attribute of NSParagraphStyle, which you can set on an NSMutableParagraphStyle object. A font typically includes a default minimum line spacing metric used if none is set in the paragraph style. If the typesetter behavior specified in the layout manager is NSTypesetterOriginalBehavior, the text system uses the original, private typesetter NSSimpleHorizontalTypesetter, which adds the line spacing above the ascender. Similarly, NSATSTypesetter adds the line spacing above the ascender if the value is negative.

## See Also

### Getting spacing information

- [paragraphSpacing(afterGlyphAt:withProposedLineFragmentRect:)](appkit/nstypesetter/paragraphspacing(afterglyphat:withproposedlinefragmentrect:).md)
- [paragraphSpacing(beforeGlyphAt:withProposedLineFragmentRect:)](appkit/nstypesetter/paragraphspacing(beforeglyphat:withproposedlinefragmentrect:).md)
