Skip to content

Instantly share code, notes, and snippets.

@ymjing
Last active March 24, 2022 14:34
Show Gist options
  • Star 67 You must be signed in to star a gist
  • Fork 14 You must be signed in to fork a gist
  • Save ymjing/c788f85a654b2d7581d8 to your computer and use it in GitHub Desktop.
Save ymjing/c788f85a654b2d7581d8 to your computer and use it in GitHub Desktop.
Powerline-patched Monaco for Windows and OSX

Powerline-patched Monaco for Windows and OSX

This font is manually patched with Fontforge. It includes the glyphs from DejaVu Sans Mono for Powerline.

I recommend DirectWrite-patched VIM builds. I'm using KaoriYa's build (http://www.kaoriya.net/software/vim/)

Usage

Add the following lines to your .vimrc/_vimrc:

if has("mac") || has("macunix")
    set guifont=Monaco\ for\ Powerline:h24
elseif has("win32") || has("win64")
    set guifont=Monaco\ for\ Powerline:h14:cANSI
    set renderoptions=type:directx,renmode:5
endif

Tested software

  • KaoriYa's gvim build
  • MacVim
  • iTerm2 + oh-my-zsh
  • PuTTy
  • Babun (mintty)
@reyesyang
Copy link

Cool, This also works well on Ubuntu 15.04 with Vim an GVim

@fa7ad
Copy link

fa7ad commented Oct 19, 2015

what @reyesyang said

@ianwitherow
Copy link

Anyone else have some weirdness with italics? The font seems to cut off some characters for me on Windows using GVim
Example:
image

I'm using
set guifont=Monaco\ for\ Powerline:h10:cANSI

@tstelzer
Copy link

I believe if a font-family does not come with a italic version, the font gets artificially skewed, even over their monospaced boundaries, which creates this odd effect. Try to disable the use of italics in your colorscheme config (look for all the lines gui=italic).
edit this Stackoverflow thread speaks of this more verbose.

@dragonxlwang
Copy link

thx!

@droposhado
Copy link

thx! works fine on Ubuntu 16.04!

@MareoRaft
Copy link

Just the slightest bit taller/blurry compared to the Monaco that comes with Mavericks. But still, thank you. Works on OSX 10.9.5 on Terminal.app

@chenzhihuai1990
Copy link

It works fine on Windows, but it don't contain supscript number 4, 5, ... , Could you add them, since they are convenient as tab numbers in airline-tabline plugin. THX! :)

@Congee
Copy link

Congee commented Jun 16, 2018

@kevinis Can you please share how did you patch the font? I tried to patch Monaco by myself, but the line height looks too high.
https://stackoverflow.com/questions/46054645/using-inconsolata-font-in-putty-too-much-line-spacing

@Congee
Copy link

Congee commented Jun 16, 2018

Made it by shamelessly copying metrics of this font to my fontforge settings.

@Zhengqbbb
Copy link

thx~it help me

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