PDA

View Full Version : Very LARGE Stroke fonts



03-25-2005, 01:51 AM
I don't know if this is supposed to happen or if it is something I did, but I am trying to use a stroke font in one of my games and the letters are huge! They are like 200 pixels wide! Here is the code that I use to draw my characters

void renderBitmapString(float x,float y,float z,char *string) {
char *c;
glPushMatrix();
glTranslatef(x, y,z);
for (c=string; *c != '\0'; c++) {
glutStrokeCharacter(GLUT_STROKE_ROMAN, *c);
}
glPopMatrix();
}

I don't use a scaling function at all until I get to the point where I use this(I put it in to shrink the text). I also am not using any frustrum or perspective matrix.

Thanks in advance for the help :)

jide
03-25-2005, 02:07 AM
I don't know for stroke fonts under glut, but you can try bitmaps instead (you can pass the size, cf glut.h).

You should print text on the projection matrix, not the modelview matrix. Also use glRasterPos instead of glTranslate to localize your text position.

Hope this helps.

03-25-2005, 02:10 AM
I usualy use bitmap fonts but in this program I needed something that I could make bigger(just not this big)