开发者

Printing a non-english language in WGL

开发者 https://www.devze.com 2023-04-05 15:05 出处:网络
I want to print out words in languages other then english (such as russian and german) while using WGL.

I want to print out words in languages other then english (such as russian and german) while using WGL.

I use the same technique that was described in http://nehe.gamedev.net/tutorial/bitmap_fonts/17002/ for printing english, but the same technique is not useful when using russian, it simply does'nt print the russian letters, only numbers.

Is there a possible solution?

SOLVED

Solved by changing

    base = glGenLists(96);
...
    wglUseFontBitmaps(hDC, 32, 96开发者_如何学Go, base );

to

   base = glGenLists(1600);
...
    wglUseFontBitmaps(hDC, 32, 1600, base );


The function CreateFont specify a different character set identifier than ANSI_CHARSET in your case it should probably be RUSSIAN_CHARSET

0

精彩评论

暂无评论...
验证码 换一张
取 消