Blurry (fizzy) font rendering

308 views
Skip to first unread message

WSK

unread,
Feb 4, 2022, 11:50:42 AM2/4/22
to skia-discuss
Hello. I would like to ask if there are any ways to change the degree of blurring of fonts? I'm using chromium and I've tried increasing the SK_GAMMA_CONTRAST and SK_GAMMA_EXPONENT parameters, but it doesn't bring the desired effect like enabling gdi. Is there anything else I can do?Compare.png

bungeman

unread,
Feb 4, 2022, 12:30:16 PM2/4/22
to skia-discuss
This depends greatly on which platform you are on. (Also, mucking with the GAMMA constants isn't going to do what you want, as you have discovered.) On Linux you can just set the appropriate environment variables and FreeType will use the v35 TT hinter and , with the appropriate hinting setting in Skia will produce something that looks a lot like GDI did. If you're on Mac, well, then you'd need to use FreeType. If you're on Windows, you can use the FreeType backend and build in your own FreeType as well, or you could use the (still existing but not well supported) GDI back-end in Skia. In theory it would be possible to modify the DirectWrite port in Skia to always try to look as much like GDI as possible, but that isn't a priority for anyone working on Skia. If you're just referring to the Chrome UI (judging by the screen captures here) then this just isn't going to happen unless you can convince Chromium they want this. If you're looking for highest contrast, it may be possible on Windows still to turn off font antialiasing. In theory Chrome should still respect this (though I haven't checked in a while) and give very high contrast but rather pixelated text.

WSK

unread,
Mar 14, 2022, 11:17:08 AM3/14/22
to skia-discuss
Thanks for the detailed answer! I am using windows. I looked at the source code of the browser and asked a question about using freetype in the chromium-dev group.

пятница, 4 февраля 2022 г. в 20:30:16 UTC+3, bungeman:
Reply all
Reply to author
Forward
0 new messages