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

Windows with freetype fontengine doesn't use available Bold/Italic font variants but auto generates them

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P2: Important
    • None
    • 5.4.0
    • GUI: Font handling
    • None
    • Windows 7, MSVC2013 32bit

    Description

      Setting font engine to freetype

      And using any font available on the system (i.e. Arial, Times New Roman... ) with style set to bold and/or italic style is generated instead of using available font.

      I attached pictures from Font Sampler example with and without freetype.

      Sometimes generated bold is wrong with bigger pixel size set to bigger than 63 gives output as shown in boldbug.png

      void paintEvent(QPaintEvent * /*e*/)
      {
          QPainter p(this);
          QFont font("Times New Roman");
          font.setBold(true);
      
          font.setPixelSize(63);
          p.setFont(font);
          p.drawText(10,70, "Times 63");
      
          font.setPixelSize(64);
          p.setFont(font);
          p.drawText(10,170, "Times 64");
      }
      

      Attachments

        1. boldbug.png
          boldbug.png
          125 kB
        2. FreetypeWrong Italic.png
          FreetypeWrong Italic.png
          153 kB
        3. without freetype.png
          without freetype.png
          152 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            ivang Ivan Golubovic
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes