diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2021-01-04 17:18:15 -0500 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2021-01-04 17:18:15 -0500 |
commit | 306505e714b7caf146b8ec8386b407d57555563d (patch) | |
tree | 9cebf2eaf83899a7aa80fff70dd4d56cf4aa29d6 /config.c | |
parent | 16ab3629d435d52539b6345d79433e27c367ce83 (diff) |
commands to change the font size
Diffstat (limited to 'config.c')
-rw-r--r-- | config.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -106,7 +106,7 @@ static u32 config_parse_key_combo(ConfigReader *cfg, char const *str) { {"Tilde", "~", SDL_SCANCODE_GRAVE, 1} }; - // @OPTIMIZE: sort key_names; do a binary search + // @OPTIMIZE: sort key_names (and split keyname1/2); do a binary search for (size_t i = 0; i < arr_count(key_names); ++i) { KeyName const *k = &key_names[i]; if (streq(str, k->keyname1) || (k->keyname2 && streq(str, k->keyname2))) { @@ -286,6 +286,12 @@ void config_read(Ted *ted, char const *filename) { } else { config_err(cfg, "Invalid cursor blink time: %s.", value); } + } else if (streq(key, "text-size")) { + if (is_integer && integer >= TEXT_SIZE_MIN && integer <= TEXT_SIZE_MAX) { + settings->text_size = (u16)integer; + } else { + config_err(cfg, "Invalid text size: %s.", value); + } } else { config_err(cfg, "Unrecognized core setting: %s.", key); } |