ttfGlyphIsProvided function

int ttfGlyphIsProvided(
  1. Pointer<TtfFont> font,
  2. int ch
)

Check whether a glyph is provided by the font for a 16-bit codepoint.

Note that this version of the function takes a 16-bit character code, which covers the Basic Multilingual Plane, but is insufficient to cover the entire set of possible Unicode values, including emoji glyphs. You should use TTF_GlyphIsProvided32() instead, which offers the same functionality but takes a 32-bit codepoint instead.

The only reason to use this function is that it was available since the beginning of time, more or less.

\param font the font to query. \param ch the character code to check. \returns non-zero if font provides a glyph for this character, zero if not.

\since This function is available since SDL_ttf 2.0.12.

\sa TTF_GlyphIsProvided32

extern DECLSPEC int SDLCALL TTF_GlyphIsProvided(TTF_Font *font, Uint16 ch)

Implementation

int ttfGlyphIsProvided(Pointer<TtfFont> font, int ch) {
  final ttfGlyphIsProvidedLookupFunction = libSdl2Ttf.lookupFunction<
      Int32 Function(Pointer<TtfFont> font, Uint16 ch),
      int Function(Pointer<TtfFont> font, int ch)>('TTF_GlyphIsProvided');
  return ttfGlyphIsProvidedLookupFunction(font, ch);
}