diff options
author | Sami Merila <sami.merila@nokia.com> | 2010-03-23 09:44:10 (GMT) |
---|---|---|
committer | Sami Merila <sami.merila@nokia.com> | 2010-03-23 09:44:10 (GMT) |
commit | 47902b7587d66c0941bacf08b31b8caae264f09a (patch) | |
tree | fc7b9715220274c9fd07254159502bf90c300fe5 /src/gui/text/qfontengine_win.cpp | |
parent | dd9c26cba63c54358f3309143b76ae0416f89c78 (diff) | |
parent | 0409cdb406021d8609eb2a88a896f9fbc085805f (diff) | |
download | Qt-47902b7587d66c0941bacf08b31b8caae264f09a.zip Qt-47902b7587d66c0941bacf08b31b8caae264f09a.tar.gz Qt-47902b7587d66c0941bacf08b31b8caae264f09a.tar.bz2 |
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt-s60-public into 4.6
Diffstat (limited to 'src/gui/text/qfontengine_win.cpp')
-rw-r--r-- | src/gui/text/qfontengine_win.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/gui/text/qfontengine_win.cpp b/src/gui/text/qfontengine_win.cpp index 1a815d3..a133b48 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 { |