Make font hinting and antialiasing size dependent when using FontConfig

Add the pixel size of the font to the search pattern to get size dependent
font settings. This patch allows to take into account KDE settings for
font sizes which should be excluded from antialiasing.

Change-Id: I8bd8b7b3d585009d0a39db631cd02b7970537f5c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
This commit is contained in:
Alexander Volkov 2014-10-02 17:57:42 +04:00
parent 06e706bdbb
commit 4de382f4a2

View File

@ -845,6 +845,9 @@ void QFontconfigDatabase::setupFontEngine(QFontEngineFT *engine, const QFontDef
FcPatternAdd(pattern,FC_INDEX,value,true);
}
if (fontDef.pixelSize > 0.1)
FcPatternAddDouble(pattern, FC_PIXEL_SIZE, fontDef.pixelSize);
FcResult result;
FcConfigSubstitute(0, pattern, FcMatchPattern);