polybar / polybar

A fast and easy-to-use status bar
https://polybar.github.io
MIT License
14.19k stars 710 forks source link

Keep getting unmatched symbol U+f011 (power menu icon) #1715

Closed lossdev closed 5 years ago

lossdev commented 5 years ago

Issue

I'm new to polybar and am trying to make my own bar, using the default config for reference. I've installed gucharmap as well to make sure my glyphs are in fact in the font set. All three of my fonts have U+0f11, but polybar seems to refuse to load it anyway.

To Reproduce

[colors] background = #000f0f0f foreground = #f4f9ff

[bar/top] width = 100% height = 38 fixed-center = false

background = ${colors.background} foreground = ${colors.foreground}

font-0 = fixed:pixelsize=18;1 font-1 = Unifont:style=Medium:fontformat=truetype:size=18:antialias=false;1 font-2 = Font Awesome 5 Free:style=Regular:pixelsize=18:size=18;1

modules-left = powermenu

cursor-click = pointer cursor-scroll = ns-resize

[module/powermenu] type = custom/menu label-active-font = 3 expand-right = true

format-spacing = 1

label-open =  label-font = 3 label-open-foreground = ${colors.foreground} label-separator = | label-separator-foreground = ${colors.foreground}

menu-0-0 = reboot
menu-0-0-exec = menu-open-1
menu-0-1 = power off
menu-0-1-exec = menu-open-2
menu-1-0 = cancel
menu-1-0-exec = menu-open-0
menu-1-1 = reboot
menu-1-1-exec = sudo reboot
menu-2-0 = power off
menu-2-0-exec = sudo poweroff
menu-2-1 = cancel
menu-2-1-exec = menu-open-0

[global/wm] margin-top = 5 margin-bottom = 5

Polybar Log

polybar -c ~/.config/polybar/config3 top -l info

* Loading config: /home/bmw417/.config/polybar/config3
warn: No monitor specified, using "eDP1"
* Loaded monitor eDP1 (3000x2000+0+0)
* Bar geometry: 3000x38+0+0
* Starting application
* Starting module/powermenu
* Entering event loop (thread-id=1)
* Eventqueue worker (thread-id=3)
* Configured DPI = 96x96
* Loaded font "fixed:pixelsize=18" (name=Arial, offset=1, file=/usr/share/fonts/steam-fonts/arial.ttf)
* Loaded font "Unifont:style=Medium:fontformat=truetype:size=18:antialias=false" (name=Unifont, offset=1, file=/usr/share/fonts/TTF/Unifont.ttf)
* Loaded font "Font Awesome 5 Free:style=Regular:pixelsize=18:size=18" (name=Font Awesome 5 Free, offset=1, file=/usr/share/fonts/TTF/fa-regular-400.ttf)
error: background_manager: Failed to get root pixmap for background (realloc=-1162935936)
* Bar window: 0x1a00001
error: background_manager: Failed to get root pixmap for background (realloc=-1162935936)
* Disabling tray manager (reason: missing `tray-position`)
* module/powermenu: Rebuilding cache
* Redrawing bar window
warn: Dropping unmatched character  (U+f011)
error: background_manager: Failed to get root pixmap for background (realloc=-1162935936)
* Redrawing bar window
warn: Dropping unmatched character  (U+f011)
error: background_manager: Failed to get root pixmap for background (realloc=-1162935936)
* Redrawing bar window
warn: Dropping unmatched character  (U+f011)
error: background_manager: Failed to get root pixmap for background (realloc=-1162935936)
* Redrawing bar window
warn: Dropping unmatched character  (U+f011)

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/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

fc-list | grep -i unifont

/usr/share/fonts/TTF/Unifont.ttf: Unifont:style=Medium
/usr/share/fonts/TTF/Unifont_Upper.ttf: Unifont Upper:style=Medium
/usr/share/fonts/TTF/Unifont_CSUR.ttf: Unifont CSUR:style=Medium

Environment:

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

X extensions: +randr (+monitors) -render -damage -sync +composite +xkb +xrm +xcursor

Build type: RelWithDebInfo Compiler: /usr/bin/c++ Compiler flags: -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -Wall -Wextra -Werror -Wno-noexcept-type -pedantic -pedantic-errors Linker flags: -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now

patrick96 commented 5 years ago

Read point 2 in Debugging Font issues. The dropped character is from ttf-font-icons

EDIT: Font Awesome and Unifont don't have this glyph. In gucharmap, you need to set View -> Show only glyphs from this font, otherwise gucharmap will show you icons from other fonts if the current one doesn't have it.

Also this powermenu icon is not in the sample config, the sample config uses U+E10C from Wuncon Siji

lossdev commented 5 years ago

Oh okay, thank you for the gucharmap tip. I did change the symbol from the siji to this one, since I've been having scaling problems with the Siji glyphs.

patrick96 commented 5 years ago

Yeah, unfortunately siji doesn't scale :frowning_face: