• Advertisement
Sign in to follow this  

Problem with spaces in fonts

This topic is 4525 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Is there something special you need to do to get bitmap fonts to use spaces? I truncates all the spaces for me and its getting really annoying thanks for any help [grin] O btw here is my little text function that I use void Text(char* Text, int X, int Y) { glRasterPos2i(X,Y); glPushAttrib(GL_LIST_BIT); glListBase(base - 32); glCallLists((int)strlen(Text), GL_UNSIGNED_BYTE, Text); glPopAttrib(); }; It looks like it should work but maybe im setting one of the text flags wrong in creation...

Share this post


Link to post
Share on other sites
Advertisement
Space is char 32, so I think with this code you will get a list id of zero, which is an invalid GL list id...

Share this post


Link to post
Share on other sites
I use the same idea for text. I recommend creating all 256 characters instead of 96 like in NEHE's tutorials. Then you don't have to set the list base back 32, and the list should be correctly included for the "space" character.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement