Qml font.weight not working?
Font this is trouble of Qt, im use Qt 5.8.0
I need paint font "SF UI Display", in main.cpp im load font
Code:
void installFont() {
fontList << dir.entryList();
for (int i = 0; i < fontList.count(); ++i) {
int res
= QFontDatabase::addApplicationFont(":/font/" + fontList.
at(i
));
if (res == -1)
qDebug() << Q_FUNC_INFO << "can`t add " << fontList.at(i);
}
}
in qml
Code:
Text {
id: label1
anchors.left: parent.left
anchors.leftMargin: 100
anchors.top: parent.top
anchors.topMargin: 100
text: "SF UI Display Light"
font.family: "SF UI Display"
font.pixelSize: 28
font.weight: Font.Light
}
but i see some other font, screen to qml, photoshop ->
https://joxi.ru/4zANB0SBwVOoA9
what im doing wrong ?
Re: Qml font.weight not working?
Have you checked if QFontDatabase knows your font after you've added it?
Cheers,
_
Re: Qml font.weight not working?
Font there is in QFontDatabase
in QWidget hawe some result http://joxi.ru/wRmzQXS0V3pOrO?d=1
Font "Helvetica Neue" have some problem
Re: Qml font.weight not working?
On android, all font look is good. I`m can`t undrstand how this work on window. Standart application paint font is good, Qt use native render and can`t paint font.
Re: Qml font.weight not working?
So it happens with both render modes?
Qt and Native?
Cheers,
_