PDA

View Full Version : How do i make Outline Fonts bigger



rhs
03-28-2002, 11:17 PM
I would like to make bigger or smaller fonts. But when I mak the -12 -4 or -72 I dont see the diference. what am i doing wrong? The code below is from nehe tutorials lesson 14


font = CreateFont( -12, // Height Of Font
0, // Width Of Font
0, // Angle Of Escapement
0, // Orientation Angle
FW_BOLD, // Font Weight
FALSE, // Italic
FALSE, // Underline
FALSE, // Strikeout
ANSI_CHARSET, // Character Set Identifier
OUT_TT_PRECIS, // Output Precision
CLIP_DEFAULT_PRECIS, // Clipping Precision
ANTIALIASED_QUALITY, // Output Quality
FF_DONTCARE|DEFAULT_PITCH, // Family And Pitch
"Comic Sans MS"); // Font Name

SelectObject(hDC, font); // Selects The Font We Created

wglUseFontOutlines( hDC, // Select The Current DC
0, // Starting Character
255, // Number Of Display Lists To Build
base, // Starting Display Lists
0.0f, // Deviation From The True Outlines
0.2f, // Font Thickness In The Z Direction
WGL_FONT_POLYGONS, // Use Polygons, Not Lines
gmf); // Address Of Buffer To Recieve Data
}


[This message has been edited by rhs (edited 03-29-2002).]

mikael_aronsson
03-29-2002, 05:02 PM
Hi !

An outline font is created as line strips or triangles, so you scale it when you render it in OpenGL with glScale, the size of the original font has nothing to do with the size when you render it in OpenGL

Mikael

rhs
04-01-2002, 08:52 PM
Hey mikael

the command worked perfectly

thx