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

Qt embedded does not find OTF font files in font directory

    XMLWordPrintable

Details

    Description

      If an OTF file is placed in the font directory, it is not loaded into the font database. QFontDatabase::addApplicationFont can be used to work around this, but it is a bit annoying.

      Patch to fix the issue:

      — qfontdatabase_qws.cpp.orig 2010-08-24 09:28:49.580816196 +1200
      +++ qfontdatabase_qws.cpp 2010-08-24 09:32:56.409072789 +1200
      @@ -354,7 +354,7 @@
      #ifndef QT_NO_FREETYPE
      dir.setNameFilters(QStringList() << QLatin1String("*.ttf")
      << QLatin1String(".ttc") << QLatin1String(".pfa")

      • << QLatin1String("*.pfb"));
        + << QLatin1String(".pfb") << QLatin1String(".otf"));
        dir.refresh();
        for (int i = 0; i < int(dir.count()); ++i) {
        const QByteArray file = QFile::encodeName(dir.absoluteFilePath(dir[i]));

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            reuben.dowle Reuben Dowle
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes