Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-20996

QFontDatabase::writingSystems always claims that all writing systems are supported on Mac OS X Cocoa

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 4.8.0
    • 4.7.2
    • GUI: Font handling
    • None
    • Mac OS X Cocoa
    • macOS
    • 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

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              jiang Jiang Jiang
              jlarcombe James Larcombe
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes