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
- duplicates
-
QTBUG-18711 QFontDatabase::addApplicationFont() does not work with DirectWrite font engine
- Closed
For Gerrit Dashboard: QTBUG-51260 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
149926,2 | Windows DirectWrite: Improve error messages for font engine creation. | 5.6 | qt/qtbase | Status: MERGED | +2 | 0 |