public
Last active

vim-powerline patched fonts

  • Download Gist
Inconsolata-dz-Powerline.otf

Awesome to the max

Awesome! Can you provide Monaco patched font too?

+1 for patched Monaco

this is great, but what are the fontnames to be use on the vimrc file ? rather confused.

@suvash These fonts need to be installed in your machine, and then selected as your terminal font. You have to change nothing in your .vimrc (well, you need to activate the "fancy" mode, as the documentation says).

Thanks a lot, and also found the trick for non-terminal vim(I use MacVim occasionally).

if has('gui_running')
  set guifont=Monaco:h12    " set fonts for gui vim
  set transparency=5        " set transparent window
  set guioptions=egmrt  " hide the gui menubar
endif

If you want a version of Menlo that includes bold, italic, and bold italic: https://gist.github.com/1627888

Wish there was a Consolas patch.. :)

Folks, I'm not going to provide any more patched fonts. I did the 3 up there for myself and a friend. Download vim-powerline, check out the readme, and get it working like I did if you want it with your own font.

Thanks for providing the fonts! I owe you a :beer:

Unrelated noob question: how do you attach a binary font file (ttf) to a gist? I patched Meslo DZ and I want to make it available.

I used the gist command line tool. You might want to zip it first though -- someone said they had trouble with the first file I uploaded. I'm not sure of it was an issue with gist or the browser mangling the download.

On Jan 19, 2012, at 7:37 PM, Mohammedreply@reply.github.com wrote:

Unrelated noob question: how do you attach a binary font file (ttf) to a gist? I patched Meslo DZ and I want to make it available.


Reply to this email directly or view it on GitHub:
https://gist.github.com/1595572

When using your patched Inconsolata font, and Powerline_symbols set to fancy, I get boxes instead of the patched characters. Here's a screenshot:

broken powerline status bar font

Is there a setting I'm missing, or is the font not working correctly? All my settings seem to be set to UTF-8 and using urxvt.

Edit: I've tried another font from the wiki, and it seems to work. This tells me the font you provide might not be functional.

@clownfart rm /tmp/Powerline.cache

@goatslacker that isn't a file. I've tried :PowerlineClearCache as well.

Edit: I was able to patch my own font, but the glyphs have a lower line height than Inconsolata-dz has. I will try with normal Inconsolata.

Thank you very much for those patched fonts. It saved my life (not able to compile on my MAC).

Font doesn't display correct in gvim, everything has wide spacings. Can anyone help?

@6msj vim did not find the font. Try the following in your .vimrc:

set guifont=Inconsolata-dz\ for\ Powerline\ Medium\ 12

Excellent. Many Thanks.

My statusline looks strange with the Inconsolata font. This is in vim inside iTerm. It works just fine with MacVim

http://cl.ly/1M1C2T161E2D2S0f0w17

Have anyone got any idea?

I just downloaded Mensch and this is crazy.

@metamorfos i think you might have to increase the size of your status bar.

@metamorfos i think you might have to increase the size of your status bar.

that, amongst other things, did it @supr

I had the same issue as metamorfos (using terminal vim and iTerm2) and found 2 ways to fix it. One, you can choose a different font. Two, you can mess with the vertical line height of the terminal font. Hope that helps someone.

Thanks much for the inconsolata-dz patch! :) I love powerline.

I just patched Inconsolata (after battling to get fontforge to compile). I made the following tweak to get the arrows to line up perfectly:

diff --git a/fontpatcher/fontpatcher b/fontpatcher/fontpatcher
index 2c54a3f..6e75838 100755
--- a/fontpatcher/fontpatcher
+++ b/fontpatcher/fontpatcher
@@ -177,7 +177,7 @@ for font_path in args.fonts:
        font.transform(psMat.translate(0, font_dim['ymax'] - sym_dim['ymax']))

        # Then move it the y center difference
-       font.transform(psMat.translate(0, sym_ycenter - font_ycenter))
+       font.transform(psMat.translate(0, sym_ycenter - font_ycenter - 66))

        # Ensure that the glyph doesn't extend outside the font's bounding box
        if sym_dim['width'] > font_dim['width']:

Love to see this for Adobe's new Source Code Pro.

@davidchambers Excellent work, thank you! Finally, I have a decent looking status bar.

cool, i like it !

I ended up having to make some tweaks to the fontpatcher script to get Inconsolata-dz to line up perfectly in MacVim.

Here is my font file for anyone else who stumbles upon this: http://cl.ly/3Q362Q2M1e1h

Enabled using set guifont=Inconsolata-dz\ for\ Powerline:h13

Here are my changes to the fontpatcher script:

diff --git a/fontpatcher/fontpatcher b/fontpatcher/fontpatcher
index 2c54a3f..4826d9d 100755
--- a/fontpatcher/fontpatcher
+++ b/fontpatcher/fontpatcher
@@ -164,7 +164,7 @@ for font_path in args.fonts:
                        # Stretch the glyph vertically
                        scale_ratio = font_dim['height'] / sym_dim['height']

-                       font.transform(psMat.scale(1, scale_ratio))
+                       font.transform(psMat.scale(1, scale_ratio * 1.3))

                # Use the dimensions from the pasted and stretched glyph
                sym_dim = get_dim(font[sym_glyph.unicode])
@@ -177,7 +177,7 @@ for font_path in args.fonts:
                font.transform(psMat.translate(0, font_dim['ymax'] - sym_dim['ymax']))

                # Then move it the y center difference
-               font.transform(psMat.translate(0, sym_ycenter - font_ycenter))
+               font.transform(psMat.translate(0, sym_ycenter - font_ycenter + 60))

                # Ensure that the glyph doesn't extend outside the font's bounding box
                if sym_dim['width'] > font_dim['width']:

Can someone update these fonts to the new code points? https://github.com/robbyrussell/oh-my-zsh/pull/1872

You can get the menlo patched font at least from my dotfiles here:
https://github.com/justin8/dotfiles/tree/master/install-files/fonts

I couldn't find a decent font with the new code points, so I ripped the menlo ttc from OS X and patched it.

The best source for the updated fonts seems to be https://github.com/Lokaltog/powerline-fonts

@justin8 your Menlo font is not working

Can someone provide a Menlo patched font please ?

@toogy Not sure if this works for you, but this copy of Menlo seems to have solved the problem for myself.

I don't know if this helps anyone else, try changing your iTerm's profile to Pastel (Dark Background). It fixed the icon display issue for me. My terminal now looks exactly like http://www.paradox.io/posts/9-my-new-zsh-prompt. FYI, I did install the above fonts.

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.