andreberg / Meslo-Font

Customized version of Apple's Menlo font. Great monospaced font for development work. Should also work with the Windows Console (see Wiki for Windows infos).
2.57k stars 127 forks source link

Include Powerline glyphs #13

Open totte opened 11 years ago

totte commented 11 years ago

Hi!

I'm not that knowledgeable about fonts but I really like Meslo and would like to see the extra(?) glyphs used by Powerline added by default (as is the case with the font "Pragmata Pro"). There is a "fontpatcher" available to do the job but it doesn't cut it.

andreberg commented 11 years ago

Hm... first off I agree with otommod, the problem seems to be for some reason ligatures are used.

To understand why I am going to need more info. I think I understand what Powerline is, and glancing over fontpatcher.py I think I understand what the patcher does, but I have no clue about the need for the patcher and by extension the requirements of Powerline of the font it is going to use.

My initial guess would be that the Unicode ranges defined in Menlo and Meslo put ligatures at a range where they shouldn't be for Powerline. I can't tell though if that is because of the patcher or because of an oddity in Menlo's ranges.

totte commented 11 years ago

I'm afraid I don't know enough about fonts to provide you with any more information, sadly. The way I see it Powerline makes use of four additional characters resembling "<" and ">", vertically stretched to match the line height. Two of them are "filled" in a way that makes them look like triangles. These characters are usually not included by default in any font - the (current, AFAIK) exception being the Pragmata Pro font by Fabrizio Schiavi.

andreberg commented 11 years ago

So they are patching the font to include these characters from some other font then... Well in that case it is entirely possible that the code points got messed up and that's why the ligatures are used when they shouldn't be. Hm... when I have some time I might look at the Powerline code base and see what exactly they need but no promises.

FocusedWolf commented 8 years ago

Some information that might be helpful:

Adobe Source Code Pro font includes powerline support (only other font besides pragmata pro that i know of to offer the symbols for powerline)

Lots of information here: https://github.com/adobe-fonts/source-code-pro/issues/16 Also it seems, as a result of the discussion on that page (and feedback from Adobe), powerline changed what character ranges it relied on.

Now powerline is using PUA ranges for the characters and this is the commit that updated powerline to use those new positions https://github.com/powerline/powerline/commit/53fbfe15fead8cc7598bcb4ee9714a221ab7e446

These might be the old positions: https://github.com/Lokaltog/vim-powerline/tree/develop/fontpatcher#glyph-table