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

Font request for "Times" leads to "Helvetica" on Mac, and non-existent font "Times" on Windows

    XMLWordPrintable

Details

    • macOS

    Description

      Reproducible with the following example. On Windows, this prints "Times" twice, even though there is no such font on the system (only "Times New Roman", which is the font used in the label).

      #include <QtGui>

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

      QFont font("Times");
      QFontInfo finfo(font);
      qDebug() << finfo.family();

      app.setFont(font);

      QLabel label(0);
      label.setText("Foo");
      label.show();

      qDebug() << finfo.family();

      return app.exec();
      }

      Attachments

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

        Activity

          People

            jiang Jiang Jiang
            vhilshei Volker Hilsheimer
            Votes:
            12 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes