Jump to content
  • Advertisement
Sign in to follow this  
ViperG

OpenGL Opengl Fonts Centered Text?

This topic is 4497 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

I'm using the opengl fonts wglUseFontBitmaps(hDC, 32, 96, base[0]); Anyways, im trying to think of a way to make this text centered so I dont have to manually do it my self. But I cant think of a simple way to do it since its using variable letter spacing... any ideas?

Share this post


Link to post
Share on other sites
Advertisement
Have you looked at nehe.gamedev.net yet to see his font lessons? This might help you. It's been a few years since I've looked them over but seems no one has replied to you yet.

Share this post


Link to post
Share on other sites
If you were using outlines instead of bitmaps, you could use the values in the gmf structures for each letter. Check out NEHE's tutorial, as it shows how to center the fonts as well.

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!