Sign in to follow this  

2d program text

This topic is 4309 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 writing a 2d program, which needs to display text on screen. The text should look sharp (like the font you are looking at right now), and if possible anti-aliased. I don't know how I should do it. I've already looked at the Nehe tutorials, but they don't seem to do what I need. I also tried using FTGL, but I think it is too complicated for what I need. Can anyone give me some advise ? Thanks in advance.

Share this post


Link to post
Share on other sites
Hi hannibar, The NeHe bitmap font tutorial should look sharp and clean when used in 2D (orthographic) mode. I use this for displaying frame per second, timer, and other information as an overlay. Try contrasting the text with the background more - something like plain white text on a darker background. Try playing around with some of the parameters that are passed to the CreateFont call. These can affect the font used, such as NONANTIALIASED_QUALITY compared to ANTIALIASED_QUALITY, and the width of the font being set to 0.5 or lower, and use FW_THIN as opposed to the default FW_BOLD on the font weight. There are dozens of them, so it might mean some research to find the combinations that look best for your application. Other than that, explain a little more on what it is your seeing that means it is not as crisp as you are expecting.

F451

[Edited by - Fahrenheit451 on March 1, 2006 5:00:00 PM]

Share this post


Link to post
Share on other sites
hannibar, are you enabling anything like, GL_LINE_SMOOTH or GL_SMOOTH (shade model), or like, GL_PERSPECTIVE_CORRECTION_HINT. One of those, or annother like it (can't remember which), will blur-ify your text and lines and everything else in the program, in order to make it appear more pleasant (which in this case isn't what you want).

Share this post


Link to post
Share on other sites

This topic is 4309 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this