diff -r ef0373b55136 -r 758a864f9613 src/gui/text/qfontengine.cpp --- a/src/gui/text/qfontengine.cpp Fri Sep 17 08:34:18 2010 +0300 +++ b/src/gui/text/qfontengine.cpp Mon Oct 04 01:19:32 2010 +0300 @@ -874,8 +874,8 @@ enum { Invalid, + AppleRoman, Symbol, - AppleRoman, Unicode11, Unicode, MicrosoftUnicode, @@ -939,7 +939,7 @@ return 0; resolveTable: - *isSymbolFont = (score == Symbol); + *isSymbolFont = (symbolTable > -1); unsigned int unicode_table = qFromBigEndian(maps + 8*tableToUse + 4); @@ -1093,6 +1093,18 @@ 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 // ------------------------------------------------------------------