font size

I am using the font outline example form NeHe’s tutorial, but when I generate the font in the opengl screen, it is never big enough, no matter what size I set it to, it stays the same size. What am I doing wrong? here is some code:

Build font:
HFONT font;
base = glGenLists(256);
font = CreateFont(-20,10,0,0,FW_BOLD,FALSE,FALSE,FALSE,ANSI_CHARSET,OUT_TT_PRECIS,
CLIP_DEFAULT_PRECIS,ANTIALIASED_QUALITY,
FF_DONTCARE|DEFAULT_PITCH,“Comic Sans MS”);
SelectObject(*hDC,font);
wglUseFontOutlines(*hDC,0,255,base,0.0f,0.2f,WGL_FONT_POLYGONS,gmf);

Example call for output
glCallLists(strlen(str),GL_UNSIGNED_BYTE, str);

Try scaling it (glScale)

Originally posted by V-man:
Try scaling it (glScale)

You cannot scale bitmap font.

Try to use this code, then if it work You modify it to wglFontOutlines:

int CreateFontBitmaps(HDC hdc, char* fontname, int height, int weight, DWORD italic)
{
int base;
HFONT font;

if ((base = glGenLists(256)) == 0) return 0;

font = CreateFont(height, 0, 0, 0, weight, italic, false, false,
ANSI_CHARSET, OUT_TT_PRECIS, CLIP_DEFAULT_PRECIS, ANTIALIASED_QUALITY,
FF_DONTCARE| |DEFAULT_PITCH, fontname);

SelectObject(hdc, font);
wglUseFontBitmaps(hdc, 32, 256, base);
return base;
}

[This message has been edited by glYaro (edited 07-12-2003).]

[This message has been edited by glYaro (edited 07-12-2003).]

thanks, the glscale worked like a charm