You are not logged in.

#1 2020-03-24 14:04:21

T8xi
Member
Registered: 2020-03-24
Posts: 2

Polybar dropping unmatched character. GNOME 3.36 + Siji / Font Awesome

Hello everybody,

I recently installed polybar 3.4.2 via AUR. I'm using GNOME as my DE and wanted to display a bar which displays some system information and the workspace I'm currently on.

$ polybar -v
polybar 3.4.2

Features: +alsa +curl +i3 +mpd +network(libnl) +pulseaudio +xkeyboard

It all works perfectly well until I start to add unicode character as shown in the instructions for the module/xworkspaces at https://github.com/polybar/polybar/wiki … workspaces

icon-0 = code;♚

so the crown in this example will not be printed

Instead I get the message "warn: Dropping unmatched character ♚ (U+265a)" as shown below.

$ polybar -l info systeminfo
* Loading config: /home/<DOMAIN>/<user>/config/polybar/config
* Loaded monitor DP-3-2 (1920x1080+3840+0)
* Bar geometry: 1920x20+3840+1060; Borders: 0,0,0,0
* Starting application
* Starting module/internet
* Starting module/vpnip
* Starting module/workspaces
* Starting module/hauptspeicher
* Starting module/cpu
* Starting module/temp
* Entering event loop (thread-id=1)
* Eventqueue worker (thread-id=7)
* Configured DPI = 96x96
* Loaded font "Noto Sans Mono:style=Regular:size=10" (name=Noto Sans Mono, offset=0, file=/usr/share/fonts/noto/NotoSansMono-Regular.ttf)
* Loaded font "Siji:style=Regular" (name=Siji, offset=0, file=/usr/share/fonts/misc/siji.bdf)
* Bar window: 0x2c00001
* Disabling tray manager (reason: missing `tray-position`)
* module/internet: Rebuilding cache
* module/vpnip: Rebuilding cache
* module/workspaces: Rebuilding cache
* module/hauptspeicher: Rebuilding cache
* module/cpu: Rebuilding cache
* module/temp: Rebuilding cache
* Redrawing bar window
warn: Dropping unmatched character ♚ (U+265a)
* module/workspaces: Rebuilding cache
* module/internet: Rebuilding cache
* module/vpnip: Rebuilding cache
* module/cpu: Rebuilding cache
* module/temp: Rebuilding cache
* Redrawing bar window

I already tried multiple things to resolve this issue.
I checked that the font name is resolving correctly:

$ fc-match "Siji:style=Regular"
siji.bdf: "Siji" "Regular"

I also tried to place the font in my ~/.fonts dir and did a:

$ fc-chache -r -v

I wrote icon-n with and without quotation marks without any effect

$ cat config 
; ---FARBEN---
[farben]
hintergrund=#dd222222
vordergrund=#dfdfdf
underline=#4bffdc


; ---MODULES---
[module/hauptspeicher]
type = internal/memory
interval = 2
label = RAM: %gb_used% used : %gb_free% free
format-underline = ${farben.underline}

[module/cpu]
type = internal/cpu
interval = 1
label = CPU: %percentage:2%%
format-underline = ${farben.underline}

[module/temp]
type = internal/temperature
format-underline = ${farben.underline}

[module/internet]
type = internal/network
interface = enp0s31f6
label-connected = IP: %local_ip% down: %downspeed% up: %upspeed%

[module/workspaces]
type = internal/xworkspaces
enable-click = false
enable-scroll = false

icon-0 = "work;♚"
icon-1 = "music;"
icon-2 = "misc;"

label-active-foreground = #ffffff
label-active-underline = #1d98c4

label-occupied-underline = #00bcff

; ---BARS---
[bar/systeminfo]
font-0 = "Noto Sans Mono:style=Regular:size=10"
font-1 = "Siji:style=Regular"
;font-0 = "Font Awesome 5 Free,Font Awesome 5 Free Regular:style=Regular"
;font-1 = "Font Awesome 5 Free,Font Awesome 5 Free Solid:style=Solid"
;font-2 = "Font Awesome 5 Brands,Font Awesome 5 Brands Regular:style=Regular"
;font-3 = "Noto Sans Mono:style=Regular:size=10"

