Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Poor font rendering on Windows compared to Linux



  • Hello.

    I am developing cross-platform (with QtWidgets for MacOS/Linux/Windows) application which is using Open Sans as main program font and Font Awesome for icons. I was developing on Linux and haven't noticed anything out of the ordinary. However, recently I was testing Windows build and noticed that our Light style fonts (both Open Sans and Font Awesome) looks bad compared to Linux/MacOS builds.

    I tried to Google my problem but I am having trouble constructing accurate sentences to see if anyone has experienced same problem.

    Here are couple of screenshots with minimal example. Is there anything I can do to improve rendering of at least icons? To render them we're using this mini library: https://github.com/dridk/QFontIcon.

    Windows Linux
    Screenshot from 2020-02-16 16-12-08.png Screenshot from 2020-02-16 16-11-09.png


  • Font management is one of those things that is a PITA. It is complicated by several factors:

    1. the particular font engine being used to generate the on-screen rasters
    2. the type of font: bitmap vs stroke
    3. copyright and patent issues
    4. i18n (internationalization)

    It is not uncommon to notice the kind of problem you are seeing, however, it is usually the linux side that has worse rendering, especially where true-type fonts are concerned. The reason being that adobe true-type was a proprietary technology and could be distributed as closed-source in windoze, where it was somewhat "reverse engineered" in linux.

    My only advice is that you are going to have to do real research to get it to where you are happy with the results.



  • I see, thanks for the response.

    I stumbled today on an old thread where user wanted the same font rendering as in Photoshop. One of person responding said that they made their own wrapper of FreeType. I guess I will try to render icons using that and see where it goes.

    Not gonna mark it as solved for now though, maybe someone will stumble on it with some experience.