aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-05-03 09:21:31 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-05-03 09:21:31 +0000
commit9638d0213b635a318639a0362d995644dc63e014 (patch)
tree330efb126ac32cf97068c927f127eb7bdf2941bc
parentunicode-combining: store seen combining chains "globally" in the term struct (diff)
readme: update 'Unicode combining'
-rw-r--r--README.md36
1 files changed, 15 insertions, 21 deletions
diff --git a/README.md b/README.md
index c2b62a6c..2a289d85 100644
--- a/README.md
+++ b/README.md
@@ -271,30 +271,24 @@ with the terminal emulator itself. Foot implements the following OSCs:
## Unicode combining
-In order to handle combining characters (typically diacritics), 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, or 75% more space than without combining
-characters).
+When the client prints Unicode combining characters, e.g `a\\u0308`
+('a' + `COMBINING DIAERESIS`), foot will be default try to create a
+pre-composed character. For example, `\\u0061\\u0308` (`a\\u0308`)
+will be transformed into `\\u00e5` (`å`).
-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.
+This is to improve the looks of the rendered grapheme. When rendering
+a decomposed string, `a\\u0308`, the glyphs for `a` and `\\u0308` are
+rendered independently, on top off each other. The result if often not
+optimal, with e.g. diacritics looking a bit out of place. If we are
+really unlucky, the base character and the combining characters may be
+picked from different fonts, making the result look even more awkward.
-Furthermore, in order to improve the looks of the rendered combined
-character,, foot will by default try to convert the base and combining
-characters to a pre-composed character.
+When rendering a pre-composed character, we are rendering a single
+glyph only and thus it is guaranteed to look the way the font designer
+intended it to.
-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`.
+Still, if you do not want this, you can disable pre-composing at
+**compile time** with `-Dunicode-precompose=false`.
## Requirements