greshake / i3status-rust

Very resourcefriendly and feature-rich replacement for i3status, written in pure Rust
GNU General Public License v3.0
2.87k stars 474 forks source link

awesome icons broken after ttf-font-awesome update on Arch #130

Closed eguiraud closed 6 years ago

eguiraud commented 6 years ago

As per the pacman logs below, ttf-font-awesome was updated by pacman on the 29th of December, which resulted in i3status-rust looking like this:

image

As you can see icons do not display properly anymore. removing i3status-rust-git and re-installing from AUR did not fix the issue.

Relevant snippet of pacman logs:

[2017-12-29 17:12] [PACMAN] Running 'pacman -Syu'                                                                       
[2017-12-29 17:12] [PACMAN] synchronizing package lists                                                                 
[2017-12-29 17:13] [PACMAN] starting full system upgrade                                                                
[2017-12-29 17:22] [ALPM] transaction started                                                                           
[2017-12-29 17:22] [ALPM] upgraded docker (1:17.11.0-1 -> 1:17.12.0-1)                                                  
[2017-12-29 17:22] [ALPM] upgraded mesa (17.3.0-2 -> 17.3.1-2)                                                          
[2017-12-29 17:22] [ALPM] upgraded firefox (57.0.2-1 -> 57.0.3-1)                                                       
[2017-12-29 17:22] [ALPM] upgraded lib32-mesa (17.3.0-2 -> 17.3.1-2)                                                    
[2017-12-29 17:22] [ALPM] upgraded numactl (2.0.11-1 -> 2.0.11-2)                                                       
[2017-12-29 17:22] [ALPM] upgraded ttf-font-awesome (4.7.0-5 -> 5.0.2-1)                                                
[2017-12-29 17:22] [ALPM] upgraded xorg-server-common (1.19.5-1 -> 1.19.6-2)                                            
[2017-12-29 17:22] [ALPM] upgraded xorg-server (1.19.5-1 -> 1.19.6-2)                                                   
[2017-12-29 17:22] [ALPM] transaction completed                                                                         
[2017-12-29 17:22] [ALPM] running 'fontconfig.hook'...                                                                  
[2017-12-29 17:22] [ALPM] running 'gtk-update-icon-cache.hook'...                                                       
[2017-12-29 17:22] [ALPM] running 'systemd-sysusers.hook'...                                                            
[2017-12-29 17:22] [ALPM] running 'systemd-update.hook'...                                                              
[2017-12-29 17:22] [ALPM] running 'update-desktop-database.hook'...                                                     
[2017-12-29 17:22] [ALPM] running 'xorg-mkfontdir.hook'... 
atheriel commented 6 years ago

This is due to the fact that version 4 and 5 of ttf-font-awesome are incompatible (see e.g. this issue for problems related to polybar). Try modifying your i3 config's font settings. If that doesn't work, my recommendation for now is to downgrade or use ttf-font-awesome-4 from the AUR. That's what I'm doing at the moment, and it works just fine.

eguiraud commented 6 years ago

Thank you for the quick response! If I understand correctly:

I am unsure what you mean with "try modifying your i3 config's font settings. Currently it's font pango:DejaVu Sans Mono, Awesome 15 but I don't know how to switch it to version 4 -- any idea? 😅

EDIT: can confirm that the following one-liner solves the issue, if uninstalling ttf-font-awesome is an option: sudo pacman -Rns ttf-font-awesome && pacaur -S ttf-font-awesome-4

atheriel commented 6 years ago

Since this is a font issue, it should be possible to modify your i3 config's settings to use the new font, e.g.

# with ttf-font-awesome-4:
font pango:DejaVu Sans Mono, FontAwesome 15
# with ttf-font-awesome:
font pango:DejaVu Sans Mono, FontAwesome5Free, FontAwesome5Brands 15

(You can see in the output of fc-list | grep Awesome that the name of the font has changed in version 5.) However, this doesn't actually work for me. I still get the same missing character artifacts.

This might be related to the fact that this Font Awesome does not have a blank space glyph, which was an issue for the Siji font at some point, although I'm really just guessing now.

I'll continue to recommend downgrading. There is some relevant discussion on Reddit as well.

I'm not sure this is actually a problem with i3status-rust, since we can't modify any of our code to fix external font problems, but I'll leave the issue open for now. I'll very welcome to suggestions.

eguiraud commented 6 years ago

I'm not sure this is actually a problem with i3status-rust, since we can't modify any of our code to fix external font problems, but I'll leave the issue open for now. I'll very welcome to suggestions.

That is fair, but at least the dependency should be changed to ttf-font-awesome-4 -- probably inform the AUR package maintainer if there is one.

atheriel commented 6 years ago

There's now some mention of this in the project README. I have no idea who is maintaining the AUR package, but perhaps @greshake will know.

mmetak commented 6 years ago

Hi, i3status-rust-git maintainer here. I've updated the font name in aur.

@bluehood Latest font awesome 5 doesn't conflict with previous version 4 so there's no need to remove ttf-awesome. File names are different and their font names are also different. Not sure why package in AUR has conflicts?

