yabar
yabar copied to clipboard
Pango unknown glyph with certain fonts
Pango has a certain "feature" where spaces use the font for the character before the space. As a result, there can be some undesirable results:
- fonts without space characters will display tofu symbols (example here).
- when switching between symbolic and monospace fonts, the width will be incorrect (it uses the symbol font's space).
One solution to the former is to add a fallback attribute to each space. With the latter, a specific font family can be applied through another attribute.
So far, the only workaround I've come up with is looping through each buffer text, finding any spaces, and applying a fallback attribute to every space.
It is already possible to specify multiple (fallback) fonts in yabar, e.g.:
font: "Droid Sans, FontAwesome Bold 9";
Doesn't this cover the missing spaces?
No, for some reason it doesn't switch fonts for spaces, so we have to do it manually.
FontAwesome has spaces, but Material Design Icons doesn't. If you use FontAwesome with a monospace font, the spaces will be that of FontAwesome, rather than that of the monospace one, making it look unbalanced. Material Design Icons just shows tofu symbols.
Maybe this should be set as a compile flag?
Here's an example for the wrong spacing size (fonts are Source Code Pro and FontAwesome).
First one uses <tt> </tt>
instead of just a space, making them have proper width.
FontAwesome v5 apparently has no more space character as I'm facing this issue :|.
/edit event internal-spacing does output a tofu symbol.
I use Archlinux and something happened after my last update a week ago. Some icons aren't showing correctly. But I don't my problem is related to this issue. Something happened with FontAwesome 5 I guess
Regarding the FontAwesome5 thing, there is this Arch bug report: https://bugs.archlinux.org/task/56899
Can't believe Pango still hasn't fixed that. Does the fix_pango
branch still fix this issue? I just rebased it onto master.
With the fix_pango branch and following fonts font: "DejaVu Sans Mono 10, Siji 10, MaterialDesignIcons 10";
I'm still having those unknown glyphs
Tried the fix_pango
branch without success. I'm using Source Code Pro and awesome 5.
Updating/installing these packages fixed the issue for me:
otf-font-awesome ttf-font-awesome