monitor = DP-3-2
monitor-fallback = eDP-1
width = 100%
height = 20
bottom = true
background = ${farben.hintergrund}
foreground = ${farben.vordergrund}
line-size = 3
separator = |
modules-right = hauptspeicher cpu temp
modules-left = internet
modules-center = workspaces

I reordered the fonts in the config file to make sure this isnt a ordering problem and I also tried another glyphicon font (Font Awesome 5 installed via pacman from the community repo). All the above mentioned let to the same error and I'm sure this isn't an issue with polybar at all. The font seems to be loaded correctly and the error only appears whith the glyphicon / special character map. I also removed the Noto Sans Mono Font to see what happens. This produced a bunch of errors as polybar was unable to match normal characters.

So as the font is loaded into polybar I think the issue is related to something within my setup or configuration. Do you have any advice on how to proceed from here on? Sure I could live without glyphicons in my polybar bars but it really bothers me why this isn't working.

Offline

#2 2020-03-24 14:52:40

patrickziegler
Member
From: ::1
Registered: 2018-11-02
Posts: 29
Website

Re: Polybar dropping unmatched character. GNOME 3.36 + Siji / Font Awesome

There is a guide to help debugging such font issues on the polybar wiki.

It seems you followed steps 1 and 3, but your issue looks like something that can be resolved in step 2. The icon you are trying to render in polybar is not provided by any of the fonts you have specified.

On my system a bunch of support that icon, just not Noto Sans Mono (but Noto Sans Symbols2 does)

/usr/share/fonts/OTF/Meslo LG M DZ Regular for Powerline.otf: Meslo LG M DZ for Powerline:style=RegularForPowerline
/usr/share/fonts/OTF/Meslo LG L DZ Regular for Powerline.otf: Meslo LG L DZ for Powerline:style=RegularForPowerline
/usr/share/fonts/TTF/DejaVuSansCondensed.ttf: DejaVu Sans,DejaVu Sans Condensed:style=Condensed,Book
/usr/share/fonts/TTF/DejaVuSans-BoldOblique.ttf: DejaVu Sans:style=Bold Oblique
/usr/share/fonts/TTF/Symbola.ttf: Symbola:style=Regular
/usr/share/fonts/misc/6x12.pcf.gz: Misc Fixed:style=SemiCondensed
/usr/share/fonts/misc/10x20.pcf.gz: Misc Fixed:style=Regular
/usr/share/fonts/TTF/DejaVuSansMono.ttf: DejaVu Sans Mono:style=Book
/usr/share/fonts/misc/7x13.pcf.gz: Misc Fixed:style=Regular
/usr/share/fonts/Unifont/Unifont_jp.ttf: Unifont\-JP:style=JPMedium
/usr/share/fonts/TTF/DejaVu Sans Mono Bold for Powerline.ttf: DejaVu Sans Mono for Powerline:style=Bold
/usr/share/fonts/droid/DroidSansFallback.ttf: Droid Sans:style=Regular
/usr/share/fonts/OTF/Meslo LG L Regular for Powerline.otf: Meslo LG L for Powerline:style=RegularForPowerline
/usr/share/fonts/TTF/DejaVuSansCondensed-Oblique.ttf: DejaVu Sans,DejaVu Sans Condensed:style=Condensed Oblique,Oblique
/usr/share/fonts/TTF/DejaVuSansCondensed-BoldOblique.ttf: DejaVu Sans,DejaVu Sans Condensed:style=Condensed Bold Oblique,Bold Oblique
/usr/share/fonts/OTF/Meslo LG S DZ Regular for Powerline.otf: Meslo LG S DZ for Powerline:style=RegularForPowerline
/usr/share/fonts/OTF/Meslo LG M Regular for Powerline.otf: Meslo LG M for Powerline:style=RegularForPowerline
/usr/share/fonts/misc/6x13.pcf.gz: Misc Fixed:style=SemiCondensed
/usr/share/fonts/noto/NotoSansSymbols2-Regular.ttf: Noto Sans Symbols2:style=Regular
/usr/share/fonts/misc/9x18.pcf.gz: Misc Fixed:style=Regular
/usr/share/fonts/OTF/Meslo LG S Regular for Powerline.otf: Meslo LG S for Powerline:style=RegularForPowerline
/usr/share/fonts/misc/9x15.pcf.gz: Misc Fixed:style=Regular
/usr/share/fonts/TTF/DejaVu Sans Mono for Powerline.ttf: DejaVu Sans Mono for Powerline:style=Book
/usr/share/fonts/droid/DroidSansFallbackLegacy.ttf: Droid Sans:style=Regular
/usr/share/fonts/TTF/DejaVuSans-Oblique.ttf: DejaVu Sans:style=Oblique
/usr/share/fonts/TTF/DejaVuSansMono-Bold.ttf: DejaVu Sans Mono:style=Bold
/usr/share/fonts/Unifont/Unifont.ttf: Unifont:style=Medium
/usr/share/fonts/TTF/DejaVuSansCondensed-Bold.ttf: DejaVu Sans,DejaVu Sans Condensed:style=Condensed Bold,Bold
/usr/share/fonts/misc/8x13.pcf.gz: Misc Fixed:style=Regular
/usr/share/fonts/TTF/DejaVuSans.ttf: DejaVu Sans:style=Book
/usr/share/fonts/droid/DroidSansFallbackFull.ttf: Droid Sans:style=Regular
/usr/share/fonts/TTF/DejaVuSans-Bold.ttf: DejaVu Sans:style=Bold

Offline

#3 2020-03-24 19:02:21

T8xi
Member
Registered: 2020-03-24
Posts: 2

Re: Polybar dropping unmatched character. GNOME 3.36 + Siji / Font Awesome

You were absolutely right!
Especially the search script mentioned on the polybar site did the trick

$ perl utilities/scripts/test-fonts.pl "♚"    
/usr/share/fonts/gnu-free/FreeSerif.otf: FreeSerif:style=Mittel,Regular,нормален,normal,obyčejné,µεσαία,Normaali,Normál,Normale,Gemiddeld,odmiana zwykła,Обычный,Normálne,ปกติ,menengah,прямій,Navadno,vidējs,normalusis,عادی,vừa,Arrunta,सामान्य
/usr/share/fonts/misc/6x12.pcf.gz: Misc Fixed:style=SemiCondensed
/usr/share/fonts/misc/10x20.pcf.gz: Misc Fixed:style=Regular
/usr/share/fonts/misc/7x13.pcf.gz: Misc Fixed:style=Regular
/usr/share/fonts/misc/6x13.pcf.gz: Misc Fixed:style=SemiCondensed
/usr/share/fonts/noto/NotoSansSymbols2-Regular.ttf: Noto Sans Symbols2:style=Regular
/usr/share/fonts/misc/9x18.pcf.gz: Misc Fixed:style=Regular
/usr/share/fonts/misc/9x15.pcf.gz: Misc Fixed:style=Regular
/usr/share/fonts/misc/8x13.pcf.gz: Misc Fixed:style=Regular

What confuses me is that with

gucharmap

I was able to find the corresponding symbol in the fonts (siji and font awesome).
I searched again and now it does not appear anymore.
Thank you for the hint!

Offline

#4 2020-03-24 20:21:03

patrickziegler
Member
From: ::1
Registered: 2018-11-02
Posts: 29
Website

Re: Polybar dropping unmatched character. GNOME 3.36 + Siji / Font Awesome

You probably had "View > Show only glyphs from this font" disabled and because of that the icon was showing up even if it isn't from that font. I have now clarified that step a bit (hopefully)

Offline

Board footer

Powered by FluxBB