mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-13 05:33:51 -04:00
Merge branch 'enable-grapheme-shaping-by-default'
This commit is contained in:
commit
f22bc60bfc
3 changed files with 17 additions and 16 deletions
|
|
@ -42,6 +42,13 @@
|
||||||
and background colors for the scrollback indicator.
|
and background colors for the scrollback indicator.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
* `[tweak].grapheme-shaping` is now enabled by default when both foot
|
||||||
|
itself, and fcft has been compiled with support for it.
|
||||||
|
* Default value of `[tweak].grapheme-width-method` changed from
|
||||||
|
`double-width` to `wcswidth`.
|
||||||
|
|
||||||
|
|
||||||
### Deprecated
|
### Deprecated
|
||||||
### Removed
|
### Removed
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
|
||||||
10
config.c
10
config.c
|
|
@ -2396,8 +2396,8 @@ parse_section_tweak(
|
||||||
* grapheme-clustering at least */
|
* grapheme-clustering at least */
|
||||||
}
|
}
|
||||||
|
|
||||||
if (conf->tweak.grapheme_shaping)
|
if (!conf->tweak.grapheme_shaping)
|
||||||
LOG_WARN("tweak: grapheme shaping");
|
LOG_WARN("tweak: grapheme shaping disabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (strcmp(key, "grapheme-width-method") == 0) {
|
else if (strcmp(key, "grapheme-width-method") == 0) {
|
||||||
|
|
@ -2978,8 +2978,10 @@ config_load(struct config *conf, const char *conf_path,
|
||||||
.tweak = {
|
.tweak = {
|
||||||
.fcft_filter = FCFT_SCALING_FILTER_LANCZOS3,
|
.fcft_filter = FCFT_SCALING_FILTER_LANCZOS3,
|
||||||
.overflowing_glyphs = true,
|
.overflowing_glyphs = true,
|
||||||
.grapheme_shaping = false,
|
#if defined(FOOT_GRAPHEME_CLUSTERING) && FOOT_GRAPHEME_CLUSTERING
|
||||||
.grapheme_width_method = GRAPHEME_WIDTH_DOUBLE,
|
.grapheme_shaping = fcft_caps & FCFT_CAPABILITY_GRAPHEME_SHAPING,
|
||||||
|
#endif
|
||||||
|
.grapheme_width_method = GRAPHEME_WIDTH_WCSWIDTH,
|
||||||
.delayed_render_lower_ns = 500000, /* 0.5ms */
|
.delayed_render_lower_ns = 500000, /* 0.5ms */
|
||||||
.delayed_render_upper_ns = 16666666 / 2, /* half a frame period (60Hz) */
|
.delayed_render_upper_ns = 16666666 / 2, /* half a frame period (60Hz) */
|
||||||
.max_shm_pool_size = 512 * 1024 * 1024,
|
.max_shm_pool_size = 512 * 1024 * 1024,
|
||||||
|
|
|
||||||
|
|
@ -1020,23 +1020,15 @@ any of these options.
|
||||||
|
|
||||||
This is required to render e.g. flag (emoji) sequences, keycap
|
This is required to render e.g. flag (emoji) sequences, keycap
|
||||||
sequences, modifier sequences, zero-width-joiner (ZWJ) sequences
|
sequences, modifier sequences, zero-width-joiner (ZWJ) sequences
|
||||||
andn emoji tag sequences. It might also improve rendering of
|
and emoji tag sequences. It might also improve rendering of
|
||||||
composed characters, depending on font.
|
composed characters, depending on font.
|
||||||
|
|
||||||
This is an experimental feature with the following requirements
|
|
||||||
and limitations:
|
|
||||||
|
|
||||||
- foot must have been compiled with utf8proc support
|
- foot must have been compiled with utf8proc support
|
||||||
- fcft must have been compiled with HarfBuzz support
|
- fcft must have been compiled with HarfBuzz support
|
||||||
- This option must be set to true
|
|
||||||
- Foot will use *wcswidth*(3) to calculate a cluster's display
|
|
||||||
width. This will typically _not_ match the shaped glyph's
|
|
||||||
width, but is necessary to not break cursor synchronization
|
|
||||||
with the application running in foot.
|
|
||||||
|
|
||||||
See also: *grapheme-width-method*.
|
See also: *grapheme-width-method*.
|
||||||
|
|
||||||
Default: _no_
|
Default: _yes_
|
||||||
|
|
||||||
*grapheme-width-method*
|
*grapheme-width-method*
|
||||||
Selects which method to use when calculating the width
|
Selects which method to use when calculating the width
|
||||||
|
|
@ -1047,12 +1039,12 @@ any of these options.
|
||||||
codepoints making up the cluster.
|
codepoints making up the cluster.
|
||||||
|
|
||||||
*double-width* does the same, but limits the maximum number of
|
*double-width* does the same, but limits the maximum number of
|
||||||
columns to 2. This is more correct, but is likely to break
|
columns to 2. This is more correct, but may break some
|
||||||
applications since applications typically use *wcswidth*(3)
|
applications since applications typically use *wcswidth*(3)
|
||||||
internally to calculate the width. This results in cursor
|
internally to calculate the width. This results in cursor
|
||||||
de-synchronization issues.
|
de-synchronization issues.
|
||||||
|
|
||||||
Default: _double-width_
|
Default: _wcswidth_
|
||||||
|
|
||||||
*font-monospace-warn*
|
*font-monospace-warn*
|
||||||
Boolean. When enabled, foot will use heuristics to try to verify
|
Boolean. When enabled, foot will use heuristics to try to verify
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue