natiny_font_create
C
NatinyFont natiny_font_create(NatinyResource resource, float size);
Creates a font from loaded font data.
Parameters
| Name |
Type |
Description |
resource |
NatinyResource |
Resource handle containing TrueType font data |
size |
float |
Font size in drawing units; values at or below 0.0f use 16.0f |
Returns
| Type |
Description |
NatinyFont |
Font handle, or 0 if the resource is invalid, the data is not a supported font, or allocation fails |
Example
C
NatinyResource res = natiny_resource_load("fonts/roboto.ttf");
NatinyFont font = natiny_font_create(res, 24.0f);