-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Powerline symbols #43
Comments
Seems related to #16. The best solution is to have these glyphs added to the fonts. Is this something you want to contribute? |
I'd be happy to fine-tune the glyphs and open a pull request later if you want to include the glyphs in Source Code Pro. |
I've created a version of Source Code Pro with the patched glyphs here. |
I agree with @miguelsousa, for best user experience it would be a good idea to add the glyphs to SCP. The font patcher is currently adding the same glyphs (same alignment, same size, same thickness, same design) to any font being patched, which makes for different results. Additionally, re-generating the font binary via the font patcher might break unexpected things. Thank you @Lokaltog for uploading the patched SCP, this is a good point to start from. We would now need to add the same glyphs to all the other weights as well. Before doing this; I have several questions:
Thanks! |
These glyphs are for the upcoming version of Powerline, so they have been changed a bit. They have been redrawn, and the code points have been moved to the Private Use Area. The F and T glyphs have been removed and won't be included at all in the new version of Powerline. I wasn't aware that any padlock glyphs already existed in Unicode, and I haven't seen any fonts with pointing triangles that fill the entire height and width of the font. I had the impression that the PUA was the best area to put these glyphs, but please let me know if you think that they would be better suited at another location. A criticism of the previous version of Powerline was that its glyphs were located somewhere other than the PUA. It would be awesome if anyone who knows anything about font design could polish the glyphs to fit perfectly with the SCP font design and for bold/italic fonts, since the glyphs are basically just stretched and moved to fit the dimensions of the font being patched. I know little about font design and the patcher is mostly a quick way of getting decent looking symbols for Powerline. My goal with this version of Powerline is to get as many coding fonts as possible to include the new glyphs, and to be able to link to those fonts in the powerline-fonts repo. Ideally users won't have to patch fonts at all but rather just download pre-patched fonts from the original authors. The specification of the glyphs/code points that are going to be used in Powerline is available in the docs. |
Hey Guys, Curious if there has been any more movement on this issue? There's a custom version that's out, but it would be great to have it standardized within the font itself. |
We are considering adding the powerline symbols, but it will be a (short?) while before we touch the fonts again as I am currently working on Source Sans and preparing for a trip to India to present some workshops there during the month of March. |
Awesome, thanks for the update! Really appreciate it! |
Just as an FYI and to save you few clicks, the glyph table (and the rest of the documentation) seem to have been moved here ;-) |
@pauldhunt any news? :) |
no news. busy with other projects at the moment. |
Bump? |
@Lokaltog do you want to submit a pull request for this? /cc @neersighted |
I apologize for not responding to this issue, I haven't worked on Powerline for quite a while as I'm no longer using it myself, and I've moved on to work on other projects. A patched version of Source Code Pro has been submitted to the powerline-fonts repo and can be found here. Note that I haven't tried this font myself and I don't know if the glyphs are properly adjusted for the font. I'm not sure how to proceed here, it's been a while since I worked with fontforge. Should I submit a patched TTF to the repo? Is it a big task for you guys to copy-paste the required glyphs from the font in the powerline-fonts repo? I'm not sure if fontforge may strip away some metadata or export it improperly or something like that, so I just want to be sure how to submit the PR properly before doing any work on the font. |
@Lokaltog if doing this will not benefit you, then hopefully someone who is actively interested in this issue will do the work. otherwise, it seems like there is not too much interest in this happening, although what would be a good way to gauge how many users would benefit from adding these symbols to the fonts? /cc @neersighted |
@pauldhunt Quite a lot of people use either Powerline or one of the derivatives like airline for vim, which depend on these symbols. Other fonts like Terminus and Pragmata Pro have added "native" support for the symbols by popular demand to avoid having patched fonts elsewhere that may become outdated, so the demand and benefit of adding the symbols to the font is definitely there. But I think I agree that this issue is probably best left to the someone who actively uses both the font and Powerline. In the meantime there is an older version of Source Code Pro available in the powerline-fonts repo, and anyone subscribing to this issue can download it here: https://github.com/Lokaltog/powerline-fonts/tree/master/SourceCodePro |
I'd be willing to give it a swing sometime. I use the patched Source Code Pro (Sauce Code Powerline? Is that a joke?!), but the glyphs are off at smaller (<12) font sizes. @pauldhunt Not quite sure how to contribute, so tips are welcome. If you'd like to try it yourself, the symbols are in PowerlineSymbols in the Lokaltog/powerline-fonts repo. |
No. Source is a trademarked and reserved name, which derivative fonts cannot used. It's all spelled out in the license. |
I would love to see this happen, but I have zero experience in working on fonts. |
The patched version in the Lokaltog powerline-fonts repository isn't usable. Whoever made it changed the vertical alignment... I patched a version but the powerline symbols look good only on my font size (12pt) and official Terminal app (OSX). Official support for this would be huge, but I don't know if it's really feasible :( |
I find the glyphs for Powerline working quite well in cygwin however, the glyphs for nerdtree don't seem to be working. |
I’m looking into this... |
@Lokaltog Isn't the whole issue about box drawing characters having "weird metrics" as the issue on the other repository emphasizes? Is it something wrong with Source Sans Pro? |
Yep, it's been incredibly difficult finding a reliable way of making correctly sized glyphs that fill the entire font bounding box. Every unique terminal emulator/OS/font rendering/antialiasing/hinting combination seems to have their own way of calculating the bounding box of a font, which causes misalignments or gaps depending on your setup and the environment the glyphs were created on. An example of this issue is the Input font, which recently got native support for Powerline glyphs by the font author himself. The author created the glyphs on OS X, and it looks perfect on OS X and on certain other setups, but it does look slightly misaligned on my setup (Linux). I don't know enough about font metrics and all the maths involved in rendering fonts to tell if there's any way of fixing this issue and rendering these glyphs reliably across all platforms and configurations. |
It appears that the powerline arrows introduced in pauldhunt/SourceCodePro are not big enough to create the smooth, continuous effect we are aiming for: This is how it looks like when using the "Sauce Code Pro" font: The difference in thickness is also visible in fontforge, in which the arrows extend to the top of the character border - new symbols: (The new font depicted above comes from compiling b086f07) |
This is good to know. Are there any design guidelines for these characters? |
Not really, the arrow glyphs have to be manually adjusted and tested to see if they work, and not every setup displays them correctly. Fixing the issue on one setup may end up creating another issue on other setups. I think it's impossible to get a consistent look across all setups, e.g. if you increase the glyph size to fix the antialiasing issue displayed above (the gap between the glyphs), you'll notice that the arrows end up clipped and slightly misaligned instead. I guess you could try to make the glyphs slightly taller, just enough to close the gap and avoid the clipping, but note that if you resize the glyphs outside the font's bounding box other terminal emulators may end up either drawing the glyphs outside the bounding box (which looks even worse), or scaling the entire font to fit the size of the arrow glyphs, messing up the leading or tracking of the rest of the font. I apologize if this is a stupid question, but could a possible solution to this issue be to add hinting to the glyphs so they line up properly? Or maybe add kerning information that moves the glyph ever so slightly to the left to close the gap? |
for now i just extended the large edge of the big, black triangles to meet the edge of the bounding box (to the left and right), the previous version had a 20 unit gap (which is what is probably causing the blue gap). I’ll look at Sauce for other proportions. |
The next release of the family is imminent and will include these characters, so I am closing this one for now. |
Resolved in the latest release: |
@pauldhunt This release works great! Thanks so much! Three years in the making! |
Not sure if this is worth mentioning, but I too experience the blue line issue displayed by gbitzes in vte terminals and xterm. Using Sauce Code Pro is a workaround. |
@beanaroo which version of the fonts are you using? |
@pauldhunt I am using the latest release, 2.010R-ro/1.030R-it. |
@beanaroo can you post some screenshots of how things are displayed in your working environment? That would help me to troubleshoot things. Thanks. |
Sure thing. In the screenshot below, the two terminals on the left are using the Adobe version and the two terminals on the right are using the powerline patched version, Sauce Code Pro. All other glyphs are a fall back font, ttf-font-awesome. I tested the nerd-fonts version too, but seeing as it leaves Adobe's powerline glyphs untouched, there is no noticable difference. |
I’ll take another stab at this next time we update the fonts. |
@beanaroo: This probably isn't the place for this, but I'm super curious. What desktop environment are you using? It looks great. |
@austincrft Just for you: 📃 dotfiles |
Hi all, Latest version of the fonts (2.030), and my arrows are very slightly vertically misaligned. Hopefully it can be seen in these snippets: It looks like the arrows are either slightly too large, or placed slightly too high. I don't know a great deal about fonts so I'm not precisely sure what could be causing this issue, but I thought this was probably the best place to start. These are from tmuxline, but the error happens in vim-airline too, so I think it's the font. I'm using iTerm 3 with all fonts set to SCP 12pt. If I shrink the non-ASCII font to 11pt, they seem to align vertically, but I now see the gap others have described. I'd rather not shrink the font, though, as it breaks block characters in other terminal applications. Cheers! |
@JoelOtter You should check out the latest nightly of iTerm, it should fix the vertical alignment issue. |
@pauldhunt In case you were not aware, @be5invis submitted L2/19-068 that is a proposal to encode the Powerline symbols, which will be discussed during UTC159 that starts on the last day of this month. If accepted, and once they are included in a version of Unicode, you will be able to change the mappings from PUA code points to non-PUA ones. |
Understandably I am in the minority with this issue, but I figured I would post it here to get your thoughts.
I use Source Code Pro in MacVim, but more importantly I use with a special plugin called Powerline that has support for some custom glyphs that provide an overall nicer user experience.
The Powerline project includes a font patching tool to add these glyphs manually, however it has some issues when placing them, as can be seen by the screenshot below:
Notice how the arrows and Line Number glyphs seem to get chopped off at the bottom due to their vertical alignment being a tad lower than what should be expected?
Since I don't know much about font development, here's a link by the project author that explains the issue.
powerline/powerline#14 (comment)
Sounds like the potential fixes either include some custom hackery with the font patcher to fix the glyph alignment or a potential fix in Source Code Pro itself, however it could also be the reason for it not working could be an intentional design piece on your own. He also mentioned potentially submitting a patch that includes the glyphs built in, however I am not sure whether you guys would even be open to that in the first place.
The text was updated successfully, but these errors were encountered: