diff options
author | Jiang Jiang <jiang.jiang@nokia.com> | 2010-08-23 10:53:04 (GMT) |
---|---|---|
committer | Jiang Jiang <jiang.jiang@nokia.com> | 2010-09-02 09:55:03 (GMT) |
commit | 4c8571de2d50e1dbfeef38b1e1e09c48a0a27aa4 (patch) | |
tree | 7e1a8b7a0c65a34ef1beec463444cfe83ca90a3c | |
parent | 72a1709cbe216220722750c743641bf5ba8a8da9 (diff) | |
download | Qt-4c8571de2d50e1dbfeef38b1e1e09c48a0a27aa4.zip Qt-4c8571de2d50e1dbfeef38b1e1e09c48a0a27aa4.tar.gz Qt-4c8571de2d50e1dbfeef38b1e1e09c48a0a27aa4.tar.bz2 |
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
-rw-r--r-- | src/gui/text/qfontengine.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp index 3f758b1..1e8461f 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); |