You are not logged in.

#1 2021-12-04 18:34:06

Ridwan Rawriet
Member
Registered: 2021-09-28
Posts: 33

[SOLVED] How to set fonts with commas and number in their names?

I was trying to define a font fallback sequence in my i3 config according to the instructions from i3 docs and this section in archWiki. Actually I just wanna have Font Awesome icons in my i3 status. I learned recently that fonts need to be defined as their names in fc-list. With fc-list | grep Awesome
I got the following output:

/usr/share/fonts/TTF/fa-brands-400.ttf: Font Awesome 5 Brands,Font Awesome 5 Brands Regular:style=Regular

/usr/share/fonts/TTF/fa-solid-900.ttf: Font Awesome 5 Free,Font Awesome 5 Free Solid:style=Solid

/usr/share/fonts/TTF/fa-regular-400.ttf: Font Awesome 5 Free,Font Awesom 5 Free Regular:style=Regular

I was going to paste everything that's between ...ttf: and :style... after my main font in the i3 config. But I noticed the these have commas and 2 of them have "Regular" in their name. The problem is i3 separates fonts with commas and the style that is "Regular" is to be appended after the font's name. Also there's the number 5 in their name. i3 use number to determine fonts' size. Won't these names conflict with the syntax? Can I just write as following?

font pango:My main font, Font Awesome 5 Brands,Font Awesome 5 Brands Regular, Font Awesome 5 Free,Font Awesome 5 Free Solid, Font Awesome 5 Free,Font Awesome 5 Free Regular Regular 10

Also say if I want different styles and font sizes for different fonts. How can I do that as they're to be written at the end of everything?

Last edited by Ridwan Rawriet (2022-01-28 12:01:23)

Offline

#2 2021-12-04 21:03:01

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,173

Re: [SOLVED] How to set fonts with commas and number in their names?

Those fonts don't have commans in their names, those are different names (for the same font)

fc-match Font Awesome 5 Brands
fc-match Font Awesome 5 Brands Regular

As for i3, did you try to quote the names? (Though since the size number has to tail the font, I'm not even sure whether that's a problem here)

Offline

#3 2021-12-04 22:29:40

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,493
Website

Re: [SOLVED] How to set fonts with commas and number in their names?

And if fc-match for "Font Awesome" lists the correct font, then you can sidestep the whole issue and leave off the "5 brands" part.

Unless you have other versions of font awesome installed and you need to specify the 5 to differentiate it from the others, you should be fine without it.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#4 2021-12-07 19:23:06

Ridwan Rawriet
Member
Registered: 2021-09-28
Posts: 33

Re: [SOLVED] How to set fonts with commas and number in their names?

Thank both you for correcting my silly misunderstanding ;-)

Offline

Board footer

Powered by FluxBB