6

I'm using i3 with polybar including some font awesome characters in my workspace names but when I start polybar, it shows these errors:

warn: Dropping unmatched character  (U+e26f)
warn: Dropping unmatched character  (U+e028)
warn: Dropping unmatched character  (U+e026)
warn: Dropping unmatched character  (U+e21a)
warn: Dropping unmatched character  (U+e23a)
warn: Dropping unmatched character  (U+e0cb)
warn: Dropping unmatched character  (U+e016)
warn: Dropping unmatched character  (U+e10c)

I've tried my best to define the fonts in the polybar config file but it doesn't work! my polybar config file fonts:

font-0 = System San Francisco Display:size=9
font-1 = Font Awesome 5 Brands Regular:size=9
font-2 = Font Awesome 5 Free Regular:size=9
font-3 = Font Awesome 5 Free Solid:size=9

And this is the output of fc-list | grep Awesome:

/home/user/.fonts/fa-brands-400.ttf: Font Awesome 5 Brands,Font Awesome 5 Brands Regular:style=Regular
/home/user/.fonts/fa-regular-400.ttf: Font Awesome 5 Free,Font Awesome 5 Free Regular:style=Regular
/home/user/.fonts/fa-solid-900.ttf: Font Awesome 5 Free,Font Awesome 5 Free Solid:style=Solid

2 Answers 2

5

The polybar wiki has a guide for debugging font issues.

Step 2 says:

Check that all the icons you use are available in the fonts used:
Use gucharmap and enable View > Show only glyphs from this font (this is important), then search (Ctrl-F) for the dropped characters (copy them from the terminal output), then switch to each font in your config, using the dropdown in the top left. If the desired icon never shows up, none of the fonts in your polybar config support that icon. To find a font that provides that icon, we suggest you use the perl script at the bottom of this page.
Another way is to disable Show only glyphs from this font in gucharmap, the icon should now show up again, if it doesn't you don't have any font on your system that supports that icon. If it does show up, you can hold right click and it will show you the font it's from in the tooltip.

If you follow this step, you will see that those are not FontAwesome icons. Those are from siji. If you want to use that font, you also need to be aware that it is a bitmap font which are disabled by default on ubuntu. This askubuntu answer can tell you how to do that.

4
  • You say I can't use font awesome fonts on polybar?
    – Aidin
    Mar 25, 2020 at 13:17
  • No, font awesome works fine in polybar, I'm saying the warnings in your post are not about font awesome characters. Mar 25, 2020 at 13:26
  • I did those commands in that thread but still dropping characters...!
    – Aidin
    Mar 25, 2020 at 13:32
  • So you have installed the siji font, enabled bitmap fonts, added the font to polybar with the right font name and are still dropping characters? Mar 25, 2020 at 13:43
0

@Aidin There's a perl script on the polybar wiki font page. You can use the script to find out about fonts featuring a particular codepoint.

    #!/usr/bin/perl
    # https://github.com/fbreitwieser
    use strict;
    use warnings;
    use Font::FreeType;
    my ($char) = @ARGV;
    foreach my $font_def (`fc-list`) {
        my ($file, $name) = split(/: /, $font_def);
        my $face = Font::FreeType->new->face($file);
        my $glyph = $face->glyph_from_char($char);
        if ($glyph) {
            print $font_def;
        }
    }

If you save the code snippet in a file 'find_font.pl' just call it via perl find_glyph.pl "". It will get you the fonts providing the glyph.

You might have to install the FreeType Perl module. On Debian-based systems you do so with:

apt install libfont-freetype-perl

Or install it manually:

perl -MCPAN -e 'install Font::FreeType'

HTH

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .