SDF vs bitmap low font size & BUG

When you get to a low font size (actually typical non-4k desktop size) like 14 the text seems generally to be a bit too blurry. (Using Roboto currently)
If I use a smooth bitmap font it looks a lot sharper. But that will only look good at the size it is generated.

So is there some solution to this - an SDF font that does something different at low resolutions to improve the look - extra pixel hinting or dynamically generating bitmap characters?
Then you can have 1 font with SDF but still very sharp when small.

6245926--688051--tmp2.png

Edit: There actually seems to be a bug with rendering the bitmap text as if the game window size is an odd number (w/h), as it can be in the editor, then the bitmap text is blurred - seems like it pixel snaps but gets it wrong in that instance

At small point size, the SDF should render the same as the bitmap smooth. Perhaps there is an SDF scale issue there which could happen when using a Canvas Scaler.

It is also possible to adjust the sharpness of the SDF in the debug section of the material inspector.

I have seen reports of odd screen size causing issues. I would recommend avoiding using odd screen sizes.

My canvas is your basic constant pixel size in screen space.
I do not think it is possible to match SDF quality to bitmap at low sizes - bitmap is crisply rendered for the size and pixel-snapped on drawing. SDF is a bit variable in its appearance though a little extra sharpness is a minor help.

Odd sizes may not be used often at runtime often, but are very easily used in the editor so I really think it needs fixing.

Hinted Raster at small size with pixel snapping will indeed be better than SDF.

SDF and bitmap smooth should render about the same at small point size where you can further tweak the SDF with the sharpness slider in the debug section of the material inspector.

There are definite issues with odd sizes but these are not specific to TMP and I have a few internal messages about these types of issues.

1 Like

They are specific to TMP text vs Unity text as theirs snaps to pixels correctly at odd sizes