Use FreeType on Windows with Qt5
freetype, qt5, windows
Solution
When looking at the solution proposed by DeadWarlock I studied the Qt source code and realized that QWindowsFontDatabaseFT is created and used when `d->m_options & QWindowsIntegration::FontDatabaseFreeType` is `true`. After a bit of googling I found out that turning this option on is officially documented in Qt. The option can be turned on by creating file `qt.conf`. The file must be located in the directory containing the application executable and must contain following content:
[Platforms]
WindowsArguments = fontengine=freetype
After doing this I got freetype rendering without recompiling of Qt.
Problem
Does anyone know if it's possible to build Qt5 with FreeType as the text renderer on Windows instead of the native one? I tried compiling Qt5 with -qt-freetype but I still get bad text. Do I have to do something else?