Font display problem

can opengl display Chinese character font ?

thanks for directions

OpenGL doesn’t display fonts.

Or, alternatively, OpenGL can display any font you program it to.

Since font specs vary they are handled separately from core OpenGL spec which would expect that font glyphs be loaded into GL rendering contexts as 1-bpp bitmaps.

For Win32, there are WGL helper functions wglUseFontBitmaps() and wglUseFontOutines() to download such fonts as GL bitmaps which would be used for drawing text characters. Once the font is loaded, you would draw individual characters or strings of characters just like you would call alphabetically indexed display lists of glBitmaps.

If you’ve seen the Windows OpenGL Text3D screen saver, you could also see how font outlines can be used as extruded 3D objects. The source is part of the Win32 platform SDK if you’re intereted, though a similar generic version is posted as one of GL programming examples at this site.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.