natiny_font_has_glyph

C
bool natiny_font_has_glyph(NatinyFont font, uint32_t codepoint);

Answers whether this font can draw a code point, following its fallback chain.

Parameters

Name Type Description
font NatinyFont Font handle from natiny_font_create
codepoint uint32_t Unicode code point

Returns

Type Description
bool true if the font or one of its fallbacks provides the glyph

Example

C
bool can_draw = natiny_font_has_glyph(font, 0x4E2D);

Notes

  • false means the code point would be drawn as the missing-glyph box.
  • An invalid handle returns false.