summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qplatformfontdatabase.cpp
diff options
context:
space:
mode:
authorKonstantin Ritt <ritt.ks@gmail.com>2015-03-24 04:42:03 +0400
committerKonstantin Ritt <ritt.ks@gmail.com>2015-03-26 20:00:38 +0000
commita8e3245b50e1376aa3d3f2397ab10ecd5d6e6092 (patch)
tree9d3e11a3a1e300f055866e1b00e9b27e204e6866 /src/gui/text/qplatformfontdatabase.cpp
parent951e8a52aec860ad59bc15de534e1391bca4b923 (diff)
Better detection of Symbol fonts
> Symbol character sets have a special meaning. > If the symbol bit (31) is set, and the font file contains a 'cmap' > subtable for platform of 3 and encoding ID of 1, > then all of the characters in the Unicode range 0xF000 - 0xF0FF > (inclusive) will be used to enumerate the symbol character set. If we detected the font has a symbol character set, report no other writing systems support. Change-Id: I1030f3339c166ffd03c7caee1b1b26010dfdc314 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Diffstat (limited to 'src/gui/text/qplatformfontdatabase.cpp')
-rw-r--r--src/gui/text/qplatformfontdatabase.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gui/text/qplatformfontdatabase.cpp b/src/gui/text/qplatformfontdatabase.cpp
index eec9dd905e..5fa43948aa 100644
--- a/src/gui/text/qplatformfontdatabase.cpp
+++ b/src/gui/text/qplatformfontdatabase.cpp
@@ -525,7 +525,8 @@ enum {
ThaiCsbBit = 16,
JapaneseCsbBit = 17,
KoreanCsbBit = 19,
- KoreanJohabCsbBit = 21
+ KoreanJohabCsbBit = 21,
+ SymbolCsbBit = 31
};
/*!
@@ -610,6 +611,11 @@ QSupportedWritingSystems QPlatformFontDatabase::writingSystemsFromTrueTypeBits(q
hasScript = true;
//qDebug("font %s supports Korean", familyName.latin1());
}
+ if (codePageRange[0] & (1 << SymbolCsbBit)) {
+ writingSystems = QSupportedWritingSystems();
+ hasScript = false;
+ }
+
if (!hasScript)
writingSystems.setSupported(QFontDatabase::Symbol);