Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
4.7.2
-
None
-
Mac OS X Cocoa
-
-
d014bb648f3e8499a87c180274af5cc7e16e72de
Description
We use QFontDatabase::writingSystems to determine whether or not a font is a symbol font, amongst other things. Noticing that this wasn't working correctly on the Mac, I had a look at it, and noticed that in the Cocoa implementation of initializeDb() at the top of qfontdatabase_mac.cpp, it does this:
for(int ws = 1; ws < QFontDatabase::WritingSystemsCount; ++ws)
family->writingSystems[ws] = QtFontFamily::Supported;
This doesn't really make any sense - it says that all fonts support the symbol encoding, for example, which is not useful. The function initWritingSystems(..) at the top of the file could basically do the job in Cocoa too, except you'd have to pass it a CTFontRef instead of an ATSFontRef, and you'd need to make the appropriate CoreText calls to fish out the OS/2 table from the font (see QCoreTextFontEngine::getSfntTable).
Attachments
Issue Links
- relates to
-
QTBUG-27130 QFontDatabase does not return fontlist for Simplified and Traditional Chinese languages on Mac OS X
- Closed