diff options
author | Olivier Goffart <olivier.goffart@nokia.com> | 2010-08-30 14:11:03 (GMT) |
---|---|---|
committer | Olivier Goffart <olivier.goffart@nokia.com> | 2010-08-30 14:11:03 (GMT) |
commit | 1ba3cac3c7296320ca914f262f124ae7f2dea841 (patch) | |
tree | 40e9c04835dcfe8adccb4cedfda5e568f3c92677 /src/gui/text/qfontengine.cpp | |
parent | 708978d1c18cf938a4e0c29a5a90be5de4e82140 (diff) | |
parent | 51582e3d1251766a3ed941530d966e1a591cbed6 (diff) | |
download | Qt-1ba3cac3c7296320ca914f262f124ae7f2dea841.zip Qt-1ba3cac3c7296320ca914f262f124ae7f2dea841.tar.gz Qt-1ba3cac3c7296320ca914f262f124ae7f2dea841.tar.bz2 |
Merge remote branch 'origin/4.7' into qt-master-from-4.7
Conflicts:
qmake/generators/win32/msbuild_objectmodel.cpp
qmake/generators/win32/msvc_vcxproj.cpp
tests/auto/qnetworkreply/tst_qnetworkreply.cpp
Diffstat (limited to 'src/gui/text/qfontengine.cpp')
-rw-r--r-- | src/gui/text/qfontengine.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp index 3f6b409..1b94915 100644 --- a/src/gui/text/qfontengine.cpp +++ b/src/gui/text/qfontengine.cpp @@ -1109,6 +1109,18 @@ const QVector<QRgb> &QFontEngine::grayPalette() return *qt_grayPalette(); } +QFixed QFontEngine::lastRightBearing(const QGlyphLayout &glyphs, bool round) +{ + if (glyphs.numGlyphs >= 1) { + glyph_t glyph = glyphs.glyphs[glyphs.numGlyphs - 1]; + glyph_metrics_t gi = boundingBox(glyph); + if (gi.isValid()) + return round ? QFixed(qRound(gi.xoff - gi.x - gi.width)) + : QFixed(gi.xoff - gi.x - gi.width); + } + return 0; +} + // ------------------------------------------------------------------ // The box font engine // ------------------------------------------------------------------ |