ttfGetGlyphImage function

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

Get the pixel image for a UNICODE codepoint.

\param font the font to query. \param ch the codepoint to check. \returns an SDL_Surface containing the glyph, or NULL 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 SDL_Surface * SDLCALL TTF_GetGlyphImage(TTF_Font *font, Uint32 ch)

Implementation

Pointer<SdlSurface> ttfGetGlyphImage(Pointer<TtfFont> font, int ch) {
  final ttfGetGlyphImageLookupFunction = libSdl3Ttf.lookupFunction<
      Pointer<SdlSurface> Function(Pointer<TtfFont> font, Uint32 ch),
      Pointer<SdlSurface> Function(
          Pointer<TtfFont> font, int ch)>('TTF_GetGlyphImage');
  return ttfGetGlyphImageLookupFunction(font, ch);
}