diff --git a/internals.md b/internals.md index 052082a..8a0a635 100644 --- a/internals.md +++ b/internals.md @@ -52,7 +52,8 @@ None of the terminals I tested implement the proposed spec fully, and the exact behaviour is subject to ongoing discussion in the freedesktop.org terminal working group. Support for this mode should therefore be considered best-effort at the moment, especially when support for Brahmic, Arabic, and some east asian -scripts is required. +scripts is required. If you just want your emoji family to be 2 columns wide, +this mode works well enough right now. This library does the following: @@ -68,7 +69,8 @@ This library does the following: Additionally, in the extended mode, the following rules apply: - If a grapheme cluster contains two or more non-spacing non-zero-width - codepoints, its width is wide. + codepoints, its width is wide. "Spacing" codepoints in this context are all + codepoints with a `General_Category` of `Spacing_Mark`. This rule makes the width reported by this library across Erlang and Nodejs more stable (Unicode version differences, see above), as well as closer match the @@ -101,6 +103,10 @@ All other codepoints are **narrow**. # Testing -I currently test against VTE (mainly gnome-terminal), Windows Terminal, Kitty, and foot for mode 2027 support. +I currently test against VTE (mainly gnome-terminal), Windows Terminal, Kitty, +and foot for mode 2027 support. I also test on Contour since they originally +proposed the mode 2027 spec; however, they use a custom Unicode library that I +don't trust fully. -When reporting a mismatch, please include which terminal and the escaped codepoints. Gitlab/Discord sometimes like to strip certain modifiers. +When reporting a mismatch, please include which terminal and the escaped +codepoints. Gitlab/Discord sometimes like to strip certain modifiers. diff --git a/src/string_width.gleam b/src/string_width.gleam index 34a8409..b2d4365 100644 --- a/src/string_width.gleam +++ b/src/string_width.gleam @@ -579,7 +579,7 @@ pub fn limit_with( /// Replace all tab characters found in the string with the amount of spaces /// that this tab would have had otherwise. /// -/// This makes it save to prepend to a line, without changing the spacing produced +/// This makes it safe to prepend to a line, without changing the spacing produced /// by tabs anymore. /// /// ### Examples