eguiraud commented 6 years ago

@mmetak thank you for the quick reply! I did not experience any conflicts, the problem is that i3status-rust does not support ttf-font-awesome anymore, only ttf-font-awesome-4

atheriel commented 6 years ago

@mmetak Hijacking this a little, but I'll also point out that i3status-rust runs just fine under sway, so if you can indicate that the sway package satisfies the i3 dependency that would be appreciated as well :smile:

mmetak commented 6 years ago

EDIT: can confirm that the following one-liner solves the issue, if uninstalling ttf-font-awesome is an option: sudo pacman -Rns ttf-font-awesome && pacaur -S ttf-font-awesome-4

I was reffering to this part that you wrote. ttf-font-awesome-4 package in AUR has conflicts=('ttf-font-awesome') when it doesn't conflict.
They both have different file and font names so you can install them both at the same time, only have to adjust config file with proper names as @atheriel pointed out above.

@atheriel I just dropped i3-wm from depends and updated description to indicate that you can use it with i3bar or swaybar. That seems like simplest solution?

eguiraud commented 6 years ago

@mmetak I see now, thanks! I went to the ttf-font-awesome-4 aur page to comment and saw that you already did :)

However I am not sure how i3 could decide which of the two icons to use if both packages were installed: the only line I have in my i3/config relative to font-awesome, which works for both version 4 and 5, is font pango:DejaVu Sans Mono, Awesome 15

mmetak commented 6 years ago

@bluehood

$ fc-list | grep Awesome
/usr/share/fonts/TTF/fa-regular-400.ttf: Font Awesome 5 Free:style=Regular
/usr/share/fonts/TTF/fontawesome-webfont.ttf: FontAwesome:style=Regular
/usr/share/fonts/TTF/fa-solid-900.ttf: Font Awesome 5 Free:style=Solid
/usr/share/fonts/TTF/fa-brands-400.ttf: Font Awesome 5 Brands:style=Regular

I use font pango:FontAwesome for version 4 of font awesome and font pango:Font Awesome 5 Free for when I want version 5.

eguiraud commented 6 years ago

fair enough :) as you can see I am very clumsy with fonts, sorry 😅

atheriel commented 6 years ago

It sounds like we should report this lack of conflict upstream to the ttf-font-awesome-4 package, IMO.

@mmetak That works nicely, thank you.

eguiraud commented 6 years ago

@atheriel it was reported here in the comments.

For what concerns me this issue can be closed: using ttf-font-awesome-4 solves the problem with the icons, and both the README and the AUR package now report ttf-font-awesome-4 as the optional dependency to get fancy icons :)

ryboe commented 6 years ago

I'm using otf-font-awesome, which is Font Awesome 5.0.9. Everything looks fine except the CPU icon is one of those weird glyphs.

Also, I don't think this issue should be closed. i3status should be updated to work with the latest Font Awesome.

i3status-rs version: 0.9

atheriel commented 6 years ago

I think insofar as we need to update the Unicode points used by the glyphs, that's probably true. I supported closing the issue primarily because this seemed to be more related to font specification in the i3 config than anything else. If we can isolate glyphs that have changed we should be able to make those changes relatively easily.

In the meantime you can change the icon used for the CPU in your config -- please let me know if that works.

yaymukund commented 6 years ago

In my case, the separator glyphs were bugging out because they require powerline-fonts by default. Solve by either installing powerline-fonts or change theme.overrides.separator

Before Before screenshot

After installing powerline-fonts After screenshot

lovesegfault commented 5 years ago

I also don't think this should be closed, upgrading to using FontAwesome5 should at least be on the roadmap.

atheriel commented 5 years ago

@bemeurer What aspect of FontAwesome5 do we not support?

lovesegfault commented 5 years ago

This is what my bar looks on Sway HEAD with the latest fontawesome (5.1.0) on Gentoo. foo This is what it looks with fontawesome 4.7.0 foo_2

Some icons are missing on both, namely volume and brightness, but I think it's clear that with 5.1.0 it seems to work very poorly, font-wise.

atheriel commented 5 years ago

We will need a list of glyphs than have had their unicode value changed between version 4 and 5.

glubsy commented 5 years ago

This was reported here to be a problem with pango.

Bug reports here, and here.

atheriel commented 5 years ago

Thanks for tracking that down, @glubsy.

r00tman commented 5 years ago

I think I found a workaround.

If a character doesn't belong to control, format, surrogate, or space separator categories, pango treats it like a normal symbol. That means, if it is invisible, we can safely mix it with whitespaces.

For example, there's one such symbol that works with current ttf-font-awesome: '\u{034f}' (COMBINING GRAPHEME JOINER). If you add one before the white space, the 0020 box goes away.

prismspecs commented 3 years ago

still broken

MaxVerevkin commented 3 years ago

@prismspecs What's broken?

ammgws commented 3 years ago

I assume using "awesome" instead of "awesome5" in the i3status-rust config