OpenGL and Foreign Language Display

Started by
5 comments, last by shalrath 19 years ago
There are a plethora of tutorials out there describing the vaious ways to display the roman alphabet in OpenGL, but what about foreign languages? Particularly East Asian languages, where there are simply too many characters to make a bitmap font? How can I, for instance, display a Japanese sentence on my OpenGL window? If anyone knows of any resources, or has any idea please help me out. I've been searching around the GameDev forums, around the internet in general, and I'm not having much luck.
Advertisement
same techno use bitmap for it or freetype (there is a tutorial for it in NeHe) :)
bye
Quote:Original post by shalrath
There are a plethora of tutorials out there describing the vaious ways to display the roman alphabet in OpenGL, but what about foreign languages? Particularly East Asian languages, where there are simply too many characters to make a bitmap font? How can I, for instance, display a Japanese sentence on my OpenGL window? If anyone knows of any resources, or has any idea please help me out. I've been searching around the GameDev forums, around the internet in general, and I'm not having much luck.

For Japanese you could probably restrict your engine to just hiragana/katakana support, which should bring the amount of characters to manageable amount.

For anything more advanced you might want to check http://opengl.geek.nz/weblog/archives/000012.html and then http://homepages.paradise.net.nz/henryj/code/#FTGL
Well, there are only 190 Katakana and Hiragana glyphs, so keeping them in memory isn't that unlikely . On the other hand, there are over 2,000 Kanji glyphs. And there are many thousands of glyph for other languages.

What you need to do is cache the glyph images. Store the 512 most recently used glyphs in textures, and each time you need a glyph not in a texture, erase the least recent used one and draw the glyph into it.
also, most of the time you know beforehand
all the kanji you are going to use in the game so
making bitmap fonts is not that hard.

---------------Magic is real, unless declared integer.- the collected sayings of Wiz Zumwalt
Er, no. What if your game has a chat facility? Or some other reason it might be printing arbitrary sequences of characters?
thankyou for your responses, I've downloaded the freetype and ftgl libs, and I'm looking through them now. The final comment here is true of my situation, I want to have the ability to input any character, as I also want to use Korean and Chinese. And anyone with experience in Korean will understand what I mean by a complicated language to type on the computer, as is Chinese.

Thanks for your help again. I shall do what I can.

This topic is closed to new replies.

Advertisement