Any idea how to properly render text in languages that require a lot of glyphs?

Started by asyx, September 18, 2015, 15:53:10

Previous topic - Next topic

asyx

Hello!

I want to render text in a way that does not restrict the user to the standard 26 Latin characters. Whilst this isn't a problem with languages like German or Norwegian where you only need a few more glyphs then for English, it gets hairy if you want something like Chinese or Japanese.

My solution currently involved rendering the text to one texture and just render it on an appropriately sized quad. I've also heard stuff like rendering every character you use in your application to a bitmap and then use that as a bitmap font which works if you know the text but in an online game that requires something like a chat, you're already screwed. Pretty sure having 2000-3000 characters on a bitmap font is a bit of a pain. You also can't really render every character to a single quad since you only have 80 texture slots guaranteed which isn't enough.

Anything I'm overlooking? I mean, my solution works but maybe there's something better.

spasi

For static text, you could simply pack only the characters used by your application.

For a chat/messaging system where users may type anything, a caching approach should work best, i.e. have a cache of the last X characters used, where X is large enough for the amount of text you could possibly have in single frame.