Open asarium opened 9 years ago
A better solution might be to round the text position instead.
But... even bette rsolution would be to update font stash to use the latest stb_truetype
, and use the oversampled text, and remove the pixel snapping completely.
I'm super tight on time, but if you don't mind the challenge, I can help you to get it done.
I updated the stb_truetype
version and fixed some minor issues (needed a new #include
and more memory).
I'm not sure if I can get oversampling to work but I'll see what I can do.
The documentation notes that
nvgText
snaps glyphs to pixel boundaries but when the current transform applies non-integer scaling (or translation) then text will be blurry as the glyphs are not aligned with the pixel grid.To fix this the vertices in
nvgText
need to be rounded but then the pixel snapping infontstash.h
is pretty worthless so it might be a good idea to remove that and just round the resulting vertices.I'm not sure if this is the correct solution for this problem so I created a new issue instead of a pull request.
Also, thank you very much for creating this project :smile: