Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.5.3, 6.6.2
-
None
-
Windows, high dpi not disabled, faction dpi scaling (ie. 125% not 100%).
woff or woff2 font files
-
-
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
For Gerrit Dashboard: QTBUG-123454 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
549165,2 | dwrite: Fix crash when loading unsupported font in QRawFont | 6.6 | qt/qtbase | Status: MERGED | +2 | 0 |
549406,2 | dwrite: Fix crash when loading unsupported font in QRawFont | tqtc/lts-6.5 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |
549460,2 | dwrite: Fix crash when loading unsupported font in QRawFont | tqtc/lts-6.2 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |
549829,1 | dwrite: Fix crash when loading unsupported font in QRawFont | tqtc/lts-5.15 | qt/tqtc-qtbase | Status: ABANDONED | 0 | 0 |