diff options
author | Aleksandar Stojiljkovic <aleksandar.stojiljkovic@nokia.com> | 2011-09-08 12:00:41 +0300 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-09-20 12:00:45 +0200 |
commit | 3fa945ae7c20c792fc02b68ccf38d0699626195a (patch) | |
tree | e0f8474436b40691718e8c46641d76c19e6f20ba | |
parent | ca320dfc304626e4878d6f1e5d50e070efbfdd85 (diff) |
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
(cherry picked from commit cd43d6386de6e66379fa23c1ea4ec06141167c86)
Change-Id: Ic05f775975d5f21e0274e7b2c3a4903d6a4ae41f
Reviewed-on: http://codereview.qt-project.org/5203
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
-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 a6fb0e8594..61daf16990 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 /* @@ -381,7 +385,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)); } } @@ -1345,7 +1349,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; |