3 ms·
If you know exactly what text you're going to render, you can create your own font, relocate all the characters, and fit everything very compactly into UTF-8. Y
by jeroenhd 3y ago
If you know exactly what text you're going to render, you can create your own font, relocate all the characters, and fit everything very compactly into UTF-8. You'll need to convert external input to your encoding scheme, but it can save a lot of bytes for some corpuses.
If you try to standardise against "what things look like", you'll inevitable run into trouble like the famous Turkic I (I (Iı) vs İ (İi) vs I (Ii) where "İ".toLower().toUpper() != "İ").
Sure, this means characters like é can theoretically be stored as either 0xE9 or 0xC3A9, but if you can pick what encoding you use, you can also optimise for the smallest length.
- eviks 3y ago> you'll inevitable run into trouble like the famous Turkic nope > if you need to add semantic meaning to identically looking results, that would be another non-visual composable indicator so in this case you'd have an extra indicator that would be appended to ˙ to make it İi and not Ii