diff options
author | Phil Jones <philj56@gmail.com> | 2022-06-25 15:59:42 +0100 |
---|---|---|
committer | Phil Jones <philj56@gmail.com> | 2022-06-25 15:59:42 +0100 |
commit | 335573a628ed6ff20640c881935e0648a4819c1a (patch) | |
tree | b8a8056e877b97797c95814830b154e612591ea4 /src/config.c | |
parent | a6c20eb3713fc5e4b2c8f4075762b899bf9c1857 (diff) |
Add option to disable font hinting.
Also improve text on non-hidpi screens.
Diffstat (limited to 'src/config.c')
-rw-r--r-- | src/config.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/config.c b/src/config.c index ba5a41c..4b20ab5 100644 --- a/src/config.c +++ b/src/config.c @@ -21,7 +21,7 @@ static char *strip(const char *str); static bool parse_option(struct tofi *tofi, const char *filename, size_t lineno, const char *option, const char *value); static char *get_config_path(void); -static int8_t parse_anchor(const char *filename, size_t lineno, const char *str, bool *err); +static uint32_t parse_anchor(const char *filename, size_t lineno, const char *str, bool *err); static bool parse_bool(const char *filename, size_t lineno, const char *str, bool *err); static struct color parse_color(const char *filename, size_t lineno, const char *str, bool *err); static uint32_t parse_uint32(const char *filename, size_t lineno, const char *str, bool *err); @@ -287,6 +287,8 @@ bool parse_option(struct tofi *tofi, const char *filename, size_t lineno, const tofi->hide_cursor = parse_bool(filename, lineno, value, &err); } else if (strcasecmp(option, "history") == 0) { tofi->use_history = parse_bool(filename, lineno, value, &err); + } else if (strcasecmp(option, "hint-font") == 0) { + tofi->window.entry.harfbuzz.disable_hinting = !parse_bool(filename, lineno, value, &err); } else { PARSE_ERROR(filename, lineno, "Unknown option \"%s\"\n", option); err = true; @@ -334,7 +336,7 @@ bool parse_bool(const char *filename, size_t lineno, const char *str, bool *err) return false; } -int8_t parse_anchor(const char *filename, size_t lineno, const char *str, bool *err) +uint32_t parse_anchor(const char *filename, size_t lineno, const char *str, bool *err) { if(strcasecmp(str, "top-left") == 0) { return ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP |