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

Font size fails

    XMLWordPrintable

Details

    Description

      I allowed bitmap fonts with fontconfig
      Helvetica font is available in pcf files

      A short example:

      #include <QApplication>
      #include <QFont>
      #include <QFontInfo>
      #include <QDebug>

      int main(int argc, char **argv)

      { QApplication a(argc, argv, false); QFont font10; font10.fromString("Helvetica,10,-1,5,50,0,0,0,0,0"); QFont font12; font12.fromString("Helvetica,12,-1,5,50,0,0,0,0,0"); QFontInfo finfo10(font10); QFontInfo finfo12(font12); qDebug() << "Fontsize: " << font10.pointSize() << " -> " << finfo10.pointSize(); qDebug() << "Fontsize: " << font12.pointSize() << " -> " << finfo12.pointSize(); }

      Output of program should be:
      Fontsize: 10 -> 10
      Fontsize: 12 -> 12

      Instead the output of program:
      Fontsize: 10 -> 12
      Fontsize: 12 -> 10

      10 pt QFont creates a 12 pt QFontInfo and
      12 pt QFont creates a 10 pt QFontInfo...

      Is it normal?

      Though if the QApplication is created without GUI (3rd argument is 'false') the output seems right.

      Attachments

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

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            janichol Andy Nichols
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes