2 ms·
DomTerm (https://domterm.org https://domterm.org) does a pretty good job IMNSO. See screenshot here: https://domterm.org/Features.html https://domterm.org/Feat
by Per_Bothner 5y ago
DomTerm (https://domterm.org https://domterm.org) does a pretty good job IMNSO. See screenshot here: https://domterm.org/Features.html https://domterm.org/Features.html . DomTerm mostly delegates to the browser and the font how to compose extended Grapheme Clusters.
Unfortunately, as far as I know there is no "complete" monospace font set that handles emoji. Ideally, you want a font with two character widths, with double-width for emoji, hanji (CJK characters), and similar. Instead the browser will substitute these characters from some variable-width font, and then the spacing will be off.
DomTerm handles this by putting double-width characters as well as Extended Grapheme Clusters in a separate span that is forced to have the correct width. I created a JavaScript library https://github.com/PerBothner/unicode-properties https://github.com/PerBothner/unicode-properties based on other people's code but optimized for DomTerm's needs: It provides both East Asian Width (for recognizing double-width characters) and character classes (for grapheme clusters) in a single efficient trie structure.
The DomTerm equivalent of tmux's "select mode" is grapheme-cluster-aware, so left/right-arrow will correctly move over an entire grapheme cluster.