mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-28 06:46:38 -04:00
config: add grapheme-width-method=default
This is the new default mode, and tries to do "the right thing". That is, recognize and handle: * Variation Selector 16 (graphical presentation) * ZWJ sequences * Skin tones and hair-styles * Country flags Things known to be incorrect: * "Invalid" country letter combinations are still treated as flags. That is, the combined width is 2, even though it should be 4.
This commit is contained in:
parent
3b9aca6a3d
commit
ab39ed99df
4 changed files with 80 additions and 11 deletions
4
config.c
4
config.c
|
|
@ -2371,7 +2371,7 @@ parse_section_tweak(struct context *ctx)
|
|||
|
||||
return value_to_enum(
|
||||
ctx,
|
||||
(const char *[]){"wcswidth", "double-width", "max", NULL},
|
||||
(const char *[]){"default", "wcswidth", "double-width", "max", NULL},
|
||||
(int *)&conf->tweak.grapheme_width_method);
|
||||
}
|
||||
|
||||
|
|
@ -2977,7 +2977,7 @@ config_load(struct config *conf, const char *conf_path,
|
|||
#if defined(FOOT_GRAPHEME_CLUSTERING) && FOOT_GRAPHEME_CLUSTERING
|
||||
.grapheme_shaping = fcft_caps & FCFT_CAPABILITY_GRAPHEME_SHAPING,
|
||||
#endif
|
||||
.grapheme_width_method = GRAPHEME_WIDTH_WCSWIDTH,
|
||||
.grapheme_width_method = GRAPHEME_WIDTH_DEFAULT,
|
||||
.delayed_render_lower_ns = 500000, /* 0.5ms */
|
||||
.delayed_render_upper_ns = 16666666 / 2, /* half a frame period (60Hz) */
|
||||
.max_shm_pool_size = 512 * 1024 * 1024,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue