i3lock-color icon indicating copy to clipboard operation
i3lock-color copied to clipboard

Option to specify font styles.

Open pslobo opened this issue 4 years ago • 3 comments

This issue is a....

[ ] Bug
[x] Other kind of issue (Please describe in detail)

Current Behavior

I'm trying to define font styles/variants for the various text options (time, date, verify etc.) and haven't managed to get this working. I may be missing something (new user so some things still foreign to me), but I've tried various things.

Testing with Roboto for instance, this is the list of fonts and styles. As you can see, the font name is always the same, just the style and path vary.

/usr/share/fonts/TTF/Roboto-Medium.ttf: Roboto:style=Medium
/usr/share/fonts/TTF/Roboto-MediumItalic.ttf: Roboto:style=Medium Italic
/usr/share/fonts/TTF/RobotoCondensed-Bold.ttf: Roboto Condensed:style=Bold
/usr/share/fonts/TTF/Roboto-ThinItalic.ttf: Roboto:style=Thin Italic
/usr/share/fonts/TTF/Roboto-Regular.ttf: Roboto:style=Regular
/usr/share/fonts/TTF/Roboto-BoldItalic.ttf: Roboto:style=Bold Italic
/usr/share/fonts/TTF/RobotoCondensed-BoldItalic.ttf: Roboto Condensed:style=Bold Italic
/usr/share/fonts/TTF/RobotoCondensed-Regular.ttf: Roboto Condensed:style=Regular
/usr/share/fonts/TTF/RobotoCondensed-LightItalic.ttf: Roboto Condensed:style=Light Italic
/usr/share/fonts/TTF/Roboto-Light.ttf: Roboto:style=Light
/usr/share/fonts/TTF/RobotoCondensed-Italic.ttf: Roboto Condensed:style=Italic
/usr/share/fonts/TTF/Roboto-BlackItalic.ttf: Roboto:style=Black Italic
/usr/share/fonts/TTF/Roboto-Italic.ttf: Roboto:style=Italic
/usr/share/fonts/TTF/Roboto-Bold.ttf: Roboto:style=Bold
/usr/share/fonts/TTF/Roboto-LightItalic.ttf: Roboto:style=Light Italic
/usr/share/fonts/TTF/RobotoCondensed-Light.ttf: Roboto Condensed:style=Light
/usr/share/fonts/TTF/Roboto-Black.ttf: Roboto:style=Black
/usr/share/fonts/TTF/Roboto-Thin.ttf: Roboto:style=Thin

I've tried variations like --time-font="Roboto Thin" and --time-font=Roboto-Thin and nothing seems to work as expected.

Expected Behavior

Expected to be able to define font variants/styles.

Environment

Output of i3lock --version:

i3lock version: 2.13.c.3

Where'd you get i3lock-color from?

[x] AUR package (aur/i3lock-color-git)
[ ] Built from source yourself
[ ] Other (Please describe in detail)

pslobo avatar Jul 29 '21 12:07 pslobo

Try escaping the space with a backslash (\)? It works with --time-font=Nunito\ sans for me 🙂

Raymo111 avatar Aug 10 '21 03:08 Raymo111

Got this working with "Roboto:style=Thin" for others wondering too.

pslobo avatar Aug 26 '21 18:08 pslobo

Nice! I'll add that into the manpage.

Raymo111 avatar Aug 26 '21 19:08 Raymo111