Displaying Japanese text in OpenGL

I’m using wglUseBitmapFonts currently to draw text on my OpenGL window. But this function doesnot work properly for Japanese text. Can anyone please help me in this regard?

How can I show Japanese text in OpenGL. Can I do it with wglUseBitmapFonts efficiently or do I need some other function?

btw. Its a visualization tool so it needs to draw text in real time in interactive mode so it needs to be fast and efficient.

Have look at this:


They are using CreateFont. You can use different character sets here, like SHIFTJIS_CHARSET which will be your japanese.

Is the font installed on the users system? If you use only hiragana /katakana character set you could maybe make the bitmaps on your own with a paint program (should be about 40 characters each). But if you need kanji its too many.


Inorder to use the font currently used by the system, we can retrieve the codepage by the following function _getmbcp(). But,in OpenGl CreateFont expects the CharSet (ANSI_CHARSSET,GREEK_CHARSET etc). The codepage for Japanese font is 932 which is different from the SHIFTJIS_CHARSET. Is there a way i can retrieve the current character set of the system?