summaryrefslogtreecommitdiff
path: root/text.h
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-07-18 16:09:50 -0400
committerpommicket <pommicket@gmail.com>2023-07-18 16:09:50 -0400
commit2d2f0a09b180cf3bd6a2bc0ad3d21ea956398822 (patch)
tree33d6c80526a22e19a0974ea0a8297143208f3af7 /text.h
parent14cc6fb3f93ab6e3ce9b51826a9e29968932b0d7 (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.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/text.h b/text.h
index c0cb260..79f99ad 100644
--- a/text.h
+++ b/text.h
@@ -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.