---
title: "CTFontGetLigatureCaretPositions(_:_:_:_:)"
framework: coretext
role: symbol
role_heading: Function
path: "coretext/ctfontgetligaturecaretpositions(_:_:_:_:)"
---

# CTFontGetLigatureCaretPositions(_:_:_:_:)

Returns caret positions within a glyph.

## Declaration

```swift
func CTFontGetLigatureCaretPositions(_ font: CTFont, _ glyph: CGGlyph, _ positions: UnsafeMutablePointer<CGFloat>?, _ maxPositions: CFIndex) -> CFIndex
```

## Parameters

- `font`: A reference to the font to use.
- `glyph`: A reference to the glyph.
- `positions`: A buffer of at least maxPositions to receive the ligature caret positions for glyph.
- `maxPositions`: The maximum number of positions to return.

## Return Value

Return Value The maximum number of caret positions for the specified glyph

## Discussion

Discussion This function is used to obtain caret positions for a specific glyph. The return value is the maximum number of positions possible, and the function will populate the caller’s positions buffer with available positions if possible. This function might not be able to produce positions if the font does not have the appropriate data, in which case it will return 0.

## See Also

### Working with Glyphs

- [CTFontGetGlyphsForCharacters(_:_:_:_:)](coretext/ctfontgetglyphsforcharacters(_:_:_:_:).md)
- [CTFontDrawGlyphs(_:_:_:_:_:)](coretext/ctfontdrawglyphs(_:_:_:_:_:).md)
