Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: Displaying Japanese text in OpenGL

  1. #1
    Junior Member Newbie
    Join Date
    Dec 2003
    Location
    Islamabad, Pakistan
    Posts
    7

    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.
    I play... therefore I am!

  2. #2
    Member Regular Contributor
    Join Date
    Jul 2000
    Location
    Augsburg, Germany
    Posts
    334

    Re: Displaying Japanese text in OpenGL

    Have look at this:

    http://nehe.gamedev.net/data/lessons....asp?lesson=13

    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.

    Frank.

  3. #3
    Junior Member Newbie
    Join Date
    Sep 2004
    Location
    Bangalore
    Posts
    15

    Re: Displaying Japanese text in OpenGL

    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?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •