summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qtextlayout.cpp
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2010-03-19 10:24:56 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2010-03-19 10:25:34 (GMT)
commit725c2c29c192349016b1332824a7716bbb992f31 (patch)
tree076272d7de25bf03387defd3a1d41b1f21571529 /src/gui/text/qtextlayout.cpp
parent3b45cff46eefcbe341f2e1adc3e864229c217226 (diff)
downloadQt-725c2c29c192349016b1332824a7716bbb992f31.zip
Qt-725c2c29c192349016b1332824a7716bbb992f31.tar.gz
Qt-725c2c29c192349016b1332824a7716bbb992f31.tar.bz2
Revert "Optimize getting bearings of a glyph on Windows for true type fonts"
This reverts commit 1ebeb971d3382aec0fff927ce2d6ea7b0452584f. This broke tst_qlistview::wordWrap in QWS
Diffstat (limited to 'src/gui/text/qtextlayout.cpp')
-rw-r--r--src/gui/text/qtextlayout.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp
index 3c0e85e..204effa 100644
--- a/src/gui/text/qtextlayout.cpp
+++ b/src/gui/text/qtextlayout.cpp
@@ -1688,9 +1688,9 @@ namespace {
if (currentPosition <= 0)
return;
- qreal rb;
- fontEngine->getGlyphBearings(currentGlyph(), 0, &rb);
- rightBearing = qMin(QFixed(), QFixed::fromReal(rb));
+ glyph_metrics_t gi = fontEngine->boundingBox(currentGlyph());
+ if (gi.isValid())
+ rightBearing = qMin(QFixed(), gi.xoff - gi.x - gi.width);
}
inline void resetRightBearing()