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

Text rendering letter-spacing error

    XMLWordPrintable

Details

    • Windows
    • 6b1044cc3 (dev), 97ca6c2a5 (tqtc/lts-6.2), 2cb26f7b6 (tqtc/lts-5.15)

    Description

      Simple text "base" renders incorrect using label:

      #include <QApplication>
      #include <QLabel>
      
      int main(int argc, char *argv[]) {
          QApplication a(argc, argv);
          QLabel label("base");
          label.show();
          return a.exec();
      }
      

       result is:

      Letter space between "ba" is too small, letter space between "as" is too large.

      Tested on Windows 10, both MinGW and MSVC. I checked default UI font using 

      QApplication::font().family()
      

      And result is "Microsoft YaHei UI".

      All UI text on QWidget have that problem, QtCreator also has the same problem. But QPlainTextEdit renders without problem.

      Attachments

        1. image-2022-07-12-15-06-01-804.png
          image-2022-07-12-15-06-01-804.png
          1 kB
        2. image-2022-11-20-06-35-25-748.png
          image-2022-11-20-06-35-25-748.png
          59 kB
        3. image-2022-11-20-06-40-12-360.png
          image-2022-11-20-06-40-12-360.png
          1 kB
        4. image-2022-11-20-06-40-59-004.png
          image-2022-11-20-06-40-59-004.png
          1 kB
        5. msyh.ttc
          18.74 MB
        6. msyhbd.ttc
          16.05 MB
        7. msyhl.ttc
          11.58 MB

        Issue Links

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

          Activity

            People

              esabraha Eskil Abrahamsen Blomfeldt
              songziming Song Ziming
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes