Closed FilippoBonazziSUSE closed 1 year ago
I can confirm the Chinese font shown above is BabelStone Han. Found out by https://repolinux.wordpress.com/2013/03/10/find-out-fallback-font-used-by-fontconfig-for-a-certain-character/
- font-family: "Source Sans Pro";
+ font-family: "Source Sans Pro", "Font Awesome 6 Free";
Should this solve the "Chinese" situation, I still have Ch. fonts.
- font-family: "Source Sans Pro"; + font-family: "Source Sans Pro", "Font Awesome 6 Free";
Should this solve the "Chinese" situation, I still have Ch. fonts.
The above "solves" the fonts displayed by Waybar, in the sense that Font Awesome is explicitly given precedence. I would still consider this a workaround more than a solution.
There is probably something specific to do to make it apply on a running system, but I haven't found it. The workaround worked fine for me after a reboot.
@denisok opinions on how to fix this in a better way?
I don\t see a better way, but by no means I am specialist in font's systems.
Idea of Font Awesome are icons and I think giving it precedence is a good thing. I suppose that for the characters that couldn't be displayed it would search in other fonts and display it correctly for the Titles and etc.
I vote to fix it as proposed and wait for complains from ppl to see if we need to fix it again.
I vote to fix it as proposed and wait for complains from ppl to see if we need to fix it again.
To fix it system-wide and wait for people to complain that they would rather have Chinese characters displayed? Or to fix it in the displayed Waybar only?
I would say the first one, as probably the subset of openSUSEway users which want to use this specific chinese font by default, overriding FontAwesome, is probably very small.
first one - waybar.
I'm sorry I still have no idea what solution you want to implement.
If anyone else is interested, I fixed it locally for my user by blacklisting the Babelstone Han font in ~/.config/fontconfig/fonts.conf
:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
<fontconfig>
<selectfont>
<rejectfont>
<pattern>
<patelt name="family" >
<string>Babelstone Han</string>
</patelt>
</pattern>
</rejectfont>
</selectfont>
</fontconfig>
I'm sorry I still have no idea what solution you want to implement.
As I understood, he prefers if you choose the solution that prefers the font awesome. I also support this solution.
So applying the diff above to the waybar configuration file.
Fixed in #118
Before I saw this I filed it as https://bugzilla.opensuse.org/show_bug.cgi?id=1212415 and made a SR that adds the fontawesome-fonts as a requirement. https://build.opensuse.org/request/show/1093494
After updating my Tumbleweed to snapshot 20230301 yesterday evening, I was greeted this morning by this sight:
After some investigation, it turns out that the latest snapshot updated these packages related to fonts:
One of these, maybe the
babelstone-han-fonts
font, seems to be taking precedence over the Fontawesome 6 font installed with openSUSEway.Fixing it in the displayed Waybar is easy enough (see https://github.com/Alexays/Waybar/issues/115):
However this is a broader system issue, since it shows up also when looking at the waybar configuration file directly e.g. in (neo)vim:
This is of course not good since you can't see what you're configuring.
I'm not sure what the best course of action would be. Having a Chinese font show up by default is obviously going to be a preferred choice for many people. However in practice it breaks our usage of Font Awesome in openSUSEway.