summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qfontengine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/text/qfontengine.cpp')
-rw-r--r--src/gui/text/qfontengine.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp
index 1c705ae911..398029b741 100644
--- a/src/gui/text/qfontengine.cpp
+++ b/src/gui/text/qfontengine.cpp
@@ -874,8 +874,8 @@ const uchar *QFontEngine::getCMap(const uchar *table, uint tableSize, bool *isSy
enum {
Invalid,
- Symbol,
AppleRoman,
+ Symbol,
Unicode11,
Unicode,
MicrosoftUnicode,
@@ -939,7 +939,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);
@@ -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
// ------------------------------------------------------------------