Actually make QT_MAX_CACHED_GLYPH_SIZE the max glyph size

This effectively means we'll start drawing text with a pixel size
of 64 using cached glyphs, whereas before we would treat this as
the cutoff and draw it using painter paths.

Change-Id: Ie58212ef9217c8f8a69a92e48a8788f191b99415
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
This commit is contained in:
Tor Arne Vestbø 2018-12-05 17:17:49 +01:00
parent 986e49992c
commit db0616097f
2 changed files with 2 additions and 2 deletions

View File

@ -1100,7 +1100,7 @@ bool QPaintEngineEx::shouldDrawCachedGlyphs(QFontEngine *fontEngine, const QTran
}(), 2);
qreal pixelSize = fontEngine->fontDef.pixelSize;
return (pixelSize * pixelSize * qAbs(m.determinant())) < maxCachedGlyphSizeSquared;
return (pixelSize * pixelSize * qAbs(m.determinant())) <= maxCachedGlyphSizeSquared;
}
QT_END_NAMESPACE

View File

@ -1556,7 +1556,7 @@ QFontEngineFT::QGlyphSet *QFontEngineFT::loadGlyphSet(const QTransform &matrix)
gs = &transformedGlyphSets[0];
gs->clear();
gs->transformationMatrix = m;
gs->outline_drawing = fontDef.pixelSize * fontDef.pixelSize * qAbs(matrix.det()) >= QT_MAX_CACHED_GLYPH_SIZE * QT_MAX_CACHED_GLYPH_SIZE;
gs->outline_drawing = fontDef.pixelSize * fontDef.pixelSize * qAbs(matrix.det()) > QT_MAX_CACHED_GLYPH_SIZE * QT_MAX_CACHED_GLYPH_SIZE;
}
Q_ASSERT(gs != 0);