CTFontGetLigatureCaretPositions(_:_:_:_:)
Returns caret positions within a glyph.
Declaration
func CTFontGetLigatureCaretPositions(_ font: CTFont, _ glyph: CGGlyph, _ positions: UnsafeMutablePointer<CGFloat>?, _ maxPositions: CFIndex) -> CFIndexParameters
- font:
A reference to the font to use.
- glyph:
A reference to the glyph.
- positions:
A buffer of at least
maxPositionsto receive the ligature caret positions forglyph. - maxPositions:
The maximum number of positions to return.
Return Value
The maximum number of caret positions for the specified glyph
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.