Powerline: Bad/partial powerline fonts in st and urxvt. No problem with gvim or lxterminal

Created on 26 Feb 2014  路  15Comments  路  Source: powerline/powerline

I really don't know how to solve the issue of powerline fonts not working properly in my system.

I use gentoo, with awesome as window manager and urxvt as the terminal emulator.

The problem / paradox is the following:

urxvt does not fully show the > and < separators:
urxvt-inconsolata

st neither does it:
st-inconsolata

vim from inside each of the terminals is not working properly neither:
vim_from_urxvt
vim_from_st

When I open a tmux session in each of the consoles, urxvt still gives trouble with everything:
tmux_from_urxvt

but st only has problems with separators (but not with clocks, etc):
tmux_from_st

In addition to st, I have also tried lxterminal, and it works perfectly out of the box:
lxterminal

More? Yes. Gvim shows the font and the > and < separators properly
gvim

So I am sure that there is something that escapes out of my mind. Why lxterminal works but not st and urxvt? Well probably it must be related to the font. Well, then, why st works partialy when a tmux session is working inside the emulator, but not urxvt?

I am using urxvt version 9.19 with unicode3 and xft compiled in. I have tried many specifications of different fonts (Meslo, with and without "for powerline" replacemenets, with different pixelsizes as suggested by https://github.com/Lokaltog/powerline/issues/453#issuecomment-16825527, obviously running xrdb -merge .Xdefaults each time), but with no luck or better results. The screenshots have been taken with the following fonts specifications:

URxvt*font: xft:Inconsolata,pixelsize=8,xft:Inconsolata for Powerline:pixelsize=8
URxvt*boldFont: xft:Inconsolata:bold:pixelsize=8,xft:Inconsolata for Powerline:bold:pixelsize=8

st with:

static char font[] = "Inconsolata:pixelsize=12:antialias=false:autohint=false";

As for the font installation method, I have tried both the Fontconfig (lxterminal and st should work with that method according to http://askubuntu.com/questions/283908/how-can-i-install-and-use-powerline-plugin/283909#283909) and the "patched font" version for "urxvt".

Thank you.

font bug

Most helpful comment

I actually have TWO resolutions.

  1. Use xfce4-terminal. This seems to handle the unicode characters in fancy mode better, but the colors are pretty weird for solarized, even with https://github.com/sgerrand/xfce4-terminal-colors-solarized
  2. Use urxvt with the following commandline:
    urxvt -fn 'xft:Fantasque Sans Mono:style=Regular'
    which has the attached screenshot...
    fixed_urxvt
    You can grab the .Xdefault I stole^wused here: https://gist.github.com/yevgenko/1167205

Font I am using is https://github.com/belluzj/fantasque-sans btw.
I also got my konsole to work, but I don't think that the method (deleting all kde configs and starting from scratch) is going to be viable for most people.

All 15 comments

I have the exact same problem under Kubuntu/KDE/Konsole. Switching to lxterminal/urxvt/xterm doesn't make any difference.
gvim works perfectly though :(

Have you tried everything? Which installation method do you use? Have you tried with tmux? Let's see if we can solve it for both of us. I don't have more clues.

I actually have TWO resolutions.

  1. Use xfce4-terminal. This seems to handle the unicode characters in fancy mode better, but the colors are pretty weird for solarized, even with https://github.com/sgerrand/xfce4-terminal-colors-solarized
  2. Use urxvt with the following commandline:
    urxvt -fn 'xft:Fantasque Sans Mono:style=Regular'
    which has the attached screenshot...
    fixed_urxvt
    You can grab the .Xdefault I stole^wused here: https://gist.github.com/yevgenko/1167205

Font I am using is https://github.com/belluzj/fantasque-sans btw.
I also got my konsole to work, but I don't think that the method (deleting all kde configs and starting from scratch) is going to be viable for most people.

Excellent armyofevilrobots. Using 'Fantasque sans Mono' worked perfecty without having to touch anything else.

The issue, then, is what happens with the rest of the fonts that I tried (Inconsolata, Source Code Pro, Terminus)? Why do they don't work?

So the issue is not really solved yet, because we haven't found the reason of the mistake, but at least now I can work normally with powerline.

Excellent armyofevilrobots. Using 'Fantasque sans Mono' worked perfecty without having to touch anything else.

Fantasque Sans Mono has the powerline symbols integrated.

The issue therefore, is fontconfig which for some reason doesn't work. I have the same problem. The thing is that it used to work for me...

Okay, the following works for me

<alias>
  <family>Inconsolata</family>
  <prefer>
    <family>Fantasque Sans Mono</family>
  </prefer>
</alias>

Just put that in your fonts.conf or modify 10-powerline-symbols.conf directly.

I did some experimentation here. I think some of the problem is that older patched fonts had some issues. Replacing my consolas for powerline with a newer one seems to have fixed issue too.

It turns out that -this- font works well: https://github.com/nicolalamacchia/powerline-consolas

Before:
consolas_powerline_before

After:
consolas_powerline_after

p.s. I ran the exact same tests under urxvt and konsole and they are all identical. No screenshots because no point; they all work! :)

Ok, thank you very much to all of you.

Everything is fine right now.

Anyone still working on this thread? Really need help. I've tried all of the methods above, changing to Consolas and stuff, still can't get it working, any ideas?

image

I have similar issue. The fonts work just fine in gnome-terminal. In uxterm, the arrows are good, but no other glyphs show: musical note, gamified battery display - hearts, mail glyph in email count segment, weather, lock and clock. The glyphs are boxes.

In rxvt and urxvt, not even the arrows show up.

I have this in uxrvt with FantasqueSansMono:

screenshot from 2016-05-04 17 26 14

So, how to resolve this? (in gnome-terminal or xfce4-terminal it works perfect with Meslo fonts for Powerline)

I have same problem with st . Should I write something in ascii_printable[] ?

ascii

Have the same problem my self when i use uxrvt with vim or fish shell.
The image show fish shell in terminator (left and works) and uxrvt.(right and don't work)
2017-01-10-183822_1920x1080_scrot

What is the output of locale command ?

Change that to support utf-8 by following the instructions here. That should solve the problem.

Managed to brick my urxvt so it did not start at al because it asked for some fonts i didn't have.
urxvt: unable to load base fontset, please specify a valid one using -fn, aborting.
Solved that issue by.

xset +fp /usr/share/fonts/75dpi/
xset fp rehash

Then that solved both issues. =)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

felixgao picture felixgao  路  20Comments

DinoStray picture DinoStray  路  34Comments

pmalek picture pmalek  路  11Comments

atrauzzi picture atrauzzi  路  21Comments

abstiles picture abstiles  路  23Comments