<!--
{
  "availability" : [
    "macOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTextInputClient/baselineDeltaForCharacter(at:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSTextInputClient(im)baselineDeltaForCharacterAtIndex:"
  },
  "title" : "baselineDeltaForCharacter(at:)"
}
-->

# baselineDeltaForCharacter(at:)

Returns the baseline position of a given character relative to the origin of rectangle returned by [`firstRect(forCharacterRange:actualRange:)`](/documentation/AppKit/NSTextInputClient/firstRect(forCharacterRange:actualRange:)).

```
optional func baselineDeltaForCharacter(at anIndex: Int) -> CGFloat
```

## Parameters

`anIndex`

Index of the character whose baseline is tested.

## Return Value

The vertical distance, in points, between the baseline of the character at `anIndex` and the rectangle origin.

## Discussion

Implementation of this method is optional. This information allows the caller to determine finer-grained character positioning within the text storage of the text view adopting `NSTextInputClient`.

---

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)