Jump to content
  • Advertisement
Sign in to follow this  
TTK-Bandit

Bitmapped Font artifacts

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

hey I get some artifacts when drawing small bitmapped fonts at a position that is not an exact pixel coordinate. For example when x is 50.23 while drawing a string. This happens, when I center align the text I found that I can just round the x/y positions and the problem is gone, but is there any nicer solution ?

Share this post


Link to post
Share on other sites
Advertisement
About what outline effects you are saying? :) You said that you use BITMAPPED fonts.
If I correct, and you use blending functions when drawing bitmap with raster position that is not an exact pixel coordinate, then you get blurring artifacts. It is not realy artifacts, it is how blending works :). but if you dont want this blurring, then the only way to archive that is to specify exact pixel coordinate.

Share this post


Link to post
Share on other sites
I would just round them, if you're using solid pixels with alpha its going to look a little wierd when a narrow line crosses a pixel boundary if you don't. The user is never going to notice that the text is 1/3 of a pixel off center, and its the solution that already works, no use spending time on a different solution.

There are methods to get sub-pixel accuracy for text (or other high-contrast) rasterization, but you'd have to write a shader for it.

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!