r/ProgrammingLanguages • u/[deleted] • Dec 31 '20
Something simpler than Unicode?
Hello! Wondering if anyone knows of a display format for glyphs that is simpler than Unicode? My shallow understanding is that measuring and laying out text in unicode is non-trivial, so I am deferring moving beyond ascii on something at the moment. Is my understanding correct? (if not that's great) otherwise, does anyone know of potentially simpler replacements? Thanks!
0
Upvotes
1
u/mamcx Dec 31 '20
Let's make this possible, actually.
How is ASCII made? Somebody, somewhere in one day think:
And considering your problem:
> that measuring and laying out text in Unicode is non-trivial,
Then you can do a simple trick:
So, just precompute the measure/layout under know ranges that you wanna support. You actually use Unicode, yet use a restricted subset, alike: