Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Freetype can render almost indistinguishably from OSX post-Retina.

Set `FREETYPE_PROPERTIES="cff:no-stem-darkening=0 autofitter:no-stem-darkening=0"`, and then also enable (S)light hinting on LoDPI, or None on HiDPI. Also, disable subpixel and use greyscale only.

OSX looks the way it does because they use excessive stem darkening combined with incorrect gamma blending. GDI, WPF/UWP/WinUI, most ClearType/DirectWrite consumers, GTK, and most browsers also do incorrect gamma blending as well.

Qt is the exception. It enables stem darkening by default, but then uses correct gamma blending. Unfortunately, this is the objectively correct way of rendering, everyone else is doing it wrong.

The only thing you can't do is OSX gamma blends incorrectly for 1.8 on a 2.2-2.4 screen. Everyone else blends incorrectly for sRGB/2.2 on a 2.2-2.4 screen. Light on dark's obscene behavior on OSX shouldn't be replicated.

If you want the opposite, and make it look like Windows, force stem darkening off (use the above env, but set both to 1), and set hinting to Full to make it look like pre-Cleartype, or Medium to make it look like DirectWrite.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: