diff options
author | Paul Olav Tvete <paul.tvete@nokia.com> | 2010-09-13 10:26:03 (GMT) |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@nokia.com> | 2010-09-13 10:46:16 (GMT) |
commit | 06dc8791a70329dc8e985a0eed7e434d1f762ec5 (patch) | |
tree | f3a9f55307207088676d4c48ec67ec418fa56053 /src/gui/text/qfontengine.cpp | |
parent | 59a2ff150795e1281e6b4fea435e74d3434a5ad2 (diff) | |
parent | 31cc0b1820c0c8fdfdbc3d5b804f2dba2051c96f (diff) | |
download | Qt-06dc8791a70329dc8e985a0eed7e434d1f762ec5.zip Qt-06dc8791a70329dc8e985a0eed7e434d1f762ec5.tar.gz Qt-06dc8791a70329dc8e985a0eed7e434d1f762ec5.tar.bz2 |
Merge remote branch 'qt/master' into lighthouse-master
Conflicts:
configure
src/corelib/global/qglobal.h
src/corelib/tools/qsimd.cpp
Diffstat (limited to 'src/gui/text/qfontengine.cpp')
-rw-r--r-- | src/gui/text/qfontengine.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp index 9555d37..9763792 100644 --- a/src/gui/text/qfontengine.cpp +++ b/src/gui/text/qfontengine.cpp @@ -890,8 +890,8 @@ const uchar *QFontEngine::getCMap(const uchar *table, uint tableSize, bool *isSy enum { Invalid, - Symbol, AppleRoman, + Symbol, Unicode11, Unicode, MicrosoftUnicode, @@ -955,7 +955,7 @@ const uchar *QFontEngine::getCMap(const uchar *table, uint tableSize, bool *isSy return 0; resolveTable: - *isSymbolFont = (score == Symbol); + *isSymbolFont = (symbolTable > -1); unsigned int unicode_table = qFromBigEndian<quint32>(maps + 8*tableToUse + 4); @@ -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 // ------------------------------------------------------------------ |