Support specifying fallbacks in font request on QPA
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Thu, 10 May 2012 14:50:33 +0000 (16:50 +0200)
committerQt by Nokia <qt-info@nokia.com>
Wed, 16 May 2012 02:24:58 +0000 (04:24 +0200)
commit4959e6af8e5b8d6dbf677fcd0802e4dc43083308
tree8ca30874ac4c426350771dbd76bae73c66980ce8
parentba300f42bdbf1e033616ee8a8054d84613b55aca
Support specifying fallbacks in font request on QPA

Because the QPA font database would query fallback families inside
findFont(), support for requesting multiple font families in order
of preference (like QFont("Times New Roman, Arial")) did not work,
because the Arial fallback was never attempted. To fix this, we
pass in the queried fallbacks and make sure they are tried before
any platform specific fallbacks.

Task-number: QTBUG-20986
Change-Id: Idb2b717856f013ce2874f00a8debaff60176d2fc
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
src/gui/text/qfont_p.h
src/gui/text/qfontdatabase_qpa.cpp
tests/auto/gui/text/qcssparser/tst_qcssparser.cpp