Efficient font rendering for languages with many glyphs?
Members - Reputation: 115
Posted 13 August 2012 - 11:59 PM
Crossbones+ - Reputation: 3748
Posted 14 August 2012 - 12:53 AM
I use uniscribe instead, with an LRU scheme on a large cache. The cache evicts seldom used glyphs when exceeding a certain memory threshold. I think it's about 8 MiB for now but it never kicked in. Note Uniscribe appears to have its own cache as well.
Members - Reputation: 274
Posted 15 August 2012 - 02:36 AM
I've been working on several games where all text was predetermined. We just extracted all texts for a specific language from our localization database and ran this through BMfont (http://www.angelcode.com/products/bmfont). This tool allows you to create font textures only containing characters found in a specified file. This removed the need for us to include the font itself (which was about 12MB, too huge).
If you're using texts for chat or something you would need to include the font since you dont know which characters users will use. Like Krohm suggets you could use some caching. Maybe you can even swap in and out characters that are or arent currently used, if you are doing this maybe you can place your characters in an evenly spaced grid so that you wont have issues with replacing small characters with large ones.
Members - Reputation: 257
Posted 19 August 2012 - 03:59 AM
I second what Murdock says, projects I have worked on that required japanese we scan through all the text looking for all the unique unicode. We then created a bitmap font based on this. The font wasn't too big, but with more characters packed into the same amount of space we used on the european font means the quality is reduced (was acceptable to the Japanese publisher)