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

Windows DirectWrite fontengine crash with fractional dpi and woff / woff2 fonts

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P1: Critical
    • 6.2.13, 6.5.6
    • 6.5.3, 6.6.2
    • GUI: Font handling
    • None
    • Windows, high dpi not disabled, faction dpi scaling (ie. 125% not 100%).
      woff or woff2 font files
    • Windows
    • 282f30ab0 (6.6), 81b35955b (tqtc/lts-6.5), 81d855717 (tqtc/lts-6.2)

    Description

      When using QRawFont to inspect a woff or woff2 font file on Windows to extract the family name, style, and weight causes a crash but only when high dpi has not been disabled, factional dpi scaling is being done, and the directwrite fontengine is being used on Windows.

      If windows:nodirectwrite is used, there is no crash.

      I have attached a sample program extracted from Sigil that tries to use QRawFont to extract the requirements needed to fill in the css @font-face for a woff / woff2 font so it can be displayed in a QWebEngineView.

      Using QRawFont to extract info from woff and woff2 font files works just fine on MacOS and Linux. Only Windows and only with fractional dpi scaling is there a crash.

      Using woff and woff2 within QWebEngineView works flawlessly on all platforms.

      I have attached fontbug.zip that uses qmake/namke / Visual Studio to build fontbug.exe application.

      Build the application using qmake. Make sure in MainWindow.cpp the path to the woff2 font file is correct. Then launch the resulting app. It should immediately crash.

      This application works just fine on MacOS and Linux.

      Attachments

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

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            kevinhendricks Kevin B. Hendricks
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes