3 ms·
Cursor position is based on glyphs though, not grapheme clusters. Grapheme clusters are a well-specific Unicode concept. >Thus: one grapheme cluster, or two, d
by mrout 9y ago
Cursor position is based on glyphs though, not grapheme clusters. Grapheme clusters are a well-specific Unicode concept.
>Thus: one grapheme cluster, or two, depending on the font.
One glyph or two depending on the font. Two grapheme clusters, always.
>That's a font, making entirely-arbitrary clusters out of codepoints. As far as I am aware, it's fully within its rights as a font to do so. There's nothing in the Unicode standard saying that the code-points ['f', 'i', 'l', 'e'], put in a row, can't combine to form a single grapheme cluster. They don't have combining behavior themselves, but—unlike, say, things in the Unicode "Separator" class—they don't have any property that says they don't combine with anything.
No, I think those are glyphs. 'file' is always four grapheme clusters.