-
-
Notifications
You must be signed in to change notification settings - Fork 416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTML5 text artifacts for pixel fonts #2568
Comments
I'm not sure but; I guess while OpenFL draws better on high resolution screens; It draws worse on low resolution screens. |
Are you sure the problem is not the font? |
Yes, it's like that with every font |
Also, something to note - when resizing the page in the browser, the texts resolution stays the same - the means upscaling the page will make text look really low quality. Thought I'll mention this because it might be related to the same problem |
Yes, I've tried a couple different pixel fonts and they all exhibit the problem with the Here are the results for different The minimum scale that smooths out scaling artifacts for blocky fonts is a value of I think allowing the user to pass a compiler flag, something like
With this code, adding the define Does this sound like an acceptable fix or should we go a different direction? |
Just wondering - after a window resize, is the text still crisp? (resizes with |
The main issue with text specifically is that the actual graphic texture is being stretched out and when relying on Chromium's renderer, it creates a streaking effect on either side of the text. You can see the problem happening here as well: https://community.openfl.org/t/html5-blurry-font-issue/12712 |
Pixel fonts render with artifacts around the edges of text for devices with high pixel ratios and also for Chromium-based browsers. This compiler flag forces a 3x pixel ratio, eliminating the ghosting effect on both sides of text. Fixes openfl#2568 , which has more information on the issue.
When targeting HTML5, there are artifacts around zoomed-in text, but only on some devices. I've updated to the latest files from this repository and the issue persists.
https://community.openfl.org/t/html5-text-artifacts/13514
https://community.openfl.org/t/html5-blurry-font-issue/12712
One one computer, the text renders normally:
On another computer, it renders with visual noise:
It may have to do with HiDPI settings (values > 1) and possibly for just pixel fonts, but I am uncertain. I'm willing to test any changes or suggestions!
The text was updated successfully, but these errors were encountered: