From f19797a5af71112393f0fad6c12061432a29ca69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Thu, 24 Jun 2021 14:04:08 +0200 Subject: [PATCH] =?UTF-8?q?changelog:=20updates=20to=20=E2=80=9Cgrapheme?= =?UTF-8?q?=20shaping=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c0f1443..6b84b1f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,14 +39,14 @@ browser, viewer or editor). Grapheme cluster segmentation is the art of splitting up text into grapheme clusters, where a cluster may consist of more than one Unicode codepoint. For example, ๐Ÿ™‚ is a single codepoint, while ๐Ÿ‘ฉ๐Ÿฝโ€๐Ÿš€ -consists of 5 codepoints (_Woman_ + _Medium skin tone_ + _Zero width +consists of 4 codepoints (_Woman_ + _Medium skin tone_ + _Zero width joiner_ + _Rocket_). The goal is to _cluster_ codepoints belonging to the same grapheme in the same cell in the terminal. Previous versions of foot implemented a simple grapheme cluster segmentation technique that **only** handled zero-width -codepoints. This allowed us to cluster composed characters (e.g. qฬ - -_q_ + _COMBINING ACUTE ACCENT_). +codepoints. This allowed us to cluster composed characters, like qฬ +(_q_ + _COMBINING ACUTE ACCENT_). Once we have a grapheme cluster, we need to _shape_ it. @@ -72,7 +72,7 @@ For full support, the following is required: This feature is _experimental_ mostly due to the โ€œwcwidthโ€ problem; how many cells should foot allocate for a grapheme cluster? While the answer may seem simple, the problem is that, whatever the answer is, -the client application **must** have come up with the **same** +the client application **must** come up with the **same** answer. Otherwise we get cursor synchronization issues. In this release, foot simply adds together the `wcwidth()` of all @@ -80,6 +80,11 @@ codepoints in the grapheme cluster. This is equivalent to running `wcswidth()` on the entire cluster. **This is likely to change in the future**. +Finally, note that grapheme shaping is not the same thing as text (or +text run) shaping. In this version, foot only shapes individual +graphemes, not entire text runs. That means e.g. ligatures are **not** +supported. + ### Added