PDA

View Full Version : Problem writing chars



fortikur
07-23-2004, 01:28 AM
I am working on the text writing part of my game. I used the NeHe code for writing text (the good old wglUseFontBitmaps stuff).
As long as I write chars which exist in English, there is no problem. But I want to make a text displayer routine, that I can use if I want to write spec French or Hungarian chars (like ŐőűŰ etc.).
I've already read a topic about this in the forums, but it was only a French solution. If I increase the list above 200
(base = glGenLists(224); - remember NeHe? :) )
I get only a few special chars working (like őŐ), but there are still some, that aren't displayed (like ).
I read the text from a TXT file created with the Notepad app.

I even tried with EASTEUROPE_CHARSET and UTF8 format. Nothing. I used Times New Roman (which has all the chars), but still nothing.
Could someone tell me, how I can display "language-specific" chars?

Thank you

PS.: pls do not ask me to create my own font :D

mikael_aronsson
07-23-2004, 04:42 AM
Some fonts may have up to 255 characters (or more), you can check the font metrics to find out the number of characters in the font.

If you can display text with the win32 api functions TextOut() or DrawText() then it will work just fine with OpenGL also, make sure it works in windows first so that you have the correct code page selected and so on.

Mikael