<!--
{
  "availability" : [
    "macOS: 10.7.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSLayoutManager/getFirstUnlaidCharacterIndex(_:glyphIndex:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSLayoutManager(im)getFirstUnlaidCharacterIndex:glyphIndex:"
  },
  "title" : "getFirstUnlaidCharacterIndex(_:glyphIndex:)"
}
-->

# getFirstUnlaidCharacterIndex(_:glyphIndex:)

Returns the indexes for the first character and glyph that have invalid layout information.

```
func getFirstUnlaidCharacterIndex(_ charIndex: UnsafeMutablePointer<Int>?, glyphIndex: UnsafeMutablePointer<Int>?)
```

## Parameters

`charIndex`

On return, if not `NULL`, the index of the first character that has invalid layout information

`glyphIndex`

On return, if not `NULL`, the index of the first glyph that has invalid layout information.

## Discussion

Either parameter may be `NULL`, in which case the receiver simply ignores it.

As part of its implementation, this method calls [`firstUnlaidCharacterIndex()`](/documentation/AppKit/NSLayoutManager/firstUnlaidCharacterIndex()) and [`firstUnlaidGlyphIndex()`](/documentation/AppKit/NSLayoutManager/firstUnlaidGlyphIndex()). To change this method’s behavior, override those two methods instead of this one.

---

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)