hrmpf, the MacOS/iOS NSString class is UTF-16, and there I was hoping that Windows is the only platform with broken unicode support 
-
-
It's not for rendering but for converting the input of a text field into UTF-32 code points, that's how I'm handing input from sokol_app.h to the user code (UTF-32 because it's a fixed length encoding where one code-point is always one code-unit), for everything else I use UTF-8
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Well, he's doing UI so very likely he actually wants code units
-
What do you do with code points once you get them? If the answer is “index into an atlas or glyph array,” you’re Doing It Wrong.
-
You mean because of combining characters?
-
Combining characters are but one issue in complex text layout. https://en.m.wikipedia.org/wiki/Complex_text_layout …
-
Ah right, I forgot. I rely on HarfBuzz for that
-
And what do you give to HarfBuzz to get a sequence of glyph shapes? It doesn’t require enumerating code points manually.
-
To HarfBuzz I send the full substring (icu's ubidi separates ltr from rtl). I need code unit access for caret navigation in a basic editbox
-
Admittedly that works for the most basic cases, but even if you use a sane canonicalization, you still have to contend with the fact that Codepoints Aren’t Characters, and there are many instances where you don’t want an insertion point between them.
- 1 more reply
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.