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

[5.9.1] Font rendering issue on Windows

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P1: Critical
    • None
    • 5.9.1, 5.9.2
    • None
    • Dell Inspiron 7000 series laptop, Windows 10 MINGW, hybrid graphics cards Intel HD Graphics 530 + nVidia GTX 960M (OpenGL 4.5)

      Chuwi hi13, Intel Apollo Lake, Windows 10

    Description

      Please see attached screenshots.

      Reproduced with Qt 5.9.1 MINGW and with Qt 5.9.1 MSYS2 build.

      The very same code works perfectly on Linux, macOS and Android.

      The font glyph corruption is randomic. I need to launch the application like 10 times to get one run OK. Every time I see something different.

      I use two fonts: Roboto Condensed and FontAwesome. They're both QRC resources.

      Roboto is added to the font database in the C++ code with

       

      if (QFontDatabase::addApplicationFont(":/RobotoCondensed-Regular.ttf") < 0)
          qWarning() << "Roboto font cannot be loaded !";
      

      (I never see the qWarning message)

      Both fonts are then referenced in QML with

      FontLoader { source: "qrc:/RobotoCondensed-Regular.ttf" }
      FontLoader { source: "qrc:/FontAwesome.otf" }

      Unfortunately I couldn't come up with a self contained example to reproduce this issue.

      It seems to be related to the application startup time. The longer, the more chance to see font corruption. With a simple application, the startup time is short and I can never see any corruption.

      I can't recall of having this issue on Qt 5.7, so I guess something has been changed since then. Unfortunately I can't build on 5.7 cause I moved to QuickControls 2.

      Needless to say that this is a showstopper for my project, as I can't release my application like this.

       

      Attachments

        1. 2017-09-30-NOT-OK.png
          2017-09-30-NOT-OK.png
          104 kB
        2. 2017-09-30-OK.png
          2017-09-30-OK.png
          264 kB
        3. badfont.zip
          174 kB
        4. qmlui-NOT-OK.png
          qmlui-NOT-OK.png
          290 kB
        5. qmlui-OK.png
          qmlui-OK.png
          337 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            mcallegari79 Massimo Callegari
            Votes:
            6 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes