PDA

View Full Version : Resizing text issue



01-22-2004, 07:10 AM
How do I resize the text in my program? I have tried changing the values in the function as well as calling GlScalef before rendering but neither work.

outputString ( float x, float y, char *string )
{
int length;
length = strlen ( string );
glRasterPos2f ( x, y );
for (int i = 0; i < length; i++ )

glutBitmapCharacter (GLUT_BITMAP_9_BY_15, string[i] );
}

dorbie
01-22-2004, 12:18 PM
These bitmap characters will not scale with scale commands because they are drawn as pixel blits.

You could try a stroke font or use a texture font in another library.

have a read at this:
http://www.opengl.org/resources/features/fontsurvey/

nexusone
01-23-2004, 05:00 AM
The glut Bitmap fonts are set size and can not be changed other then by changing the font used.

You have to following options for size with glut:

GLUT_BITMAP_8_BY_13
GLUT_BITMAP_9_BY_15
GLUT_BITMAP_TIMES_ROMAN_10
GLUT_BITMAP_TIMES_ROMAN_24
GLUT_BITMAP_HELVETICA_10
GLUT_BITMAP_HELVETICA_12
GLUT_BITMAP_HELVETICA_18

Where then number at the end is Font size