natiny_font_get_ascent
float natiny_font_get_ascent(NatinyFont font);
Returns how far the font reaches above the baseline, in drawing units.
Parameters
| Name | Type | Description |
|---|---|---|
font |
NatinyFont |
Font handle from natiny_font_create |
Returns
| Type | Description |
|---|---|
float |
Non-negative distance above the baseline in drawing units, or 0.0f for an invalid handle |
Example
float ascent = natiny_font_get_ascent(big);
natiny_render_text(big, x, y, "A");
natiny_render_text(small, x + 30.0f,
y + ascent - natiny_font_get_ascent(small), "a");