diff options
author | Aleksandar Stojiljkovic <aleksandar.stojiljkovic@nokia.com> | 2011-09-08 09:00:41 (GMT) |
---|---|---|
committer | Aleksandar Stojiljkovic <aleksandar.stojiljkovic@nokia.com> | 2011-09-09 11:31:07 (GMT) |
commit | cd43d6386de6e66379fa23c1ea4ec06141167c86 (patch) | |
tree | 85a58af01a916a4ef0f9d37e8dd4506e885053be | |
parent | 1f803aeb390720336a23941f3d1ec71ef0e29083 (diff) | |
download | Qt-cd43d6386de6e66379fa23c1ea4ec06141167c86.zip Qt-cd43d6386de6e66379fa23c1ea4ec06141167c86.tar.gz Qt-cd43d6386de6e66379fa23c1ea4ec06141167c86.tar.bz2 |
Use QT_MAX_CACHED_GLYPH_SIZE in QFontEngineFT
Task-number: QTBUG-21162 - Letters get truncated when font size=72 and set to Italic
Reviewed-by: Eskil
-rw-r--r-- | src/gui/text/qfontengine_ft.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp index 9a5d9d6..e3ab655 100644 --- a/src/gui/text/qfontengine_ft.cpp +++ b/src/gui/text/qfontengine_ft.cpp @@ -78,6 +78,10 @@ #include FT_ERRORS_H #endif +#if !defined(QT_MAX_CACHED_GLYPH_SIZE) +# define QT_MAX_CACHED_GLYPH_SIZE 64 +#endif + QT_BEGIN_NAMESPACE /* @@ -373,7 +377,7 @@ void QFreetypeFace::computeSize(const QFontDef &fontDef, int *xsize, int *ysize, *xsize = *ysize = 0; } } else { - *outline_drawing = (*xsize > (64<<6) || *ysize > (64<<6)); + *outline_drawing = (*xsize > (QT_MAX_CACHED_GLYPH_SIZE<<6) || *ysize > (QT_MAX_CACHED_GLYPH_SIZE<<6)); } } @@ -1317,7 +1321,7 @@ QFontEngineFT::QGlyphSet *QFontEngineFT::loadTransformedGlyphSet(const QTransfor if (!gs) { // don't try to load huge fonts - bool draw_as_outline = fontDef.pixelSize * qSqrt(qAbs(matrix.det())) >= 64; + bool draw_as_outline = fontDef.pixelSize * qSqrt(qAbs(matrix.det())) >= QT_MAX_CACHED_GLYPH_SIZE; if (draw_as_outline) return 0; |