Jump to content
  • Advertisement
Sign in to follow this  
rikardo

OpenGL Use fonts

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

Hi there! Since OpenGL does't have any integrated support for printing text on the screen. I just want to ask, which way do you think is the best in order to use fonts. I've tried bitmaps and these are good because they are pretty simple to create and use but they cannot be antialised so they stay pretty ugly. Textures is a little more to do in order to make it work but I they suck pretty much since they becomes very ugly when scaling them. If you have any other technique that could be used, please tell me!

Share this post


Link to post
Share on other sites
Advertisement
See NeHe's tutorials for some good font tutorials.

There is also an application, called BitMap Font Builder (LMNOPC.com)
that creates smooth anti-aliased fonts, that is used with these tutprials.

[wink]

Share this post


Link to post
Share on other sites
Sure NEHE has a very good tutorial, but that one is concetrating on WINAPI. I rather want a system independent font implementation.

Share this post


Link to post
Share on other sites
check out freetype. i am currently using it to render a font to a texture, which i then cut up and arrange to display text in opengl. it also gets you some other typographical data from the font files (i.e. kerning information and glyph metrics and such).

the textures still don't scale wonderfully but you can have it render another texture for another font size and use the appropriate one (or use a larger texture and put more than one size font on the same texture, then it is simply a matter of using the right texture coordinates).

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!