Opengl Fonts Centered Text?

Started by
1 comment, last by kburkhart84 18 years ago
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?
Black Sky A Star Control 2/Elite like game
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.

"Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety." --Benjamin Franklin

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.


This topic is closed to new replies.

Advertisement