Skip to content

Instantly share code, notes, and snippets.

@qrush
Created January 11, 2012 16:50
Show Gist options
  • Select an option

  • Save qrush/1595572 to your computer and use it in GitHub Desktop.

Select an option

Save qrush/1595572 to your computer and use it in GitHub Desktop.
vim-powerline patched fonts
This file has been truncated, but you can view the full file.
@teoljungberg

Copy link
Copy Markdown

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?

@bmcorser

Copy link
Copy Markdown

I just downloaded Mensch and this is crazy.

@supr

supr commented Jul 3, 2012

Copy link
Copy Markdown

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

@teoljungberg

Copy link
Copy Markdown

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

that, amongst other things, did it @supr

@J-Swift

J-Swift commented Sep 1, 2012

Copy link
Copy Markdown

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.

@dz

dz commented Sep 13, 2012

Copy link
Copy Markdown

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

@davidchambers

Copy link
Copy Markdown

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']:

@colemickens

Copy link
Copy Markdown

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

@joshmosh

joshmosh commented Oct 5, 2012

Copy link
Copy Markdown
  • 1 for Monaco

@ruaz

ruaz commented Nov 26, 2012

Copy link
Copy Markdown

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

@hanleybrand

Copy link
Copy Markdown

@hit9

hit9 commented Jan 1, 2013

Copy link
Copy Markdown

cool, i like it !

@zhm

zhm commented Feb 11, 2013

Copy link
Copy Markdown

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']:

@dvcrn

dvcrn commented Jun 26, 2013

Copy link
Copy Markdown

Can someone update these fonts to the new code points? ohmyzsh/ohmyzsh#1872

@justin8

justin8 commented Jul 6, 2013

Copy link
Copy Markdown

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.

@kevinrenskers

Copy link
Copy Markdown

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

@choucavalier

Copy link
Copy Markdown

@justin8 your Menlo font is not working

Can someone provide a Menlo patched font please ?

@monokrome

Copy link
Copy Markdown

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

@mt54636

mt54636 commented Mar 7, 2014

Copy link
Copy Markdown

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.

@phaberest

Copy link
Copy Markdown

Superlative work!

@trusktr

trusktr commented Dec 27, 2014

Copy link
Copy Markdown

These fonts don't seem to work? I just installed these, along with Prezto, then when I choose one of these fonts in iTerm2, the font changes in the terminal, but the ugly symbols remain (I don't see the nice powerline triangles).

@marbon87

Copy link
Copy Markdown

I have the same problem as trukstr. I installed the fonts from https://github.com/powerline/fonts but not all icons are shown correctly

ghost commented Jul 12, 2015

Copy link
Copy Markdown

Thank you!

@topdown

topdown commented Jun 16, 2016

Copy link
Copy Markdown

Once you go through the font installation you need to set the fonts in whatever you are using for that profile.
For me it was iTerm2 on latest Mac OSx
Go to preferences > select the profile you are using > Text tab
Now set both the Font and Non-ASCII Font to one the ends in Powerline.
screen shot 2016-06-16 at 1 35 32 pm

If there are not fonts that end in Powerline it is not installed correctly.
Frankly with all of the issues I was surprised I got it to work in 2016 :)

screen shot 2016-06-16 at 1 34 55 pm

@sghiassy

sghiassy commented Oct 4, 2016

Copy link
Copy Markdown

@yammyxing

Copy link
Copy Markdown

Thx :)

@suilu

suilu commented Dec 15, 2016

Copy link
Copy Markdown

Thank you!

@freehuntman

Copy link
Copy Markdown

awesome~

@mrleblanc101

Copy link
Copy Markdown

@topdown What's the bullet and the plus sign after the branch name ? I don't have this using the exact same theme but with SourceCode Pro for Powerline ?

@floviolleau

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment