natiny.font.has_glyph
natiny.font.has_glyph(font, codepoint) -> boolean
Answers whether this font can draw a code point, following its fallback chain.
Parameters
| Name | Type | Description |
|---|---|---|
font |
number |
Font handle from natiny.font.create |
codepoint |
number or string |
Unicode code point, or a UTF-8 string whose first character is tested |
Returns
| Type | Description |
|---|---|
boolean |
true if the font or one of its fallbacks provides the glyph |
Example
local can_draw = natiny.font.has_glyph(font, 0x4E2D)