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

Bug in Qt font handling (broken font?)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P4: Low
    • Some future release
    • 4.7.0
    • GUI: Font handling
    • None
    • Installed FreeType: 2.3.12 (but I think Qt uses its own version?)

    Description

      Attached is a font that can be found on the Internet.

      When using this font, QFont returns a font with QFontMetrics().height() == 0.

      If the font is broken, Qt should reject such a font, and return the default font instead.

      Test code:

      #include <QtGui/QApplication>
      #include <QtGui/QLabel>

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

      QFont font("Ben Pioneer", 12);
      int height = QFontMetrics(font).height();

      QLabel label;
      label.setText(QString("Font Height: %1").arg(height));
      label.show();

      return app.exec();
      }

      Downstream issue: https://bugs.kde.org/show_bug.cgi?id=248920

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            cfeck Christoph Feck
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes