src/gui/text/qfontengine.cpp
changeset 37 758a864f9613
parent 30 5dc02b23752f
--- 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<quint32>(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
 // ------------------------------------------------------------------