diff options
author | pommicket <pommicket@gmail.com> | 2023-07-18 16:09:50 -0400 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2023-07-18 16:09:50 -0400 |
commit | 2d2f0a09b180cf3bd6a2bc0ad3d21ea956398822 (patch) | |
tree | 33d6c80526a22e19a0974ea0a8297143208f3af7 /text.h | |
parent | 14cc6fb3f93ab6e3ce9b51826a9e29968932b0d7 (diff) |
new font management system
this lets us avoid reloading the font file from disk
whenever the font size changes
Diffstat (limited to 'text.h')
-rw-r--r-- | text.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -68,6 +68,8 @@ const char *text_get_err(void); void text_clear_err(void); /// Load a TTF font found in ttf_filename with the given font size (character pixel height) Font *text_font_load(const char *ttf_filename, float font_size); +/// Change size of font. Avoid calling this function too often, since all font textures are trashed. +void text_font_change_size(Font *font, float new_size); /// Height of a character of this font in pixels. float text_font_char_height(Font *font); /// Width of the given character in pixels. |