diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2021-08-31 17:42:22 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-08-31 17:58:35 +0000 |
| commit | 8ffc556d441013e06236f144020b91ea4e3a3f86 (patch) | |
| tree | 5c5328e0dc45c8e052a4df58dae002cb1679f54a /config.h | |
| parent | terminal: prefer the advance width of ‘M’ over that of a space (diff) | |
main: verify primary font is monospaced at startup
Load a couple of ASCII glyphs and check if their advance widths
matches. If not, warn the user that the font is probably not
monospaced.
This can be disabled by setting tweak.font-monospace-warn=no.
Closes #704.
Diffstat (limited to 'config.h')
| -rw-r--r-- | config.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -253,6 +253,7 @@ struct config { off_t max_shm_pool_size; float box_drawing_base_thickness; bool box_drawing_solid_shades; + bool font_monospace_warn; } tweak; user_notifications_t notifications; @@ -269,3 +270,6 @@ struct config *config_clone(const struct config *old); bool config_font_parse(const char *pattern, struct config_font *font); void config_font_list_destroy(struct config_font_list *font_list); + +bool check_if_font_is_monospaced( + const char *pattern, user_notifications_t *notifications); |
