#Can't apply tex filters to fonts correctly

9 messages · Page 1 of 1 (latest)

snow talon
#

I'm trying to use a custom ttf with different sizes. I loaded the font at a large size of 256px so I can scale it as needed. To ensure smooth rendering, I generated mipmaps for the font texture and applied a trilinear filter (check the code on de image)
However, I have an issue where the borders of the glyphs appears bugged after the filter is applied (see attached screenshots). Any ideas?

setup:
c++ and raylib 5.0 on x64 linux. fonts used are Jura and Dosis static ttf from Google Fonts.

plain jay
#

it's best to load your font at the size you draw it at.

#

any scaling will introduce artificats

#

and filtering won't solve them

snow talon
#

oh ok, I'll do that

#

Thanks 🙂

snow talon
#

after some tests, changing quality to 128px gives me no artifacts 💯

plain jay
#

The more you scale the more chance you have for artifacts