Skip to main content
GameDev.net gamedev.net
🔒 Locked

raster font question

Started by hannibar Oct 17, 2005 at 3:02 PM 5 replies 1.2k views
Original Post
hannibar
hannibar
I have followed lesson 13 to print fonts on the screen. Everything works fine, except one thing. I want the fonts to be anti-aliased. I have already done a search on this forum, but I didn't find a solution. Can anyone help me ? Thanks in advance btw : I know about other solutions like textured fonts etc, but I really want to use these raster fonts.
llvllatrix
llvllatrix
http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=21
http://www.gamedev.net/reference/count.asp?LinkID=993

Cheers,
- llvllatrix
hannibar
hannibar
Thanks for the links you gave, but they don't help me.
llvllatrix
llvllatrix
I just took a quick glance at lesson 13. Do a text search on the lesson for the
ANTIALIASED_QUALITY parameter. This makes windows anti-alias the fonts when they're generated. As far as I can tell however, these are also raster (hence the call to glRasterPos2f) based fonts. The last time I took a good look at lesson 13 was about 4 years ago, correct me if i'm wrong.

If you want to use a vector based font system you need to use the fonts described in:
http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=14
If you want to control the anti-aliasing using this font system, you can use the anti-aliasing approach described in:
http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=21
and on page 181 of the red book:
http://www.gamedev.net/reference/count.asp?LinkID=993

Cheers,
- llvllatrix
hannibar
hannibar
I have set the parameter to ANTIALIASED_QUALITY. So that can't be the problem. But it leads to the question : can these rasters have another colour than black & white?
llvllatrix
llvllatrix
I dont think we're communicating correctly. Can you describe your problem in more detail?

Cheers,
- llvllatrix
hannibar
hannibar
Hmmm, my problem was that I want to render rasterfont anti-aliased.

But looking at the red book, it says that each pixel in such a raster has either a 1 or a 0 value. not 0.238 for example. So there isn't straightforward way to make anti-aliased fonts with them. Is this correct ?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.