<!--
{
  "availability" : [
    "macOS: 10.11.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSLayoutManagerDelegate/layoutManager(_:lineSpacingAfterGlyphAt:withProposedLineFragmentRect:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSLayoutManagerDelegate(im)layoutManager:lineSpacingAfterGlyphAtIndex:withProposedLineFragmentRect:"
  },
  "title" : "layoutManager(_:lineSpacingAfterGlyphAt:withProposedLineFragmentRect:)"
}
-->

# layoutManager(_:lineSpacingAfterGlyphAt:withProposedLineFragmentRect:)

Returns the amount of space to add to the end of a line.

```
optional func layoutManager(_ layoutManager: NSLayoutManager, lineSpacingAfterGlyphAt glyphIndex: Int, withProposedLineFragmentRect rect: NSRect) -> CGFloat
```

## Parameters

`layoutManager`

The layout manager doing the layout.

`glyphIndex`

The index of the glyph at the end of the line.

`rect`

The proposed line fragment rectangle for the current line.

## Return Value

The line spacing after the current line.

## Discussion

This message is sent while each line is laid out to enable the layout manager delegate to customize the shape of line.

---

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)