summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qfontengine.cpp
diff options
context:
space:
mode:
authorJiang Jiang <jiang.jiang@nokia.com>2010-08-23 12:53:04 +0200
committerJiang Jiang <jiang.jiang@nokia.com>2010-09-02 11:55:03 +0200
commit4c8571de2d50e1dbfeef38b1e1e09c48a0a27aa4 (patch)
tree7e1a8b7a0c65a34ef1beec463444cfe83ca90a3c /src/gui/text/qfontengine.cpp
parent72a1709cbe216220722750c743641bf5ba8a8da9 (diff)
Fix symbol font detection in generic CMap decoding
For fonts that have an AppleRoman name table, *isSymbolFont failed to return correct value even if they have a symbol table. This patch corrected this behavior by using symbolTable variable to detect that instead of checking if score == Symbol. Also prefer symbol table over AppleRoman table to make generic CMap decoding consistent with QFontEngineFT (which will use the symbol table whenever its available). Task-number: QTBUG-3852 Reviewed-by: Lars Knoll
Diffstat (limited to 'src/gui/text/qfontengine.cpp')
-rw-r--r--src/gui/text/qfontengine.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp
index 3f758b1dd2..1e8461fca5 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);