Skip to content

Instantly share code, notes, and snippets.

@kayzhu
Created April 19, 2012 03:11
Show Gist options
  • Select an option

  • Save kayzhu/2418116 to your computer and use it in GitHub Desktop.

Select an option

Save kayzhu/2418116 to your computer and use it in GitHub Desktop.
Anonymous Pro for vim-powerline
@kayzhu

kayzhu commented Apr 19, 2012

Copy link
Copy Markdown
Author

Install vim-powerline. Open"Anonymouse Pro-Powerline.ttf" and install it, then in your .vimrc put:

set guifont = set guifont=Anonymous\ Pro\ for\ Powerline:h13

This doesn't include bold or italicized, this is just the regular font.

Edit: see @tlhunter's comment on the correct line to put in your ~/.vimrc

@tlhunter

Copy link
Copy Markdown
set guifont=Anonymous\ Pro\ for\ Powerline:h13

@kayzhu

kayzhu commented May 11, 2012

Copy link
Copy Markdown
Author

@tlhunter Ah, I can't type. Thanks for the correction!

@tlhunter

Copy link
Copy Markdown

No prob. The funny thing is the command would work, but would reset something else, took me a few mins to debug.

@vheon

vheon commented May 11, 2012

Copy link
Copy Markdown

I tried to patch the font myself and I just tried the font in this page, but the result is the same with both fonts http://i48.tinypic.com/2r3jj1y.jpg

Anyone with a solution? :(

By the way I have the same problem on my linux box

@kayzhu

kayzhu commented May 14, 2012

Copy link
Copy Markdown
Author

@vheon Sorry I have no clue why that happened. I will let you know as soon as I find out.. Mine seemed normal in MacVim, which version are you using? Did other patched fonts work fine for you?

@vheon

vheon commented May 14, 2012

Copy link
Copy Markdown

I just tred to patch Courier New and all went just fine. Anyway I tried to repatch Anonymous Pro and this was the output:


$ fontforge -script .vim/bundle/powerline/fontpatcher/fontpatcher Anonymous\ Pro.ttf 
Copyright (c) 2000-2011 by George Williams.
 Executable based on sources from 13:48 GMT 22-Feb-2011-D.
 Library based on sources from 13:48 GMT 22-Feb-2011.
The following table(s) in the font have been ignored by FontForge
  Ignoring 'EBSC' embedded bitmap scaling control table
  Ignoring 'LTSH' linear threshold table
  Ignoring 'VDMX' vertical device metrics table
  Ignoring 'hdmx' horizontal device metrics table
The glyph named mu is mapped to U+00B5.
  But its name indicates it should be mapped to U+03BC.
The glyph named Omega is mapped to U+2126.
  But its name indicates it should be mapped to U+03A9.
The glyph named Delta is mapped to U+2206.
  But its name indicates it should be mapped to U+0394.

@kayzhu

kayzhu commented May 15, 2012

Copy link
Copy Markdown
Author

@vheon Yes that was the same output I received as well. Which version of Vim/OS are you using?

@vheon

vheon commented May 15, 2012

Copy link
Copy Markdown

MacVim 7.3 (64) on Mac OS X 10.7.3... anyway when I patched Courier New I get a different output: the part where here said

The following table(s) is the font have been ignored by FontForge

doesn't show and I get more of


The glyph named name is mapped to U+####.
  But its name indicates it should be mapped to U+####.

@kayzhu

kayzhu commented May 15, 2012

Copy link
Copy Markdown
Author

@vheon Did you try using your self-patched Courier New? Is it the same result or does it work well? My impression is that those glyph mapping problems shouldn't matter. But I could be wrong.

@vheon

vheon commented May 15, 2012

Copy link
Copy Markdown

Yes I tried it.

This is the comparison between the two font on the same file:

Anonymous Pro
http://i49.tinypic.com/2a98ql5.jpg

Courier New
http://i45.tinypic.com/2mgnntw.jpg

@kayzhu

kayzhu commented May 17, 2012

Copy link
Copy Markdown
Author

@vheon Hmm, I don't have enough knowledge on why this occurs. Please do let me know if you manage to fix it and update this gist. Thanks!

@jridgewell

Copy link
Copy Markdown

Seems to be a problem with the font size used. I changed it from set guifont=Anonymous\ Pro\ for\ Powerline:h13 to set guifont=Anonymous\ Pro\ for\ Powerline:h14 and it fixes the problem.

http://i45.tinypic.com/20p8tu0.jpg

EDIT: Also change your terminal font to 14pt Anonymous Pro.

@vheon

vheon commented Jun 17, 2012

Copy link
Copy Markdown

@jridgewell: I'm glad if it fix this problem on your machine, but unfortunately it doesn't on mine :(

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