Struct in ldk_ttf.h

LDKGlyph

typedef struct LDKGlyph{
  u32 codepoint;
  u32 glyph_index;
  u16 page_index;
  u16 atlas_x0;
  u16 atlas_y0;
  u16 atlas_x1;
  u16 atlas_y1;
  i16 offset_x;
  i16 offset_y;
  i16 advance_x;
  bool valid;
}LDKGlyph;
Function in ldk_ttf.h

ldk_ttf_get_glyph

Gets a glyph, rasterizing and caching it if necessary.

LDK_API LDKGlyph const * ldk_ttf_get_glyph(
 LDKFontInstance *instance,
 u32 codepoint
);

Parameters

LDKFontInstance *instance
Font instance.
u32 codepoint
Unicode codepoint.

Returns

Glyph data, or NULL on failure.