You are not logged in.

#1 2019-07-07 20:05:03

loggerhead
Member
Registered: 2019-07-07
Posts: 18

[SOLVED] Unicode sequence results in different icons

I want to customize my i3status bar with some nice icons. I installed ttf-font-awesome package with pacman. According to the cheatsheet, the icons should be accesible via simple unicode sequences. However, when I type those sequences in vim (e.g. Shift+v+u+f240 for a full battery icon), I get different icons (headphones in this case). Some other ttf icons are probably already installed. How can I access icons from ttf-font-awesome package?

Last edited by loggerhead (2019-07-21 12:58:48)

Offline

#2 2019-07-08 06:55:11

seth
Member
Registered: 2012-09-03
Posts: 51,945

Offline

#3 2019-07-08 18:21:37

loggerhead
Member
Registered: 2019-07-07
Posts: 18

Re: [SOLVED] Unicode sequence results in different icons

I defined bar font in ~/.config/i3/config exactly as noted in the article:

bar {
status_command i3blocks -c ~/.config/i3blocks/config
font pango:Source Sans Pro, FontAwesome 10
position top
}

I'm not aware of other location with font definition.

AwesomeFont is listed as fc-list output:

~/.local/share/fonts/fontawesome-webfont.ttf: FontAwesome:style=Regular

Still f240 code stands for headphones icon in vim editor. What is the bloody sequence for battery icon then??

Offline

#4 2019-07-08 20:04:25

seth
Member
Registered: 2012-09-03
Posts: 51,945

Re: [SOLVED] Unicode sequence results in different icons

in vim editor

Why would the i3 config affect vim, resp. your terminal emulator?

Also there seems some webfont in the way, resp. the name is wrong.
You're looking for

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

which I checked and it contains the desired glyph.

Offline

#5 2019-07-11 19:29:28

loggerhead
Member
Registered: 2019-07-07
Posts: 18

Re: [SOLVED] Unicode sequence results in different icons

You're looking for

Ok I added that font to fc-cache:

/usr/share/fonts/OTF/Font Awesome 5 Free-Solid-900.otf: Font Awesome 5 Free,Font Awesome 5 Free Solid:style=Solid

But something is still wrong. Almost every glyph corresponds to that of the cheatsheet - except the battery symbols. Independently from the input method (with unicode sequence in vim/terminal or copying the symbol from cheatsheet) the battery symbols are rendered differently.

For illustration, battery-full and battery-half are represented by different icons:
screen1.png
screen3.png

On the other side, bar code, bell and many other icons are rendered correctly:
screen2.png
screen4.png

It seems like Awesome Font is not activated properly.

Offline

#6 2019-07-11 19:44:28

seth
Member
Registered: 2012-09-03
Posts: 51,945

Re: [SOLVED] Unicode sequence results in different icons

That's neither i3 nor vim and the font cache won't do - you'll have to configure it as a substitute.
The headphones are probably resolved from the font you're using itself, you'd have to unconditioanlly prepend Awesome to be resolved first for every font (and will lose access to glyphs in the actual font that overlap w/ awesome)

The alternative is to resort to one of the maaaaaaany patched font sets.

Offline

#7 2019-07-21 11:00:44

loggerhead
Member
Registered: 2019-07-07
Posts: 18

Re: [SOLVED] Unicode sequence results in different icons

Problem solved with installed patched font from Nerd Fonts collection.

Offline

#8 2019-07-21 12:16:22

seth
Member
Registered: 2012-09-03
Posts: 51,945

Re: [SOLVED] Unicode sequence results in different icons

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

Board footer

Powered by FluxBB