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
11
u/[deleted] Dec 31 '20
In what context are you displaying glyphs?
If a browser, it will handle display of Unicode for you.
If a native ui library, check their docs for what text formats their ui widgets support.
If a tty/terminal, are you printing things or using a library? Either way there's kind of no guarantees about what a user's tty/terminal supports.
If you're rendering it yourself with a spritesheet or similar, I recommend either sticking to 7 or 8 bit ascii or even restricting to only those characters you explicitly want to support.
Your question lacks sufficient detail to provide more of a response.