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

qt-enterprise-windows-x86-msvc2015-5.6.0-rc_344.exe/HighDPI : Warnings from qtquickcontrols/examples/quick/extras/gallery

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P2: Important
    • None
    • 5.6.0 RC
    • None
    • Windows 10/MSVC2015/64bit

    Description

      With QT_SCREEN_SCALE_FACTOR=auto:

      Running  release/gallery.exe
      QWindowsFontDatabase::createEngine: CreateFontFromLOGFONT failed (The data area passed to a system call is too small.)
      QWindowsFontDatabase::createEngine: CreateFontFromLOGFONT failed ()
      QWindowsFontDatabase::createEngine: CreateFontFromLOGFONT failed ()
      QWindowsFontDatabase::createEngine: CreateFontFromLOGFONT failed ()
      QWindowsFontDatabase::createEngine: CreateFontFromLOGFONT failed ()
      QWindowsFontDatabase::createEngine: CreateFontFromLOGFONT failed ()
      

      Harmless . apparently, with improved debug:

      DirectWrite: CreateFontFromLOGFONT() failed (The data area passed to a system call is too small.) for QFontDef(Family="Open Sans" Stylename= pointsize=18.75 pixelsize=25 styleHint=5 weight=50 stretch=100 hintingPreference=0) LOGFONT("Open Sans", lfWidth=0, lfHeight=-25) dpi=96
      DirectWrite: CreateFontFromLOGFONT() failed () for QFontDef(Family="Open Sans" Stylename= pointsize=12.75 pixelsize=17 styleHint=5 weight=50 stretch=100 hintingPreference=0) LOGFONT("Open Sans", lfWidth=0, lfHeight=-17) dpi=96
      DirectWrite: CreateFontFromLOGFONT() failed () for QFontDef(Family="Open Sans" Stylename= pointsize=12.75 pixelsize=17 styleHint=5 weight=50 stretch=100 hintingPreference=0) LOGFONT("Open Sans", lfWidth=0, lfHeight=-17) dpi=96
      DirectWrite: CreateFontFromLOGFONT() failed () for QFontDef(Family="Open Sans" Stylename= pointsize=12.75 pixelsize=54 styleHint=5 weight=50 stretch=100 hintingPreference=0) LOGFONT("Open Sans", lfWidth=0, lfHeight=-54) dpi=96
      DirectWrite: CreateFontFromLOGFONT() failed () for QFontDef(Family="Open Sans" Stylename= pointsize=12.75 pixelsize=864 styleHint=5 weight=50 stretch=100 hintingPreference=0) LOGFONT("Open Sans", lfWidth=0, lfHeight=-864) dpi=96
      

      That is, it tries DirectWrite when scaling is active and that cannot find "Open Sans"

      The example could use sth like "stocqt example: Choose font depending on platform." (qtdeclarative) 67c4017054baf394062ab4f869d9ca9d299d3354 https://codereview.qt-project.org/#/c/147534/

      On closer look, it has sth like:

      FontLoader {
              id: openSans
              source: "qrc:/fonts/OpenSans-Regular.ttf"
           }
      

      at qtquickcontrols\examples\quick\extras\gallery\qml\gallery.qml:370 . Is that supposed to work with DirectWrite?

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-51260
          # Subject Branch Project Status CR V

          Activity

            People

              esabraha Eskil Abrahamsen Blomfeldt
              kleint Friedemann Kleint
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes