2d program text

Started by
1 comment, last by Omega147 18 years, 1 month ago
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.
Advertisement
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]
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).

This topic is closed to new replies.

Advertisement