PDA

View Full Version : font size in wglUseFontOutlines



xargon
12-18-2005, 07:45 AM
Hello everyone,

I am using wglUseFontOutlines function call to render fonts to an OpenGL screen.

Now, wglUseFontOutlines renders the font polygons with a certain height and width. Now, I need to control these parameters. I know I can use glScalef to scale these polygons. But what I want to do is render these polygons with a fixed width and height. Is it possible to specify the actual width and height rather than a scaling factor.

Alternatively, is it possible to find the initial width and height that wglUseFontOutlines function uses to create the font polygons?

Thanks and cheers,
xargy

mikael_aronsson
12-18-2005, 10:44 PM
Hi !

The font use the same metrics as GDI uses (but scale it to 1.0), so you can always get the font metrics from the GDI functions.

MSDN quote:


The run of glyphs begins with the first glyph of the font of the specified device context. The em square size of the font, the notional grid size of the original font outline from which the font is fitted, is mapped to 1.0 in the x- and y-coordinates in the display lists. The extrusion parameter sets how much depth the font has in the z direction.