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

QFontComboBox::setCurrentFont does not work when trying to set a new added font as a current one

    XMLWordPrintable

Details

    Description

      QFontComboBox::setCurrentFont doesn't work when trying to set a new added font as a current one

      The following program shows a mismatch in the font families of the font object and the corresponding font info object. This suggests that this is indeed a problem with the font engine.

      Test case main.cpp to reproduce

      #include <QtGui>
      
      int main(int argc, char *argv[])
      {
          QApplication app(argc, argv);
          int id = QFontDatabase::addApplicationFont("ESRI_4.TTF");
          Q_ASSERT(id != -1);
          QFontDatabase fontdb;
          QFont f = fontdb.font(QLatin1String("ESRI Oil, Gas, & Water"), QString("normal"), 12);
          QFontInfo fi(f);
          qDebug() << f.family() << fi.family();
          return 0;
      }
      

      Attachments

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

        Activity

          People

            shausman Simon Hausmann
            admin Administrator
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes