summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qfontengine_win.cpp
diff options
context:
space:
mode:
authorAlexis Menard <alexis.menard@nokia.com>2010-03-25 07:00:55 +0100
committerAlexis Menard <alexis.menard@nokia.com>2010-03-25 07:00:55 +0100
commit32b5fdfabf3158c7b03d1011f4551a45371b27e3 (patch)
tree0339732e5529917a52eb7ff86e6209c262ab7032 /src/gui/text/qfontengine_win.cpp
parentd373f8b8ee0a5841bcdb264b0b01b262c15e7f89 (diff)
parenta4f0b174dd7d6eb837915d9d99b2067b8cb00187 (diff)
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt into 4.7
Conflicts: mkspecs/common/symbian/symbian.conf qmake/generators/symbian/symmake.cpp src/3rdparty/webkit/WebCore/WebCore.pro
Diffstat (limited to 'src/gui/text/qfontengine_win.cpp')
-rw-r--r--src/gui/text/qfontengine_win.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/gui/text/qfontengine_win.cpp b/src/gui/text/qfontengine_win.cpp
index 55e93bd3c2..3e79d79b95 100644
--- a/src/gui/text/qfontengine_win.cpp
+++ b/src/gui/text/qfontengine_win.cpp
@@ -649,6 +649,30 @@ static const ushort char_table[] = {
static const int char_table_entries = sizeof(char_table)/sizeof(ushort);
+void QFontEngineWin::getGlyphBearings(glyph_t glyph, qreal *leftBearing, qreal *rightBearing)
+{
+ HDC hdc = shared_dc();
+ SelectObject(hdc, hfont);
+
+#ifndef Q_WS_WINCE
+ if (ttf)
+#endif
+
+ {
+ ABC abcWidths;
+ GetCharABCWidthsI(hdc, glyph, 1, 0, &abcWidths);
+ if (leftBearing)
+ *leftBearing = abcWidths.abcA;
+ if (rightBearing)
+ *rightBearing = abcWidths.abcC;
+ }
+
+#ifndef Q_WS_WINCE
+ else {
+ QFontEngine::getGlyphBearings(glyph, leftBearing, rightBearing);
+ }
+#endif
+}
qreal QFontEngineWin::minLeftBearing() const
{