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

Failed font selection on Mac/Cocoa when there are multiple copies of a font installed (as reported by Font Book)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P2: Important
    • Some future release
    • 4.7.0
    • GUI: Text handling
    • None
    • Mac OS X, Cocoa, 64-bit
    • macOS

    Description

      When Font Book on Mac OS X reports that multiple copies of a font is installed Qt will sometimes fail to select a font, for example:

      #include <QtGui>

      int main(int argc, char** argv)
      {
      QApplication app(argc, argv);

      QFont invisibleArial("Arial", 12, QFont::Bold);
      QLabel label("Foo");
      label.setFont(invisibleArial);

      QLabel label2("Bar");
      label2.setFont(QFont("Arial", 12));

      label.show();
      label2.show();

      return app.exec();
      }

      In my case I had Arial bold installed both in /Library/Fonts and /Library/Fonts/Microsoft. Both fonts worked perfectly on their own, but Qt would not draw the bold one until I manually disabled one of the instances in the Font Book application.

      Attachments

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

        Activity

          People

            jiang Jiang Jiang
            vestbo Tor Arne Vestbø
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes