natiny_font_set_letter_spacing
void natiny_font_set_letter_spacing(NatinyFont font, float spacing);
Sets an extra gap added after every glyph, in drawing units.
Parameters
| Name | Type | Description |
|---|---|---|
font |
NatinyFont |
Font handle from natiny_font_create |
spacing |
float |
Drawing units added after each glyph; must satisfy -1e9f < spacing < 1e9f |
Example
natiny_font_set_letter_spacing(font, 2.0f);
Notes
- Added after every glyph, including the final glyph.
- Applies on top of kerning rather than replacing it.
- Measuring, wrapping, hit-testing, and drawing all use the value.
- Out-of-range values and NaN are ignored. The setting survives an atlas re-bake.