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-19 19:02:27 -0400
commit94a6d21d4c2fe5fc2806cd28ae36a2b0e1928914 (patch)
tree4f37afc94b9bbac7571ee6a17a1a3a1d5dce0ba0 /text.h
parentbe5dab846e38420961a68ff4503a48e2bd8bdf6b (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.