You are not logged in.
Hi, I have searched and found similar issues but so far, none that have helped me out. I am trying to display "Font Awesome 5 Free" icons in my Polybar, but I keep getting "Dropping unmatched character" errors and the icon wont appear in my modules. I have used fc-list to verify that the font is installed ok:
/etc/fonts/conf.d ∮ fc-list | grep -i awesome
/usr/share/fonts/TTF/fa-brands-400.ttf: Font Awesome 5 Brands,Font Awesome 5 Brands Regular:style=Regular
/usr/share/fonts/OTF/Font Awesome 5 Brands-Regular-400.otf: Font Awesome 5 Brands,Font Awesome 5 Brands Regular:style=Regular
/usr/share/fonts/TTF/fontawesome-webfont.ttf: FontAwesome:style=Regular
/usr/share/fonts/OTF/Font Awesome 5 Free-Regular-400.otf: Font Awesome 5 Free,Font Awesome 5 Free Regular:style=Regular
/usr/share/fonts/TTF/fa-solid-900.ttf: Font Awesome 5 Free,Font Awesome 5 Free Solid:style=Solid
/usr/share/fonts/TTF/fa-regular-400.ttf: Font Awesome 5 Free,Font Awesome 5 Free Regular:style=Regular
/usr/share/fonts/OTF/FontAwesome.otf: FontAwesome:style=Regular
/usr/share/fonts/OTF/Font Awesome 5 Free-Solid-900.otf: Font Awesome 5 Free,Font Awesome 5 Free Solid:style=Solid
/etc/fonts/conf.d ∮
But when I do an fc-match, the result seems to be aliased or something and I can't work out how to correct that. I'm assuming this is the reason why Polybar can't see the font (because fc-match doesn't appear to be able to).
/etc/fonts/conf.d ∮ fc-match Awesome
DejaVuSans.ttf: "DejaVu Sans" "Book"
/etc/fonts/conf.d ∮
/etc/fonts/conf.d ∮ fc-match Roboto
Roboto-Regular.ttf: "Roboto" "Regular"
/etc/fonts/conf.d ∮
/etc/fonts/conf.d ∮
/etc/fonts/conf.d ∮ fc-match Siji
siji.bdf: "Siji" "Regular"
/etc/fonts/conf.d ∮
As you can see, fc-match registers DejaVu Sans when queried about Awesome, but returns the correct results back for Roboto and Siji. I also note that Siji did work in my Polybar, but the icons were a bit small and not visually appealing to me, hence why I want Font Awesome 5 working.
I added in this file as per suggestion from the Wiki here: https://wiki.archlinux.org/index.php/Fo … emoji_font but it didn't seem to help;
/etc/fonts/conf.d/55-emoji-prepend.conf:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match>
<test name="prgname">
<string>polybar</string>
</test>
<edit name="family" mode="prepend" binding="weak">
<string>Font Awesome 5 Free</string>
</edit>
</match>
</fontconfig>
I also followed up with
fc-cache -f
but it made no difference.
I have followed the directions here: https://github.com/polybar/polybar/wiki … ont-issues and copy-pasted the dropped unicodes from terminal in to gucharmap and it shows the icon there as expected.
Here is my font config directory listing:
~ ∮ cd /etc/fonts/conf.d/
/etc/fonts/conf.d ∮ la
lrwxrwxrwx 44 root 19 Jun 10:54 10-hinting-slight.conf -> /etc/fonts/conf.avail/10-hinting-slight.conf
lrwxrwxrwx 48 root 19 Jun 10:54 10-scale-bitmap-fonts.conf -> /etc/fonts/conf.avail/10-scale-bitmap-fonts.conf
lrwxrwxrwx 35 root 27 Sep 21:44 10-sub-pixel-rgb.conf -> ../conf.avail/10-sub-pixel-rgb.conf
lrwxrwxrwx 55 root 29 Jun 19:28 20-unhint-small-dejavu-lgc-sans-mono.conf -> ../conf.avail/20-unhint-small-dejavu-lgc-sans-mono.conf
lrwxrwxrwx 50 root 29 Jun 19:28 20-unhint-small-dejavu-lgc-sans.conf -> ../conf.avail/20-unhint-small-dejavu-lgc-sans.conf
lrwxrwxrwx 51 root 29 Jun 19:28 20-unhint-small-dejavu-lgc-serif.conf -> ../conf.avail/20-unhint-small-dejavu-lgc-serif.conf
lrwxrwxrwx 51 root 29 Jun 19:28 20-unhint-small-dejavu-sans-mono.conf -> ../conf.avail/20-unhint-small-dejavu-sans-mono.conf
lrwxrwxrwx 46 root 29 Jun 19:28 20-unhint-small-dejavu-sans.conf -> ../conf.avail/20-unhint-small-dejavu-sans.conf
lrwxrwxrwx 47 root 29 Jun 19:28 20-unhint-small-dejavu-serif.conf -> ../conf.avail/20-unhint-small-dejavu-serif.conf
lrwxrwxrwx 47 root 19 Jun 10:54 20-unhint-small-vera.conf -> /etc/fonts/conf.avail/20-unhint-small-vera.conf
lrwxrwxrwx 44 root 19 Jun 10:54 30-metric-aliases.conf -> /etc/fonts/conf.avail/30-metric-aliases.conf
lrwxrwxrwx 35 root 19 Sep 10:44 30-win32-aliases.conf -> ../conf.avail/30-win32-aliases.conf
lrwxrwxrwx 38 root 19 Jun 10:54 40-nonlatin.conf -> /etc/fonts/conf.avail/40-nonlatin.conf
lrwxrwxrwx 37 root 19 Jun 10:54 45-generic.conf -> /etc/fonts/conf.avail/45-generic.conf
lrwxrwxrwx 35 root 19 Jun 10:54 45-latin.conf -> /etc/fonts/conf.avail/45-latin.conf
lrwxrwxrwx 31 root 12 Jan 5:32 46-noto-mono.conf -> ../conf.avail/46-noto-mono.conf
lrwxrwxrwx 31 root 12 Jan 5:32 46-noto-sans.conf -> ../conf.avail/46-noto-sans.conf
lrwxrwxrwx 32 root 12 Jan 5:32 46-noto-serif.conf -> ../conf.avail/46-noto-serif.conf
lrwxrwxrwx 39 root 19 Jun 10:54 49-sansserif.conf -> /etc/fonts/conf.avail/49-sansserif.conf
lrwxrwxrwx 34 root 19 Jun 10:54 50-user.conf -> /etc/fonts/conf.avail/50-user.conf
lrwxrwxrwx 35 root 19 Jun 10:54 51-local.conf -> /etc/fonts/conf.avail/51-local.conf
lrwxrwxrwx 35 root 25 Sep 23:50 55-emoji-prepend.conf -> ../conf.avail/55-emoji-prepend.conf
lrwxrwxrwx 38 root 29 Jun 19:28 57-dejavu-sans-mono.conf -> ../conf.avail/57-dejavu-sans-mono.conf
lrwxrwxrwx 33 root 29 Jun 19:28 57-dejavu-sans.conf -> ../conf.avail/57-dejavu-sans.conf
lrwxrwxrwx 34 root 29 Jun 19:28 57-dejavu-serif.conf -> ../conf.avail/57-dejavu-serif.conf
lrwxrwxrwx 42 root 29 Jun 19:28 58-dejavu-lgc-sans-mono.conf -> ../conf.avail/58-dejavu-lgc-sans-mono.conf
lrwxrwxrwx 37 root 29 Jun 19:28 58-dejavu-lgc-sans.conf -> ../conf.avail/58-dejavu-lgc-sans.conf
lrwxrwxrwx 38 root 29 Jun 19:28 58-dejavu-lgc-serif.conf -> ../conf.avail/58-dejavu-lgc-serif.conf
lrwxrwxrwx 37 root 19 Jun 10:54 60-generic.conf -> /etc/fonts/conf.avail/60-generic.conf
lrwxrwxrwx 35 root 19 Jun 10:54 60-latin.conf -> /etc/fonts/conf.avail/60-latin.conf
lrwxrwxrwx 43 root 19 Jun 10:54 65-fonts-persian.conf -> /etc/fonts/conf.avail/65-fonts-persian.conf
lrwxrwxrwx 38 root 19 Jun 10:54 65-nonlatin.conf -> /etc/fonts/conf.avail/65-nonlatin.conf
lrwxrwxrwx 31 root 12 Jan 5:32 66-noto-mono.conf -> ../conf.avail/66-noto-mono.conf
lrwxrwxrwx 31 root 12 Jan 5:32 66-noto-sans.conf -> ../conf.avail/66-noto-sans.conf
lrwxrwxrwx 32 root 12 Jan 5:32 66-noto-serif.conf -> ../conf.avail/66-noto-serif.conf
lrwxrwxrwx 37 root 19 Jun 10:54 69-unifont.conf -> /etc/fonts/conf.avail/69-unifont.conf
lrwxrwxrwx 33 root 16 May 21:20 69-urw-bookman.conf -> ../conf.avail/69-urw-bookman.conf
lrwxrwxrwx 30 root 16 May 21:20 69-urw-c059.conf -> ../conf.avail/69-urw-c059.conf
lrwxrwxrwx 34 root 16 May 21:20 69-urw-d050000l.conf -> ../conf.avail/69-urw-d050000l.conf
lrwxrwxrwx 44 root 16 May 21:20 69-urw-fallback-backwards.conf -> ../conf.avail/69-urw-fallback-backwards.conf
lrwxrwxrwx 43 root 16 May 21:20 69-urw-fallback-generics.conf -> ../conf.avail/69-urw-fallback-generics.conf
lrwxrwxrwx 44 root 16 May 21:20 69-urw-fallback-specifics.conf -> ../conf.avail/69-urw-fallback-specifics.conf
lrwxrwxrwx 32 root 16 May 21:20 69-urw-gothic.conf -> ../conf.avail/69-urw-gothic.conf
lrwxrwxrwx 40 root 16 May 21:20 69-urw-nimbus-mono-ps.conf -> ../conf.avail/69-urw-nimbus-mono-ps.conf
lrwxrwxrwx 38 root 16 May 21:20 69-urw-nimbus-roman.conf -> ../conf.avail/69-urw-nimbus-roman.conf
lrwxrwxrwx 37 root 16 May 21:20 69-urw-nimbus-sans.conf -> ../conf.avail/69-urw-nimbus-sans.conf
lrwxrwxrwx 30 root 16 May 21:20 69-urw-p052.conf -> ../conf.avail/69-urw-p052.conf
lrwxrwxrwx 45 root 16 May 21:20 69-urw-standard-symbols-ps.conf -> ../conf.avail/69-urw-standard-symbols-ps.conf
lrwxrwxrwx 30 root 16 May 21:20 69-urw-z003.conf -> ../conf.avail/69-urw-z003.conf
lrwxrwxrwx 39 root 19 Jun 10:54 80-delicious.conf -> /etc/fonts/conf.avail/80-delicious.conf
lrwxrwxrwx 28 root 8 Jul 1:50 81-ubuntu.conf -> ../conf.avail/81-ubuntu.conf
lrwxrwxrwx 39 root 19 Jun 10:54 90-synthetic.conf -> /etc/fonts/conf.avail/90-synthetic.conf
.rw-r--r-- 967 root 19 Jun 10:54 README
/etc/fonts/conf.d ∮
Any help is greatly appreciated.
Last edited by coxe87b (2020-10-02 13:15:09)
Desktop: Arch Linux | i3-gaps WM | Intel Core i5-9600K | 16GB RAM | AMD Radeon RX 6700XT | Dual monitors @ 1440p + 1080p
Laptop: Garuda Linux | Sway WM | Dell Latitude E7270 | Intel Core i5-6300U | 16GB RAM
~ Do or do not, there is no try ~
Offline
You need to use the exact name listed by fc-list.
So, for example if you want to use the font at /usr/share/fonts/TTF/fa-brands-400.ttf, you will need to use "Font Awesome 5 Brands,Font Awesome 5 Brands Regular:style=Regular":
$ fc-match "Font Awesome 5 Brands,Font Awesome 5 Brands Regular:style=Regular"
fa-brands-400.ttf: "Font Awesome 5 Brands" "Regular"
Other names may work but if it isn't a perfect match, this isn't guaranteed.
Offline
Thank you for your reply, and your suggestion lead me to the solution, however it was much simpler...
I'm embarrassed to say that it was a simple missing end-quotation mark that was the cause.
I had:
font-0 = "Font Awesome 5 Brands Regular:style=Regular:size=10;0
font-1 = "Font Awesome 5 Free Regular:style=Regular
Instead of:
font-0 = "Font Awesome 5 Brands Regular:style=Regular:size=10;0"
font-1 = "Font Awesome 5 Free Regular:style=Regular"
in my polybar config file.
Thanks anyway and hopefully that will teach me to double check the syntax before searching elsewhere.
Desktop: Arch Linux | i3-gaps WM | Intel Core i5-9600K | 16GB RAM | AMD Radeon RX 6700XT | Dual monitors @ 1440p + 1080p
Laptop: Garuda Linux | Sway WM | Dell Latitude E7270 | Intel Core i5-6300U | 16GB RAM
~ Do or do not, there is no try ~
Offline
I'd still however like to know why fc-match doesn't return the expected result as even:
~ ∮
~ ∮ fc-list | grep -i awesome
/usr/share/fonts/TTF/fa-brands-400.ttf: Font Awesome 5 Brands,Font Awesome 5 Brands Regular:style=Regular
/usr/share/fonts/OTF/Font Awesome 5 Brands-Regular-400.otf: Font Awesome 5 Brands,Font Awesome 5 Brands Regular:style=Regular
/usr/share/fonts/TTF/fontawesome-webfont.ttf: FontAwesome:style=Regular
/usr/share/fonts/OTF/Font Awesome 5 Free-Regular-400.otf: Font Awesome 5 Free,Font Awesome 5 Free Regular:style=Regular
/usr/share/fonts/TTF/fa-solid-900.ttf: Font Awesome 5 Free,Font Awesome 5 Free Solid:style=Solid
/usr/share/fonts/TTF/fa-regular-400.ttf: Font Awesome 5 Free,Font Awesome 5 Free Regular:style=Regular
/usr/share/fonts/OTF/FontAwesome.otf: FontAwesome:style=Regular
/usr/share/fonts/OTF/Font Awesome 5 Free-Solid-900.otf: Font Awesome 5 Free,Font Awesome 5 Free Solid:style=Solid
~ ∮
~ ∮ fc-match Font Awesome 5 Brands,Font Awesome 5 Brands Regular
~ ∮ fc-match Awesome
DejaVuSans.ttf: "DejaVu Sans" "Book"
~ ∮
Desktop: Arch Linux | i3-gaps WM | Intel Core i5-9600K | 16GB RAM | AMD Radeon RX 6700XT | Dual monitors @ 1440p + 1080p
Laptop: Garuda Linux | Sway WM | Dell Latitude E7270 | Intel Core i5-6300U | 16GB RAM
~ Do or do not, there is no try ~
Offline
Try
fc-match "Font Awesome 5 Brands"
Offline
Try
fc-match "Font Awesome 5 Brands"
Thank you, that combination seems to work. It appears that even though I don't need to enclose other fonts inside quotations, Font Awesome 5 Free [and Brands] seem to only return the correct result when enclosed in quotes.
Marking solved.
Desktop: Arch Linux | i3-gaps WM | Intel Core i5-9600K | 16GB RAM | AMD Radeon RX 6700XT | Dual monitors @ 1440p + 1080p
Laptop: Garuda Linux | Sway WM | Dell Latitude E7270 | Intel Core i5-6300U | 16GB RAM
~ Do or do not, there is no try ~
Offline
It's a shell thing, alternatively you'd have to escape the blanks.
The comma separates different name variants for the font
fc-match Font\ Awesome\ 5\ Brands\ Regular
should work as well
Offline
It's a shell thing, alternatively you'd have to escape the blanks.
The comma separates different name variants for the fontfc-match Font\ Awesome\ 5\ Brands\ Regular
should work as well
Thank you. Appreciate the insight.
Desktop: Arch Linux | i3-gaps WM | Intel Core i5-9600K | 16GB RAM | AMD Radeon RX 6700XT | Dual monitors @ 1440p + 1080p
Laptop: Garuda Linux | Sway WM | Dell Latitude E7270 | Intel Core i5-6300U | 16GB RAM
~ Do or do not, there is no try ~
Offline