Keep font sharp after using transformatrix to support multi-resolution

I’m using this “ResolutionBuddy” that creates a transform matrix to easily have your game run perfectly on multiple screen resolutions.
it’s Base on code from david-amador.com (XNA 2D Independent Resolution Rendering | David Amador)

However the downside is that some of the text is not looking as sharp anymore, and I’m wondering if there’s anything to do about it, or if there are some tips, without the need of me having to do something much more difficult to support multi-resolution. (my game is a PC game that can/will be run at different resolutions and I want to support most common 16:9 and 16:10 resolutions)

When running on lower res
keepallinfront

Normal:
normalAllInFront

(I’m using the default drawstring with a spritefont)

Some texts are even cutoff at the bottom (I believe this is because of placement not on ‘whole’ pixels of the screen? I had it on normal resolution as well when position was like 5.789798f instead of 6f)

Check the bottom of the number/text being cutoff a tiny bit (most easy to see on the ‘9’)
tofinish

You could use FontStashSharp. For example: https://github.com/rds1983/FontStashSharp/wiki/How-To-Make-Fonts-Sharper-And-Better-At-Scaling.

Alternatively, you could use a msdf font. Neo does that: showcase.

4 Likes

For alternative options to spritebatch with draw string you could look in this thread here

Thank you mate, this is working like a charm!