| ▲ | chrismorgan 7 hours ago | |
No, UAX #11 does not define the width of characters. It’s called “East Asian Width” for a reason. As the note in the Scope section begins: > The East_Asian_Width property is not intended for use by modern terminal emulators without appropriate tailoring on a case-by-case basis. […] It’s about a very specific typographical custom in a specific set of languages. Terminal emulators have piggy-backed onto it because it’s fairly close to what they want and definitely better than nothing, but if they limit themselves to this definition, they do a bad job. > you shouldn't need knowledge of the type-face to know the size of the printed character To see the most extreme example, look through Google Fonts for U+FDFD <https://fonts.google.com/?preview.text=%EF%B7%BD> and see the radical differences in aspect ratio (and size!). In some other scripts there are multiple ways of writing things which have quite different width characteristics. In English we have different accepted and understood letterforms for a, g, v, z and probably others, but they’re all roughly the same width. But this isn’t always true in other scripts. My name is written in Telugu as క్రిస్ (kri s), but that r curve can be drawn below or to the left (both seen among <https://fonts.google.com/?preview.text=%E0%B0%95%E0%B1%8D%E0...>), and even sometimes a little to the right; and you don’t actually have to write it with a conjunct, క్ రిస్ (k ri s) means the same thing and there used to be some fonts or apps that wouldn’t render conjuncts. (Encodingwise, I inserted a ZERO WIDTH NON-JOINER after the {k, suppress vowel} and before the {r, -i} to simulate this effect. And then HN turned the ZWNJ into a space. Sigh. I should ask them once again to stop doing that.) Of these three different legitimate renderings of the same text, one works in two cells, one wants two and a half, one needs three. | ||
| ▲ | hnlmorg 6 hours ago | parent [-] | |
> No, UAX #11 does not define the width of characters. It's literally there in the doc > It’s called “East Asian Width” for a reason. As the note in the Scope section begins: Yes. I didn't claim it defines terminal cell widths. There's a reason you need a library to translate that into cell widths. What I said was you don't need to be pratt about with printing because Unicode does define widths and properly libraries pin against that (like POSIX does). > Terminal emulators have piggy-backed onto it because it’s fairly close to what they want and definitely better than nothing, That's a very convoluted way of agreeing with me :) > but if they limit themselves to this definition, they do a bad job. A large part of the problem here is you're introducing scope creep. > To see the most extreme example, look through Google Fonts for U+FDFD <https://fonts.google.com/?preview.text=%EF%B7%BD> and see the radical differences in aspect ratio (and size!). You're shifting goal posts again because you're no longer talking about fixed width typefaces. Terminals have to make some concessions for turning scripts (of any language) into fixed width. If that's an issue then you shouldn't be using the terminal to begin with. There are better standards for that, such as the web. In short, nobody is going to disagree with you that Unicode is hard and full of edge cases. But the vast majority of the stuff you describe are either already solved, already have standards, or are already out of scope for terminals. | ||