PDA

View Full Version : Font Size



Rong Yao
11-19-2003, 02:09 PM
I create a LOGFONT object. After initialization, I create a font handle using
CreateFontIndirect. Then I select the font handle into device context. After that, I use wglUseFontOutlines to "draw" fonts in OpenGL. My question is: how can I know the size of the fonts in OpenGL unit?

mikael_aronsson
11-20-2003, 02:24 AM
GetTextMetrics() will give you information about the selected font, I am not sure if wgl maps the size 1:1 in OpenGL but I would guess it does.

Mikael

Rong Yao
12-12-2003, 05:29 AM
It looks like wgl does not map the size 1:1 if there is no problem with my program. Anyone has every tried this?

Another related question: can we get the font size in pixels?