Vim-airline: Powerline fonts work in console vim, but not in gvim

Created on 17 Sep 2013  Â·  22Comments  Â·  Source: vim-airline/vim-airline

Yes, I checked, they _do_ work with powerline, both in gvim and console vim. They don't work in gvim if I use airline.

I made an album with screenshots. I've installed the patched fonts using the fontconfig method.

 ~ LANG=C gvim --version | head -n 3
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Sep  3 2013 20:01:21)
Included patches: 1-16
Compiled by Arch Linux

However, the glyphs show up if I use a patched font.

bug

Most helpful comment

@chrisbra, we've found work-arounds, suggesting more doesn't really help move this forward:

In regards to changing the font, isn't powerline supposed to work in gvim if it works in vim?

In terms of changing the symbol, as @stadniklksndr pointed out, that works. But it's not ideal for several
reasons:

  1. It's buggy out of the box.
  2. You don't get the intended symbol.
  3. Less advanced users aren't going to find it easy to fix, even if they find this issue. (The solution to this would be to document the kludge in the official documentation, but that's even kludgier.)

The bottom line is that this needs to be debugged. It's been reproduced by many different people, so in principle should be considered a confirmed bug.

So my question to the devs is this: should we expect this issue to be reopened, or should we file a new one?

All 22 comments

hmm, that's something i haven't seen before....the arrows look right, but the branch and line number symbols are messed up.

can you try installing one of the fonts from https://github.com/Lokaltog/powerline-fonts and see if it fixes it for you?

Yeah, as I said, patched fonts work fine. It's the fontconfig method that causes some problems.

ok, just to confirm, you're using the fontconfig to patch your own font. after installing it works in powerline vim and gvim, works in airline vim, but _not_ airline gvim?

but if you install one of the pre-patched fonts, it works in all 4 combos?

Exactly!

:confused: that makes no sense!!

i'll fire up a VM tonight and see if i can reproduce. is there anything special about your OS other than it being arch and configured for polish?

and i'll also need to know which font you patched. and if you can upload your patched version somewhere so i can try it out it'd be great. thanks.

Just don't spend too much time trying to fix this bug! :) There's probably nothing you can do about it, it must be a bug in gvim or something.

As for the font I patched: I didn't patch any. With the fontconfig method you just copy some files and that's it, you don't have to change any font. Later I used patched Inconsolata to see if the glyphs work with patched fonts.

is there anything special about your OS other than it being arch and configured for polish?

I use fontconfig-infinality.

i was able to reproduce on my arch vm. it looks like this only happens in gvim, and not qvim (running inside kde). haven't tried gnome yet.

I have encountered the same problem, also using Inconsolata incidentally (Arch Gvim). I patched the font and it works fine now.

@ravicious @jwoudenberg fyi, i've reverted the space back to the default as this appears to be causing problems elsewhere (#283). however, if you still want to use fontconfig you can declare g:airline_symbols.space = "\ua0" manually. i'll add this info the wiki. thanks.

That's cool, thanks for all the work you put into this bugreport!

I'm running into this exact issue. I've followed the install directions pretty closely, and can't figure out what's wrong.

Here's a gist with some relevant files: https://gist.github.com/rossipedia/990753050f47f13b4526

Some other possibly useful information:

$ uname -a
Linux 3.13.0-27-generic #50-Ubuntu SMP Thu May 15 18:06:16 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

$ fc-query -V
fontconfig version 2.11.0

A work around may be set g:airline_symbols.space = "\u3000" though the spaces would be larger.

I use DejaVu Sans Mono, and encountered this problem tonight when looking into GVim. The patched font from powerline-fonts fixed it for me.

On my machine it seems like some colorschemes dont show airline correctly

I had the same identical problem as in @ravicious screenshot, fixed by setting font in gVim using
:set guifont=* and select some powerline font.

Also you can add it to vimrc, thus you won't need to set every time
if has('gui_running') set guifont=Inconsolata-g\ for\ Powerline\ Medium\ 10 endif

@verden11's solution doesn't work for me.

vim in console:
2017-08-12-19 29 23_001

gvim with default font configuration:
2017-08-12-19 29 52_001

gvim using @verden11's solution:
2017-08-12-19 30 40_001

+1 Also having this issue on both patched and fontconfig method.

Issue with airline_symbols.branch only
Powerline Fonts installed using sudo apt install fonts-powerline

In Vim
vim-good

In Gvim
gvim-bad

Gvim :h airline
symbols

when i change airline_symbols.branch to 'â­ ' it works
gvim-good

any possible troubleshooting suggestions or solutions how to use branch symbol as in Vim?

try to use a different font or change the symbol.

@chrisbra, we've found work-arounds, suggesting more doesn't really help move this forward:

In regards to changing the font, isn't powerline supposed to work in gvim if it works in vim?

In terms of changing the symbol, as @stadniklksndr pointed out, that works. But it's not ideal for several
reasons:

  1. It's buggy out of the box.
  2. You don't get the intended symbol.
  3. Less advanced users aren't going to find it easy to fix, even if they find this issue. (The solution to this would be to document the kludge in the official documentation, but that's even kludgier.)

The bottom line is that this needs to be debugged. It's been reproduced by many different people, so in principle should be considered a confirmed bug.

So my question to the devs is this: should we expect this issue to be reopened, or should we file a new one?

(At the very least, someone could tell us why they believe the bug is gone—e.g., in some code that hasn't made it into our package managers yet.)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

brotatos picture brotatos  Â·  21Comments

notpratheek picture notpratheek  Â·  18Comments

arthurkiller picture arthurkiller  Â·  34Comments

tnguyen14 picture tnguyen14  Â·  24Comments

ypxu picture ypxu  Â·  29Comments