---
title: "baselineDeltaForCharacter(at:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nstextinputclient/baselinedeltaforcharacter(at:)"
---

# baselineDeltaForCharacter(at:)

Returns the baseline position of a given character relative to the origin of rectangle returned by firstRect(forCharacterRange:actualRange:).

## Declaration

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

## Parameters

- `anIndex`: Index of the character whose baseline is tested.

## Return Value

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

## Discussion

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.

## See Also

### Getting character coordinates

- [characterIndex(for:)](appkit/nstextinputclient/characterindex(for:).md)
- [firstRect(forCharacterRange:actualRange:)](appkit/nstextinputclient/firstrect(forcharacterrange:actualrange:).md)
- [drawsVerticallyForCharacter(at:)](appkit/nstextinputclient/drawsverticallyforcharacter(at:).md)
- [fractionOfDistanceThroughGlyph(for:)](appkit/nstextinputclient/fractionofdistancethroughglyph(for:).md)
