natiny.font.set_fallback
natiny.font.set_fallback(font, fallback)
Names another font to draw the code points this one has no outline for.
Parameters
| Name | Type | Description |
|---|---|---|
font |
number |
Font handle from natiny.font.create |
fallback |
number or nil |
Font used for missing glyphs; nil clears the fallback |
Example
local latin = natiny.font.create(roboto, 24)
local emoji = natiny.font.create(noto_emoji, 24)
natiny.font.set_fallback(latin, emoji)
natiny.render.text(latin, 10, 10, "Ready 馃殌")
Notes
- A fallback may have its own fallback. Resolution follows at most eight fonts.