View Full Version : Font display problem
06-12-2004, 05:03 PM
can opengl display Chinese character font ?
thanks for directions
06-12-2004, 06:11 PM
OpenGL doesn't display fonts.
Or, alternatively, OpenGL can display any font you program it to.
06-13-2004, 10:55 AM
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.
Powered by vBulletin® Version 4.2.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.