diff options
author | David Boddie <dboddie@trolltech.com> | 2010-08-31 12:03:44 (GMT) |
---|---|---|
committer | David Boddie <dboddie@trolltech.com> | 2010-08-31 12:03:44 (GMT) |
commit | aec1d2b85b3a818350b70bbb27790dee6ac35327 (patch) | |
tree | ab37d5df921ee1c4ca09b9d582ddf562c3fef8c1 /src/gui/text/qfontengine.cpp | |
parent | 2192d722a0b2af2aae0a8c45741f1ee4fd28269c (diff) | |
parent | 500e4d4a7faef619354cb92b6bf7df6a639d29e3 (diff) | |
download | Qt-aec1d2b85b3a818350b70bbb27790dee6ac35327.zip Qt-aec1d2b85b3a818350b70bbb27790dee6ac35327.tar.gz Qt-aec1d2b85b3a818350b70bbb27790dee6ac35327.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7
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 194c5f3..3f758b1 100644 --- a/src/gui/text/qfontengine.cpp +++ b/src/gui/text/qfontengine.cpp @@ -1093,6 +1093,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 // ------------------------------------------------------------------ |