Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dropping Unmatched Character #392

Closed
krionical opened this issue Jan 29, 2017 · 26 comments
Closed

Dropping Unmatched Character #392

krionical opened this issue Jan 29, 2017 · 26 comments

Comments

@krionical
Copy link

When I run polybar example (with the default config), I get this:

polybar example
warn: No monitor specified, using "DVI-I-2"
error: Disabling module "bspwm" (reason: Could not find socket: /tmp/bspwm_0_0-socket)
error: module/xbacklight: Could not get data (err: XCB_NAME (15))
error: Disabling module "xbacklight" (reason: Not supported for "DVI-I-2")
error: Disabling module "battery" (reason: No suitable way to get current charge state)
warn: Dropping unmatched character  (U+e26f)
warn: Dropping unmatched character  (U+e028)
warn: Dropping unmatched character  (U+e026)
warn: Dropping unmatched character  (U+e0cb)
warn: Dropping unmatched character  (U+e016)
warn: Dropping unmatched character  (U+e10c)
warn: Dropping unmatched character  (U+e26f)
warn: Dropping unmatched character  (U+e028)
warn: Dropping unmatched character  (U+e026)
warn: Dropping unmatched character  (U+e0cb)
warn: Dropping unmatched character  (U+e016)
warn: Dropping unmatched character  (U+e10c)
warn: Dropping unmatched character  (U+e26f)
warn: Dropping unmatched character  (U+e028)
warn: Dropping unmatched character  (U+e026)
warn: Dropping unmatched character  (U+e0cb)
warn: Dropping unmatched character  (U+e016)
warn: Dropping unmatched character  (U+e10c)
warn: Dropping unmatched character  (U+e26f)
warn: Dropping unmatched character  (U+e028)
warn: Dropping unmatched character  (U+e026)
warn: Dropping unmatched character  (U+e0cb)
warn: Dropping unmatched character  (U+e016)
warn: Dropping unmatched character  (U+e10c)
warn: Dropping unmatched character  (U+e26f)
warn: Dropping unmatched character  (U+e028)
warn: Dropping unmatched character  (U+e026)
warn: Dropping unmatched character  (U+e0cb)
warn: Dropping unmatched character  (U+e016)
warn: Dropping unmatched character  (U+e10c)
warn: Dropping unmatched character  (U+e26f)
warn: Dropping unmatched character  (U+e028)
warn: Dropping unmatched character  (U+e026)
warn: Dropping unmatched character  (U+e0cb)
warn: Dropping unmatched character  (U+e016)
warn: Dropping unmatched character  (U+e10c)

The unmatched character issue will run in a loop. As far as I know, I have all the requirements met to install Polybar. It seems like the modules re-load and I can't tell if it due to a font, or a module problem, or something else.

@pazz
Copy link

pazz commented Jan 30, 2017

I get the same thing, I believe it is due to some utf-8 charcters in our config (the example config contains many of those).

My config contains

font-3 = FontAwesome:pixelsize=14;0

which should be present:

fc-match FontAwesome:pixelsize=14
FontAwesome.otf: "FontAwesome" "Regular"

Any ideas?

@jaagr
Copy link
Member

jaagr commented Jan 31, 2017

The example config requires the siji font. Just remove/replace the unicode characters if you don't have the font.

@pazz
Copy link

pazz commented Jan 31, 2017

OK, thanks. I am fighting to get this font installed here (debian testing). Dis anyone get this to work?
I suppose this issue is "solved" then and could be closed.

@krionical
Copy link
Author

I have the siji font installed, or so that's what it says. I'd be happy to perform some checks on that if necessary.

@stooj
Copy link

stooj commented Feb 1, 2017

OK, after quite a while fighting with this, I've managed to get rid of the warnings.

On my (Arch) box, siji is installed, but font-2 = siji:pixelsize=10;1 does not match the actual font. Using fc-match I've managed to get it working by using the following three fonts:

