defold
defold copied to clipboard
Blurry distance field font in html5
A user reported that they distance field font is crisp and easy to read when building for desktop, but as soon as the project is built or bundled for html5 the font gets very blurry:
HTML5:
Desktop (macOS):
Attached sample project.
@britzl This is scale down issue https://github.com/defold/defold/issues/5876
Should work fine with High DPI (it is off in example)
I forgot to set high dpi within the test project, am sorry.
Here is some extra information:
It also happens to a project where highdpi is enabled
window.devicePixelRatio (as promised)
I found that our sdf renderer uses sdf_world_scale when calculating sdf_smoothing , but to avoid issues screen space scale should be used.
This is the reason of issues like this and https://github.com/defold/defold/issues/9568
and maybe even https://github.com/defold/defold/issues/9560