diff options
author | pommicket <pommicket@gmail.com> | 2023-07-18 16:09:50 -0400 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2023-07-19 19:02:27 -0400 |
commit | 94a6d21d4c2fe5fc2806cd28ae36a2b0e1928914 (patch) | |
tree | 4f37afc94b9bbac7571ee6a17a1a3a1d5dce0ba0 /command.c | |
parent | be5dab846e38420961a68ff4503a48e2bd8bdf6b (diff) |
new font management system
this lets us avoid reloading the font file from disk
whenever the font size changes
Diffstat (limited to 'command.c')
-rw-r--r-- | command.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -532,7 +532,7 @@ void command_execute_ex(Ted *ted, Command c, CommandArgument full_argument, Comm i64 new_text_size = settings->text_size + argument; if (new_text_size >= TEXT_SIZE_MIN && new_text_size <= TEXT_SIZE_MAX) { settings->text_size = (u16)new_text_size; - ted_load_fonts(ted); + ted_change_text_size(ted, (float)new_text_size); } } break; @@ -541,7 +541,7 @@ void command_execute_ex(Ted *ted, Command c, CommandArgument full_argument, Comm i64 new_text_size = settings->text_size - argument; if (new_text_size >= TEXT_SIZE_MIN && new_text_size <= TEXT_SIZE_MAX) { settings->text_size = (u16)new_text_size; - ted_load_fonts(ted); + ted_change_text_size(ted, (float)new_text_size); } } break; |