I have a setup where I'm rendering a bunch of characters on a canvas with an SDF font. The users can zoom in to see the details of the smaller texts, but currently the smaller characters are quite pixelated. (See the image below.) I'm looking for an approach to improve their quality.
Based on these comments I believe SDF fonts are not really good for small text rendering:
I'm wondering if there's any viable workaround. For example, would it make sense to somehow reuse the larger characters by rendering them in a separate texture and scaling them down? Because when I zoom out, the larger characters look a lot better as they get smaller, I believe the problem might be that the SDF font cannot be interpolated on a too small scale.
My setup is based on these resources:
- https://github.com/libgdx/libgdx/wiki/Distance-field-fonts
- https://github.com/SaschaWillems/Vulkan/blob/master/examples/distancefieldfonts/distancefieldfonts.cpp
I've already tried generating mipmaps which didn't really make any difference.