summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-03-30 08:05:10 (GMT)
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-03-30 08:44:30 (GMT)
commit1acc9bcf4c43851af2096539eda88da9ef58bce3 (patch)
tree133abe6263c13e497a1bc1b48ee902f44e71dd1b /src/gui
parente925d5ebed4b319c57c1a3097a0e25c9cd562bcb (diff)
downloadQt-1acc9bcf4c43851af2096539eda88da9ef58bce3.zip
Qt-1acc9bcf4c43851af2096539eda88da9ef58bce3.tar.gz
Qt-1acc9bcf4c43851af2096539eda88da9ef58bce3.tar.bz2
Avoid taking sqrt of negative number in FT font engine
When using a reflecting matrix, the determinant will be -1, thus the call to sqrt() will return NaN. Same fix as in 0fa878c4d2. Task-number: QTBUG-9442 Reviewed-by: Trond
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/text/qfontengine_ft.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp
index a9def8e..449dffd 100644
--- a/src/gui/text/qfontengine_ft.cpp
+++ b/src/gui/text/qfontengine_ft.cpp
@@ -1368,7 +1368,7 @@ QFontEngineFT::QGlyphSet *QFontEngineFT::loadTransformedGlyphSet(const QTransfor
if (!gs) {
// don't try to load huge fonts
- bool draw_as_outline = fontDef.pixelSize * qSqrt(matrix.det()) >= 64;
+ bool draw_as_outline = fontDef.pixelSize * qSqrt(qAbs(matrix.det())) >= 64;
if (draw_as_outline)
return 0;