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>
This commit is contained in:
Konstantin Ritt 2015-03-24 04:42:03 +04:00
parent 951e8a52ae
commit a8e3245b50

View File

@ -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);