PDA

View Full Version : Unicode text?



Leadwerks
12-13-2008, 02:09 AM
Anyone have an example of using unicode text for fonts of different languages? I am using Windows fonts and glListBase to display them right now. I don't know much about fonts.

martinsm
12-13-2008, 02:40 AM
I'm usually using prerendered character images to texture. I'm using "Bitmap Font Generator": http://www.angelcode.com/products/bmfont/ With it I prerender all the unicode characters I need and then simply use resulting texture to extract individual characters when I need to render text.

For using ttf fonts, you can for example check source code of OpenTK library. It is OpenGL wrapper in C# that also includes text rendering from ttf fonts.

LangFox
12-14-2008, 08:12 PM
Yes, you could create a compatible dc, draw windows fonts to the dc, then copy pixels of dc to a texture, use the texture to render text.

_NK47
12-15-2008, 02:00 AM
hope this helps. (http://dmedia.dprogramming.com/?n=Tutorials.TextRendering1)