config: add boolean option tweak.pua-double-width

When enabled, PUA (Private Usage Area) codepoints are always treated
as double-width glyphs, regardless of the actual glyph width.

Requires allow-overflowing-double-width-glyphs=yes
This commit is contained in:
Daniel Eklöf 2021-05-31 17:10:05 +02:00
parent d458d46f81
commit 4c954be7a6
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
5 changed files with 35 additions and 8 deletions

View file

@ -2005,6 +2005,12 @@ parse_section_tweak(
LOG_WARN("tweak: disabled overflowing double-width glyphs");
}
else if (strcmp(key, "pua-double-width") == 0) {
conf->tweak.pua_double_width = str_to_bool(value);
if (conf->tweak.pua_double_width)
LOG_WARN("tweak: PUA double width glyphs enabled");
}
else if (strcmp(key, "damage-whole-window") == 0) {
conf->tweak.damage_whole_window = str_to_bool(value);
if (conf->tweak.damage_whole_window)
@ -2573,6 +2579,7 @@ config_load(struct config *conf, const char *conf_path,
.damage_whole_window = false,
.box_drawing_base_thickness = 0.04,
.box_drawing_solid_shades = true,
.pua_double_width = false,
},
.notifications = tll_init(),