Regarding the code snippets above.
For Chinese characters, QFontDatabase will use fallback font family("Droid Sans Fallback") with "Light" style when add font Glyph.
since QFontDatabase checks if default style(Regular) of fallback font family "Droid Sans Fallback" is same as font style specified in qml(Font.Light). And QFontDatabase::isSmoothlyScalable will return false in such a case, which results in scene graph will
use QSGDefaultGlyphNode when createGlyphNode is called. Issue happens.
Need to only check styleKey when foundry->styles == specified style
Will see feedback from Qt guys.
Thanks.
PS: more test cases and patch can be found on https://bugreports.qt.io/browse/QTBUG-47547
Also I think we can override bool QBasicFontDatabase::fontsAlwaysScalable() method in qlinuxfbfontdatabase.cpp under qtbase/src/plugins/platforms/ for platform independent purpose.
Copy bug description https:/ /bugreports. qt.io/browse/ QTBUG-47547 and paste here.
if developer specifies font family with Non-Regular style, potential risk to encounter Chinese characters are missing in some cases .
E.g
import QtQuick 2.4
import QtQuick.Controls 1.3
ApplicationWindow {
visible: true
width: 1280
height: 800
Text {
anchors. centerIn: parent
font.family: "Ubuntu"
font.pixelSize : 69;
font.weight: Font.Light
text: "系统设置"
}
}
Regarding the code snippets above. :isSmoothlyScal able will return false in such a case, which results in scene graph will
For Chinese characters, QFontDatabase will use fallback font family("Droid Sans Fallback") with "Light" style when add font Glyph.
since QFontDatabase checks if default style(Regular) of fallback font family "Droid Sans Fallback" is same as font style specified in qml(Font.Light). And QFontDatabase:
use QSGDefaultGlyphNode when createGlyphNode is called. Issue happens.
However If scene graph doesn't prefer NativeGlyphNode and create GlyphNode based on Distance Field technique. It works fine. /drive. google. com/open? id=0B2H9ECPSSfq IMzhvU1hPUWNlWn c
https:/
Need to only check styleKey when foundry->styles == specified style
Will see feedback from Qt guys.
Thanks.
PS: more test cases and patch can be found on https:/ /bugreports. qt.io/browse/ QTBUG-47547 ase::fontsAlway sScalable( ) method in qlinuxfbfontdat abase.cpp under qtbase/ src/plugins/ platforms/ for platform independent purpose.
Also I think we can override bool QBasicFontDatab