Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upSet FontAwesome as first priority to avoid clashes #364
Conversation
In some cases FontAwesome icons were replaced by letters and symbols from other fonts. Add the font as the first priority in the style sheet to avoid this issue. Fixes #363
|
Unfortunately this doesn't seem to be a full fix. The ":" in the clock is now offset vertically because apparently it's coming from FontAwesome instead of Roboto. I fixed this manually in my stylesheet by adjusting #clock but that's probably not a real solution. |
|
It's actually worse than just the |
|
The only way I found to solve this was to sprinkle the config file with things like |
|
That's not a correct fix i think, we can add a style to force font on format-icon. |
|
Thanks. The workaround is working for me now because I have tooltips disabled anyway. This is definitely broken, I didn't close it in case I found a different solution to push into this branch/pr. |
|
If you move "FontAwesome 5 Free Solid" at the end, does it still fix the issue for you? font-family: Roboto, Helvetica, Arial, sans-serif, "FontAwesome 5 Free Solid"; |
|
I tried that as well. But then the conflicts return as the characters in Roboto are the ones that are conflicting with the ones in FontAwesome. |
|
Which characters are you talking about? IIRC this kind of issue is often related to font fallback in freetype and setting a list of font-families in Gtk CSS never helps because Gtk doesn't do font fallback itself (or only after freetype does its own font fallback, which makes the whole thing pointless). |
|
Here's an example from my config: That's how gedit renders those icons. Without the span forcing the font that's how Waybar displays things as well. Setting FontAwesome as priority fixes that but then there are other characters that are used from FontAwesome instead of Roboto, like ":" in the clock which then becomes vertically offset. |
|
Any update on this? I'm facing the issue as well. |
|
@jtheoof Does setting a font list for |
|
Yes @jplatte it works thank you. |
|
So I ended up doing things a little differently but heavily inspired. I created a custom font replacement with a So that I can have in
This way I have the Font Awesome override but only for the |
|
@Eluminae
You can read more about how to fix issues like this in the Arch wiki page 'Font configuration'. The section Replace or set default fonts might be especially interesting in your situation, or you might want to blacklist or uninstall a font that is claiming to support character ranges it doesn't actually supply useful characters for. |
|
Okay I got it.. In void packages we got font-awesome and font-awesome5. And guess what, font-awesome5 works very well with font-family: "FontAwesome 5 Free Solid", Roboto, Helvetica, Arial, sans-serif; |
|
Okay now the jtheoof's way with the Waybar font alias rocks ! |
|
@pedrocr I think this PR can now be closed since the proposed changes don't work the way they were intended to, right? I've just created an issue (see link above) about improving the documentation regarding font fallback which would probably be better for further discussion than a PR. |
|
IMHO, there is still missing something for the font to be used out of the box. We still not have the solution. |
|
Maybe providing another default template who do not use font-awesome could be minimalist alternative ? |
|
Thanks for this hint. Was looking for the reason why it behaves like this when installing a Nerd Font on my system. |
|
Here's what worked for me:
|
|
@rdnetto Do you actually have Roboto or Helvetica installed on your system? Does Waybar look any different if you set just
|
I can confirm I have Roboto installed. (I thought I had Helvetica installed, but I double checked and it turns out it's just "Adobe Helvetica").
Yes - the font changes, and For comparison, my current working config is
|
Right, so it's still just matching Roboto on the Gtk side and the actual per-glyph fallback happens inside fontconfig. |



In some cases FontAwesome icons were replaced by letters and symbols from other fonts. Add the font as the first priority in the style sheet to avoid this issue.