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

QPainter::drawStaticText() paints nothing with raster engine at point sizes > 50.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 4.8.0
    • 4.8.0
    • GUI: Text handling
    • None
    • Linux, FreeType
    • 0aa9b30432cec3b7f366983f451fc9a7f8f83243

    Description

      Run the following code with graphics system "raster":

      #include <QtGui>
      
      int main(int argc, char **argv)
      {
          QApplication app(argc, argv);
      
          QImage image(640, 200, QImage::Format_ARGB32);
          image.fill(Qt::white);
      
          {
              QPainter p(&image);
      
              QFont font;
              font.setPointSize(50);
              p.setFont(font);
              p.drawStaticText(0, 0, QStaticText(QString::fromLatin1("Point size %1").arg(font.pointSize())));
      
              font.setPointSize(51);
              p.setFont(font);
              p.drawStaticText(0, 100, QStaticText(QString::fromLatin1("Point size %1").arg(font.pointSize())));
          }
      
          QLabel label;
          label.setPixmap(QPixmap::fromImage(image));
          label.show();
      
          return app.exec();
      }
      

      The text with point size 50 will be visible, while the one with size 51 will be gone.

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes