<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTypesetter/layoutParagraph(at:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSTypesetter(im)layoutParagraphAtPoint:"
  },
  "title" : "layoutParagraph(at:)"
}
-->

# layoutParagraph(at:)

Lays out glyphs in the current glyph range until the next paragraph separator is reached.

```
func layoutParagraph(at lineFragmentOrigin: NSPointPointer) -> Int
```

## Parameters

`lineFragmentOrigin`

The upper-left corner of line fragment rectangle. On return, `lineFragmentOrigin` contains the next origin.

## Return Value

The next glyph index; usually the index right after the paragraph separator, but it can be inside the paragraph range if, for example, the end of the text container is reached before the paragraph separator.

## Discussion

Concrete subclasses must implement this method. A concrete implementation must invoke [`beginParagraph()`](/documentation/AppKit/NSTypesetter/beginParagraph()), [`beginLine(withGlyphAt:)`](/documentation/AppKit/NSTypesetter/beginLine(withGlyphAt:)), [`endLine(withGlyphRange:)`](/documentation/AppKit/NSTypesetter/endLine(withGlyphRange:)), and [`endParagraph()`](/documentation/AppKit/NSTypesetter/endParagraph()).

---

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)