Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
4.5.3, 4.6.1, 4.6.3
-
None
-
windows xp professional sp3, VS2008 sp1.
checked on Qt 4.5.3, 4.6.1 and 4.6.3
-
4b2c73b4767bcb512cbc17f65186eac5d004db07
Description
I have custom true type font, my company bought from 3rd company.
when enumerating with EnumFontFamiliesEx in qfontdatabase_win.cpp:populate_database, this font in qfontdatabase_win.cpp:storeFont function has script ="Cyrillic" and signature={fsUsb =
, fsCsb = {0x97,0x00}}, so this font contains Cyrillic symbols, but at the end of function qfontdatabase_win.cpp:addFontToDatabase value of family->writingSystems has set only byte correspoded to QFontDatabase::Symbol. So I can't use this font for Cyrillic symbols
As I can see in qfontdatabase_win.cpp:addFontToDatabase for True Type fonts function determineWritingSystemsFromTrueTypeBits is used, and no script check is occured, so script="Cyrillic" is ignored
Even More: in qfontdatabase.cpp:determineWritingSystemsFromTrueTypeBits function there is only check of signature->fsCsb only for bits corresponding for SimplifiedChineseCsbBit, TraditionalChineseCsbBit, JapaneseCsbBit and KoreanCsbBit. and in my situation value 0x97 is ignored (bits 0,1,2,4,7)
I assume that if my font had 9th bit set in signature->fsUsb, all gonna be ok, because qfontdatabase.cpp:determineWritingSystemsFromTrueTypeBits function would recognize this cyrillic bit (but font made by 3rd company, so I can't edit it). but AFAIK all zeros in signature->fsUsb has special meaning that EnumFontFamiliesEx couldn't determine these bits, so there could be any writing system.
So I think qfontdatabase.cpp:determineWritingSystemsFromTrueTypeBits must check all of signature->fsCsb bits.
and I think qfontdatabase_win.cpp:addFontToDatabase must check script value (script="Cyrillic" in my case) for True Type fonts too.
There were no problem in 4.3.0 using this font for cyrillic symbols (AFAIK there was big change in Qt font engine in 4.4.0 or 4.5.0)
I Can't attach my font because of license for it.