font-0 = fixed:pixelsize=10;1
font-1 = unifont:fontformat=truetype:size=8:antialias=false;0
font-2 = "Wuncon Siji:pixelsize=10;1"

@helionmelion
Copy link

helionmelion commented Feb 1, 2017

yes changing to wuncon siji the bar was able to show the character from "format-prefix = " ! but the message still remains

addendum
on the polybar - the character 𝄞 (song) is not showing but  (cpu) are showing.
strangely here in chromium, the song char is showing but the cpu char is showing like a small retangle ......

@Deluxo
Copy link

Deluxo commented Feb 1, 2017

My bitmap font's declaration stopped working, which looked like this: font-0 = --terminus-medium-r---12------iso10646-*;0
Using pango notation works, but now i get shitty pango rendering.
This is definitely a bug!

@jaagr
Copy link
Member

jaagr commented Feb 2, 2017

@Deluxo X fonts are no longer supported. Try font-0 = terminus:pixelsize=12

@jhnguyy
Copy link

jhnguyy commented Feb 6, 2017

I'm having an interesting case of this as well.

Dropping unmatched character (U+0002)

The thing is I am using plenty of fonts that should work with it.

font-0 = roboto:pixelsize=13 font-1 = fontawesome:pixelsize=13 font-2 = dejavusans:pixelsize=13 font-3 = unifont:pixelsize=13
(Sorry, I couldn't get the line breaks to work)

It broke while using Google Chrome, going to this link

This site says that the fonts I used above should work (Roboto/unifont).

Here are the fc-match outputs for the above fonts.
fc-match roboto:pixelsize=13 Roboto-Regular.ttf: "Roboto" "Regular"
fc-match fontawesome:pixelsize=13 fontawesome-webfont.ttf: "FontAwesome" "Regular"
fc-match dejavusans:pixelsize=13 DejaVuSans.ttf: "DejaVu Sans" "Book"
fc-match unifont:pixelsize=13 Unifont.ttf: "Unifont" "Medium"

polybar -v polybar 3.0.4

edit: Sorry about this. It seems like I didn't spend enough time researching this. This problem is the same as #393. My issue is coming from my config label = %title:0:50...% under xwindow. Using max-len option was a fix.

@jaagr
Copy link
Member

jaagr commented Feb 16, 2017

this should be fixed @skystrife's pr (#434)

@krionical
Copy link
Author

My solution to this problem eventually involved migrating to arch linux. I wound up crawling through the guts of Ubuntu changes to the font system such as where fonts are stored and eventually discovered fontconfig was not playing nice for whatever reason with the unicode fonts. So, I made the fatal mistake of uninstall fontconfig which I figured was probably a bad idea, and it took about a zillion packages with it including something that lightdm needed which basically made a mess of everything.

When I moved to arch and installed polybar, it worked fine. I think it has something to do with all the changes Ubuntu made to how fonts are stored and how that works with fontconfig. I hope your fix involves that somehow or accounts for it.

@jaagr
Copy link
Member

jaagr commented May 5, 2017

Closing due to inactivity.

@jaagr jaagr closed this as completed May 5, 2017
@JeremyKennedy
Copy link

I had the same issue, and fixed it with these commands:

# "Un-disable" bitmap fonts
sudo rm /etc/fonts/conf.d/70-no-bitmaps.conf
# Clear the font cache
sudo fc-cache -f -v

from: http://www.alanbriolat.co.uk/enable-bitmap-fonts-on-ubuntu-jaunty.html

@dessalines
Copy link

I'm still getting this issue, and none of the above fonts worked.

@mikroskeem
Copy link

mikroskeem commented Dec 30, 2017

EDIT: never mind, I was using old FA unicode representations so indeed font broke.

@sepastian
Copy link

If someone still needs this, here's how I got Siji to work under Debian GNU/Linux buster/sid.

Enable bitmap fonts with dpkg-reconfigure fontconfig-config (see https://wiki.debian.org/Fonts#Adding_fonts), probably better than manually removing /etc/fonts/conf.d/70-no-bitmaps.conf.

Install the Siji font as described at https://github.com/stark/siji, under ~/.fonts. Load it by adding this to ~/.Xsession.

xset +fp /home/sebastian/.fonts
xset fp rehash

Restart X and verify the font is available.

$ fc-list  | grep siji
/home/username/.fonts/siji.pcf: Siji:style=Regular
$ fc-match Siji
siji.pcf: "Siji" "Regular"

Setup fonts in polybar config.

font-0 = terminus:pixelsize=10;1
font-1 = unifont:fontformat=truetype:size=8:antialias=false;0
font-2 = Siji:pixelsize=10;1

Works for me.

@Maradox-D-Krypt
Copy link

I am running arch and for the longest time i kept having this issue. I am please to say though that after all my readings i found a solution that solve the error and may help others as well.

I thought i had the correct siji installed but then when i used fc-match siji my output was "Fura Mono Regular Nerd Font Complete Mono.otf: "FuraMono Nerd Font Mono" "Regular". Then i ran fc-list |grep siji and get no output.

The solution i found was to install the siji-git r22.9888311-1 version and it worked after installed and i restart i3. To install it i used yay siji.

Hope this was helpful.

@FrenzyExists
Copy link

FrenzyExists commented May 29, 2020

Ok, so I have a prob with my fonts as well and my case is a bit different. On my KDE Neon I have a xfce-i3 setup and wanted to get polybar working as a replacement of the i3blocks. Problem is, I get this:
image

The fonts I have are not bitmap fonts since my system has those blocked and can't install them. So I have these:

font-0 = "Fantasque Sans Mono:pixelsize=10;3" font-1 = "Iosevka Nerd Font:pixelsize=13;3"
I can get it rendered n' all, but the charging animation doesn't stop cycling. I don't know if its a normal thing or not, but I keep getting this message on my terminal when launching polybar. I tried changing the number of icons, the icons themselves, anything I could think of. The discharging animation, however, is just fine, for now.

Here's my battery module setup:

`
[module/battery]
type = internal/battery

; This is useful in case the battery never reports 100% charge
full-at = 99

; Use the following command to list batteries and adapters:
; $ ls -1 /sys/class/power_supply/
battery = BAT0
adapter = ACAD

; If an inotify event haven't been reported in this many
; seconds, manually poll for new values.
;
; Needed as a fallback for systems that don't report events
; on sysfs/procfs.
;
; Disable polling by setting the interval to 0.
;
; Default: 5
poll-interval = 2

; see "man date" for details on how to format the time string
; NOTE: if you want to use syntax tags here you need to use %%{...}
; Default: %H:%M:%S
time-format = %H:%M

; Available tags:
; (default)
;
;
;
format-charging =

; Available tags:
; (default)
;
;
;
format-discharging =

; Available tags:
; (default)
;
;
;format-full =

; Available tokens:
; %percentage% (default)
; %time%
; %consumption% (shows current charge rate in watts)

label-charging = %percentage%%

; Available tokens:
; %percentage% (default)
; %time%
; %consumption% (shows current discharge rate in watts)
label-discharging = %percentage%%

; Available tokens:
; %percentage% (default)
label-full = Fully Charged

; Only applies if is used
format-full-prefix = " "
ramp-capacity-0 = 
ramp-capacity-1 = 
ramp-capacity-2 = 
ramp-capacity-3 = 
ramp-capacity-4 = 
ramp-capacity-5 = 
ramp-capacity-6 = 
ramp-capacity-7 = 
ramp-capacity-8 = 
ramp-capacity-9 = 

ramp-capacity-0-foreground = ${color.red}
ramp-capacity-1-foreground = ${color.red}
ramp-capacity-foreground = ${color.fg}
;bar-capacity-width = 10

; Only applies if is used
;bar-capacity-width = 10

; Only applies if is used

animation-charging-0 = 
animation-charging-1 = 
animation-charging-2 = 
animation-charging-3 = 
animation-charging-4 = 
animation-charging-5 = 
animation-charging-6 = 

; Framerate in milliseconds
animation-charging-framerate = 750
`

Does anyone know why I keep getting this error with the charging icons?

@coderjojo
Copy link

coderjojo commented Sep 4, 2020

I had the same issue, and fixed it with these commands:

# "Un-disable" bitmap fonts
sudo rm /etc/fonts/conf.d/70-no-bitmaps.conf
# Clear the font cache
sudo fc-cache -f -v

from: http://www.alanbriolat.co.uk/enable-bitmap-fonts-on-ubuntu-jaunty.html

It worked for me but now my fonts are not rendering properly on Firefox and polybar. Any quick fix for it?
Screenshot_2020-09-04 Dropping Unmatched Character · Issue #392 · polybar polybar

Edit: This error was due to fonts got corrupted
sudo apt-get install --reinstall --purge fontconfig fontconfig-config

@dzintars
Copy link

dzintars commented Oct 31, 2020

So, my Polybar set-up is locked into simple Ansible rule and recently it just started to fail:
Siji
Definitely Siji is there and i have no any other font issues at all.
Any more ideas, how to troubleshoot/fix this besides dropping Polybar or replacing characters?
EDIT 1: Does not help if i move Siji to the ~/.local/share/fonts/
EDIT 2: Seems Polybar is not picking up right characters ... or .. using some fall-back???
image
EDIT 3: It looks like it does not pick up the config??? But then why my modules are set correctly when using launch script?
image
EDIT 4: Even removed all occurances of CPU character and restarted polybar, but still...
image
EDIT 5: I am definitely spending too much my time to fix this. At this point thinking to ditch the Polybar
EDIT 6: Building from master does not help:
image
EDIT 7: Renamed /usr/local/share/doc/polybar/config to config-bak to be sure that only my own $HOME/.config/polybar/config kicks in. Still no luck.

@patrick96
Copy link
Member

@dzintars Those dropped characters don't look like siji characters, pretty sure they are from FontAwesome and you don't have FontAwesome in your font list.
Are you sure the launch script uses the config at ~/.config/polybar/config or does it set some other path?

Also, polybar nevers load the config from /usr/local/share/doc/polybar/config unless you explicitly specify it.

@dzintars
Copy link

dzintars commented Nov 1, 2020

@patrick96 How about... i am a tired idiot? Editing just a Ansible rule files does not mean it will take an effect automatically... 😅 I just was in wrong context and was thinking that i am editing actual config file. Should i delete my issue above? And the issue indeed was in the deleted Font Awesome.

@patrick96
Copy link
Member

I think we all had these moments 😄

You can leave it. Doesn't really matter.

@velespr0
Copy link

velespr0 commented Nov 13, 2021

Debian linux 11
Install Siji font as described at https://github.com/stark/siji
Create an exception rule for siji https://owl.eu.com/posts/debian-demystified-installing-bitmap-fonts.html

@Twix53791
Copy link

A noob answer : first check if you are not trying to use a non existent character. I just loose 1h of my life trying to understand why I couldn't display a weather icon from nerd font on my polybar. I was in fact trying using the unicode character got from the nerd font site (https://www.nerdfonts.com/cheat-sheet?set=nf-weather-), but it is not the same on my computer, as I simply saw it on Libbre Office Writer... It was in fact so simple... Like always in the noob life...

@xcenai
Copy link

xcenai commented Mar 16, 2022

A noob answer : first check if you are not trying to use a non existent character. I just loose 1h of my life trying to understand why I couldn't display a weather icon from nerd font on my polybar. I was in fact trying using the unicode character got from the nerd font site (https://www.nerdfonts.com/cheat-sheet?set=nf-weather-), but it is not the same on my computer, as I simply saw it on Libbre Office Writer... It was in fact so simple... Like always in the noob life...

Can you make this more understandable. It doesn't make any sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests