ttfGetGlyphKerning function ttf
Query the kerning size between the glyphs of two UNICODE codepoints.
\param font the font to query. \param previous_ch the previous codepoint. \param ch the current codepoint. \param kerning a pointer filled in with the kerning size between the two glyphs, in pixels, may be NULL. \returns true on success or false on failure; call SDL_GetError() for more information.
\threadsafety This function should be called on the thread that created the font.
\since This function is available since SDL_ttf 3.0.0.
extern SDL_DECLSPEC bool SDLCALL TTF_GetGlyphKerning(TTF_Font *font, Uint32 previous_ch, Uint32 ch, int *kerning)
Implementation
bool ttfGetGlyphKerning(
Pointer<TtfFont> font,
int previousCh,
int ch,
Pointer<Int32> kerning,
) {
final ttfGetGlyphKerningLookupFunction = _libTtf
.lookupFunction<
Uint8 Function(
Pointer<TtfFont> font,
Uint32 previousCh,
Uint32 ch,
Pointer<Int32> kerning,
),
int Function(
Pointer<TtfFont> font,
int previousCh,
int ch,
Pointer<Int32> kerning,
)
>('TTF_GetGlyphKerning');
return ttfGetGlyphKerningLookupFunction(font, previousCh, ch, kerning) == 1;
}