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

# beginLine(withGlyphAt:)

Sets up layout parameters at the beginning of a line during typesetting.

```
func beginLine(withGlyphAt glyphIndex: Int)
```

## Parameters

`glyphIndex`

The index of the first glyph to be laid out in the line.

## Discussion

Concrete subclass implementations of [`layoutParagraph(at:)`](/documentation/AppKit/NSTypesetter/layoutParagraph(at:)) should invoke this method at the beginning of each 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)