QFontEngine: Avoid nesting multi-fontengines.
In case the platform plugin returns an instance of QFontEngineMulti (which happens on Windows). Change-Id: I87470e47cfe113557313b7f6b3b09d1455af1c17 Reviewed-on: http://codereview.qt.nokia.com/3319 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
This commit is contained in:
parent
1bf7fc2f1a
commit
889190cfc3
@ -156,7 +156,7 @@ QFontEngine *loadEngine(int script, const QFontDef &request,
|
|||||||
|
|
||||||
QFontEngine *engine = loadSingleEngine(script, request, foundry, style, size);
|
QFontEngine *engine = loadSingleEngine(script, request, foundry, style, size);
|
||||||
//make sure that the db has all fallback families
|
//make sure that the db has all fallback families
|
||||||
if (engine
|
if (engine && engine->type() != QFontEngine::Multi
|
||||||
&& !(request.styleStrategy & QFont::NoFontMerging) && !engine->symbol ) {
|
&& !(request.styleStrategy & QFont::NoFontMerging) && !engine->symbol ) {
|
||||||
|
|
||||||
if (family && !family->askedForFallback) {
|
if (family && !family->askedForFallback) {
|
||||||
|
@ -666,9 +666,11 @@ QFontEngineMultiQPA::QFontEngineMultiQPA(QFontEngine *fe, int _script, const QSt
|
|||||||
: QFontEngineMulti(fallbacks.size() + 1),
|
: QFontEngineMulti(fallbacks.size() + 1),
|
||||||
fallbackFamilies(fallbacks), script(_script)
|
fallbackFamilies(fallbacks), script(_script)
|
||||||
{
|
{
|
||||||
|
Q_ASSERT(fe && fe->type() != QFontEngine::Multi);
|
||||||
engines[0] = fe;
|
engines[0] = fe;
|
||||||
fe->ref.ref();
|
fe->ref.ref();
|
||||||
fontDef = engines[0]->fontDef;
|
fontDef = engines[0]->fontDef;
|
||||||
|
setObjectName(QStringLiteral("QFontEngineMultiQPA"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void QFontEngineMultiQPA::loadEngine(int at)
|
void QFontEngineMultiQPA::loadEngine(int at)
|
||||||
|
Loading…
Reference in New Issue
Block a user