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:
parent
986e49992c
commit
db0616097f
@ -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
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user