summaryrefslogtreecommitdiff
path: root/doc/src/snippets/code/src_script_qscriptvalueiterator.cpp
diff options
context:
space:
mode:
authorJiang Jiang <jiang.jiang@nokia.com>2011-06-20 13:47:01 +0200
committerJiang Jiang <jiang.jiang@nokia.com>2011-06-20 14:25:51 +0200
commit429f0507a68f4aa686449308af770ce5cf2c913f (patch)
treead11f8b6836733ad85efdba90bb8efec70c02c68 /doc/src/snippets/code/src_script_qscriptvalueiterator.cpp
parentcb760eaef631abd49836ae5c8dc12a61ef5eff0d (diff)
downloadqt4-tools-429f0507a68f4aa686449308af770ce5cf2c913f.tar.gz
Fix fontconfig usage in X11 font database
We should do FcConfigSubstitute(0, pattern, FcMatchFont) on a FcPattern for query because the family list in it will contain almost all the families after FcConfigSubstitute(0, pattern, FcMatchPattern), then the test in <match target="font"> will almost always succeed. In general, FcMatchFont substitute should only be done on the FcPattern that we got after FcFontMatch() or FcFontRenderPrepare(). Based on the suggestion of fontconfig author Behdad Esfahbod, this patch reorganized the tryPatternLoad logic so that it only does the QFontEngine creation part, FcPattern *match is retrieved outside of that function. In this way, the match pattern we got can be either from FcFontMatch() or after FcFontRenderPrepare() on one of the fonts we got from qt_fontSetForPattern(). Then we don't need to duplicate the pattern and add all criterias back with qt_addPatternProps(). It not only simplified the code a lot but also fix the way we apply FcMatchFont substitution. This substitution will either be done by FcFontMatch() or FcFontRenderPrepare, both implicitly. Task-number: QTBUG-2148, QTBUG-19947 Reviewed-by: Eskil
Diffstat (limited to 'doc/src/snippets/code/src_script_qscriptvalueiterator.cpp')
0 files changed, 0 insertions, 0 deletions