diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-05-02 15:29:00 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-05-02 15:29:00 +0000 |
| commit | d945b68b734427a03d114716ff8aeac7998a7c57 (patch) | |
| tree | 93c73c5ab615ccf66244713d15a2a7a2fd139e0d /README.md | |
| parent | unicode-combining: don't limit ourselves to the (western) diacritics blocks (diff) | |
unicode-combine: remove utf8proc dependency
We only used utf8proc to try to pre-compose a glyph from a base and
combining character.
We can do this ourselves by using a pre-compiled table of valid
pre-compositions. This table isn't _that_ big, and binary searching it
is fast.
That is, for a very small amount of code, and not too much extra RO
data, we can get rid of the utf8proc dependency.
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 28 |
1 files changed, 28 insertions, 0 deletions
@@ -16,6 +16,7 @@ The fast, lightweight and minimalistic Wayland terminal emulator. 1. [Backspace](#backspace) 1. [DPI and font size](#dpi-and-font-size) 1. [Supported OSCs](#supported-oscs) +1. [Unicode combining](#unicode-combining) 1. [Requirements](#requirements) 1. [Running](#running) 1. [Building](#building) @@ -268,6 +269,33 @@ with the terminal emulator itself. Foot implements the following OSCs: * `OSC 555` - flash screen (**foot specific**) +## Unicode combining + +In order to handle combining characters, foot must store additional +data for each cell. By default, foot stores at most 2 combining +characters per cell. This adds 9 bytes of additional space to each +cell (that's 75% more space than without combining characters). + +You can configure the maximum number of characters to store for each +cell at **compile time** with +`-Dunicode-max-combining-chars=<int>`. Setting this to `0` +**disables** unicode combining completely - **no** additional data is +stored. + +Furthermore, in order to improve rendering of combining characters, +foot will by default try to convert base + combining characters to a +pre-composed character. + +This will typically look better, since we can now render a single +glyph, the way the font designer intended it to be rendered. When +pre-composing fails, foot will fallback to storing the combining +character(s) separate from the base character, and will render the +final grapheme by rendering the base and combining glyphs separately. + +You can disable pre-composing at **compile time** with +`-Dunicode-precompose=false`. + + ## Requirements ### Running |
