Bitmapped Font artifacts

Started by
4 comments, last by TTK-Bandit 14 years, 10 months ago
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 ?
Advertisement
what kind of aritifacts do you have?
Do you use some blending functions? If so try to disable blending.
I use the alphachannel to make the transparency, and also outline effects.
Can't just disable them, need them.
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.
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.

throw table_exception("(? ???)? ? ???");

ecco: ywah, thats the effect i'm getting.
I'll just round'em then.
Thanks.

This topic is closed to new replies.

Advertisement