Keep Multi font engine in QFontCache
authorJiang Jiang <jiang.jiang@nokia.com>
Tue, 18 Oct 2011 13:11:07 +0000 (15:11 +0200)
committerQt by Nokia <qt-info@nokia.com>
Mon, 24 Oct 2011 09:04:04 +0000 (11:04 +0200)
commit8c13b6b21fcf71893c1cf24c05dd4a576ee43490
tree6bbca0299b2fe69bb7da210b9059bf1ff01e0e1a
parent31d6ac13867957218fc9a974518b80e3e2d4742b
Keep Multi font engine in QFontCache

If we only keep single QFontEngineFT in QFontCache, then when we
are looking for the MultiQPA next time with the same QFontDef,
the FT engine will be returned and we get no font fallback support.
That's why we need to keep the Multi engines in QFontCache as well
and distinguish them from the single item. Since QPA doesn't use
'screen' field of QFontCache::Key structure, we use it here to
indicate that we are caching a multi font engine.

Change-Id: Id899d5c5ba52f4bccf134bcd6b1c6386ba22063c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
src/gui/text/qfontdatabase.h
src/gui/text/qfontdatabase_qpa.cpp
src/gui/text/qfontengine_qpa.cpp