Font size - cell vc character

Hi Guys,

Working through Nehe’s tutorial on outline fonts at: http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=14

I notice he talks about font size based on character height vs cell. Can someone please explain this to me?

I ask because I tried changing his value for font size from -24 to -12 - but it didnt seem to make a difference??

-Al

take a look at this msdn page about createfont.
I don’t know exactly what it truly means, so i use glScale to get a bigger font, works just fine.

Hopefuly we(the NeheDev team) will find a better (and system independent) way of doing this when we rewrite the text tutorials.

Weird, because i have tried changing the font size, to both positive and negative values to try and get a smaller font - and nothing changes!!!

Any ideaS?

It could be that wglUseFontOutlines does not use that value at all

i use this before glCallLists
glScalef(sx,-sy,1);
glTranslatef((x/sx),-(y/sy),0.0f);
instead of
glTranslatef(-length/2,0.0f,0.0f);

sx and sy controls the size
x and y moves it around the screen

That worked - thanks. Would love to know why it doesnt work with the font size value?

-Al

Read the wglUseFontOutlines manual. :wink:
“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.”

Means the fontsize you used to create the logical font is ignored and any glyph’s OpenGL coordinates after wglUseFontOutlines are always in the range [0.0, 1.0].