summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorJiang Jiang <jiang.jiang@nokia.com>2011-06-20 13:47:01 +0200
committerQt by Nokia <qt-info@nokia.com>2011-06-22 11:01:00 +0200
commit6ebb60158d83099f7a5c6a643b709424e34077cf (patch)
tree40dfa22d57bb7ed828e310e9c32c4267fbf08f5b /src/network
parente01ce920e4a99edad31d2e6115a15d3b5afa2f26 (diff)
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 Change-Id: I2e4dbbe7f448e81850176732b4a65028f2b912fa Reviewed-by: Eskil Reviewed-on: http://codereview.qt.nokia.com/579 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
Diffstat (limited to 'src/network')
0 files changed, 0 insertions, 0 deletions