lipido / kargos

KDE Plasma port of GNOME Argos and OSX BitBar
GNU General Public License v3.0
126 stars 13 forks source link

Request: specify font weight (counterpart to QML's font.weight) #11

Open AndydeCleyre opened 7 years ago

AndydeCleyre commented 7 years ago

Hi,

Thanks for this great project. I noticed that the 0.6.0 supports spaces in attributes by using single quotes, but I have been unable to get it to use a font style "Iosevka Light," trying as follows:

fmt = " | font='Iosevka Light' size=24"

Iosevka (regular) works without problem.

$ fc-match "iosevka light"
iosevka-custom-light.ttf: "Iosevka" "Light"
lipido commented 7 years ago

Thank you for trying kargos. I have checked if there is a bug in parsing, but it seems that is related with Qt/QML.

What kargo does is to take the font attribute in the user script ('Iosevka Light') and assign it directly to the font property of a QML Label, without further modifications: http://doc.qt.io/qt-5/qml-qtquick-text.html#font.family-prop

Other examples do work, for example, try "free sans" vs "free serif"

$ fc-match "free sans"
FreeSans.ttf: "FreeSans" "Regular"

$ fc-match "free serif"
FreeSerif.ttf: "FreeSerif" "Regular"
AndydeCleyre commented 7 years ago

Thanks, that's very informative. Can we morph this ticket into a request for an attribute counterpart to QML's font.weight?

lipido commented 7 years ago

Yes, it is a good idea, a non-standard property "font.weight", for example.

On martes, 6 de junio de 2017 10:21:14 (CEST) Andy Kluger wrote:

Thanks, that's very informative. Can we morph this ticket into a request for an attribute counterpart to QML's font.weight ?