-
Notifications
You must be signed in to change notification settings - Fork 947
Confusion about integration with the Awesome Powerline fonts #429
Comments
@protist - So "Font Awesome" (http://fontawesome.io/) is one font, and "Awesome Terminal Fonts" include a powerline-patched version of it (you're right that the word So, just to be sure, you:
And you don't see the time glyph? |
Maybe we could be more specific about the different fonts. @protist do have a suggestion? |
Thanks @bhilburn. Ah ok. I installed awesome-terminal-fonts in Arch, which installed a font with family "FontAwesome". Which was slightly confusing to me.
Yes, I agree @dritter. I admit I'm still a bit confused, too. So for the fonts that you refer to, I presume that there are just glyphs for specific unicode code points that are required? I'm still not sure if vanilla "Font Awesome" has them or users need the powerline-patched version. I guess for the readme, you could list a few fonts that possess the characters that you need? Presumably there are only a couple of them at this point?
I did almost all of those…
Except this step. I had another look at the readme, and I couldn't see any reference to this in the dir section. I did find a reference in the vcs symbols section, but there's then a dead link to "the Installation section above". Either way, I couldn't find any substantial information on this setting in the readme. Once I set this, the home icon, etc. work, but not the
No… Is that what |
The changed time format example in the readme requires a prepatched "Awesome Terminal Font". And several other examples too.. |
Sorry, I'm still a little confused. I'm using "awesome-terminal-fonts", and I get the error glyph as the screenshot above. |
The only way (for now) to print fancy icons in a Terminal Emulator is by using an icon font (there is a progress in displaying images in the terminal, but that is specific to single Terminal Emulator Projects). To be more concrete: There are two general strategies to use icon fonts.
Powerlevel9k needs to know which kind of font the user wants to use, so that it can output the according code points. This is the famous Powerlevel9k supports currently about five different modes:
I hope that clears it up and I didn't miss a thing. ;) |
Thank you, that's great information! Thanks for the clarification. Having said that, the only part that confuses me now is that I do have |
Yes, overwriting every single icon is one way to deal with that. Another way is to change your fontconfig configuration. There is a list of fonts to define which takes precedence (the one in awesome-terminal-fonts is here). And it depends which fonts (and sometimes which version) you have configured (e.g. if you use a different icon font than expected, you will get "wrong" icons). That being said, it sounds like you should double check your fontconfig configuration.. |
Yes, I installed Sorry, I probably should have been explicit before. I actually previously checked the code points from Perhaps we can double-check an example glyph? What does |
Well I use a pre patched font. So we can't compare our code points. And codepoints being in one variant, but not in the other is one part of the topics complexity.. So, awesome terminal fonts in the pre patched variant yields With pre patched fonts I can have a look on all glyphs in my icon font, because font book (app on OSX) shows me them all in a table (and because it is a single font). @bhilburn We should make a wiki page out of this issue ;) |
I probably misunderstood, but I expected a pre-patched font to add the glyphs to the same code points that they would have been in anyway. I guess not. My calender glyph is If I use the |
Okay. I'll try to explain it differently.
And that is our difference. We both use ** same, because |
Ah, okay, I think I get it now. So your original (different to mine) calendar glyph was presumably provided by your vanilla font, without it being patched. In addition, when your vanilla font was patched with If that is correct, then every pre-patched font might potentially have different private code point glpyh types from each other. If so, wouldn't it make sense for |
Yep. That is what I suggested we need to be more specific about ;)
Did you spot a wrong code point in the
Right. That is one difference between awesome-terminal-fonts (patched) and nerd-fonts. And even the nerd-font variants have different code points. See my issue there about that.
Almost right. Only thing is that |
Sorry, I misunderstood. 😬
Well, I guess it's hard to say without knowing what they should be, but
Thanks for that other information. |
No need to apologize. I should apologize. I was quite unspecific, because all code examples should be double checked.
Yep. that one is broken for sure. functions/icons.zsh state it's
Looks suspicious. I got the github commit icon:
That's one I selected. I knew there was the chemical mercurial sign, but that was too narrow for me besides the quite bold icons. That is why I decided to use the other icon.. Note to self: I should fix that order of |
From awesome-terminal-fonts, this is the lock icon
I can't find a commit icon at all, either in that file or by skimming the glyphs visually. There are two bookmark glyphs
But they look slightly fatter than yours. Here are the three glyphs I've mentioned. Oh, and test icon (second from top) is odd too, yeah? There may be more that I missed. |
Oh yes, I missed those files. Yep, I can confirm the code points for commit and bookmark, and that they look the same as your screenshot.
|
Great! I don't know why these icons were not there in the first place, but it would be awesome, if you could change the icons in |
Hello, |
Hi @shibumi ! @gabrielelana is the author of IMHO the describe scenario is exactly what happened. If you look at gabrielelana/awesome-terminal-fonts@e7c8983 you'll see that with the update of FontAwesome the code points are now relocated to a different space ( Thinking more about it, I come to the conclusion that the right thing to do is to rely on the "public API", a.k.a. the variables that get exported by @protist As an addition to my earlier explanations, I find it interesting that |
Ah… @dritter I just had a draft that I was about to submit, which came to a very similar conclusion.
So, @dritter I agree that this is probably the best way to do it. Since we don't know what version of |
@V1rgul Nice one! Thanks for that! I was originilly wondering why you didn't include @dritter If you are happy with this solution, then I'm happy to submit a pull request to change all of the hard-coded code points to these ones. However, I'm still not 100% sure what the icons are meant to look like in all cases, so perhaps you could submit a screenshot of what you see with |
Hi, author of You guys already said it all so no need to argument further. I will only say that yes, using the font maps is the way to go As @dritter already wrote, when you want to merge multiple fonts that evolve independently either you accept to lose some glyphs (when more than one font use the same codepoint for different glyphs) or you need to move the glyphs to different codepoints, I chose the second To avoid the unstable mapping between codepoints and glyphs when I move the glyphs I also create the font map files so that if you refer to a glyph by its name in the map (ex. Anyway, I'm here for any further question and open to suggestion on how to improve |
@shibumi sorry for the late reply, I've completely missed your issue, I'll reply to you right now |
@gabrielelana Thanks for your insights! @protist I think the PR to solve this is #385 , no? Or do you have something else in mind? |
@protist I didn't add |
This has been a really great discussion! A huge 👏 to @dritter for providing so much insight, and a special thanks to @gabrielelana for weighing-in! Moving forward, I would like to do a few things: 1)Fonts are terribly confusing, especially if you aren't familiar with how they work. @protist's question is common, and I want to be sure we provide enough information to explain things to new users. @dritter has provided a lot of really excellent information here, and I don't want to 'lose' it in this thread. I recently created the new About Fonts wiki page using content that @dritter had actually written in a different bug! @protist, would you mind giving it a read and letting us know where you think it's lacking? I think some of @dritter's comments in this thread could be added to that wiki page. 2)Per @gabrielelana, @V1rgul's PR #385 is the right answer to this problem. I am working on integrating it in a way that is backwards-compatible for users who are using that config but not that specific installation method. This is at the very top of my priority list :) |
Thanks @bhilburn, that new wiki page looks great! I had a few minor comments though. On my system (Arch Linux), the second fontconfig option wasn't "more complicated" than the first option would have been. In both cases, I just installed the new font using the package manager, and it just… worked. In fact, the first "patched" option would have been slightly more complicated, because I would have had to change my terminal emulator's font. In the second case, no configuration was required by me. Also, is the installation of (pre-patched) fonts an OSX thing? In Linux, I just download/install via the package manager… I'm not even sure if I can double-click fonts. (And a minor point, should this section refer to both pre-patched and additional fonts, not just the former?) Apart from that, it's perfect. TBH my confusion wasn't precisely about what is covered in this page, but more because the examples in the main readme were broken, due to the changed code points. However, presumably once the pull request is merged that will all make sense. And presumably you plan to add information about that side of the config after the pull request. Cheers! |
Firstly, I'm not exactly sure what you mean by "Awesome Powerline" fonts in the Readme. Is that a general style of fonts? What are some examples of this font? I took a guess and installed awesome-terminal-fonts aka FontAwesome (N.B. it doesn't have "Powerline" in its name at all). It seems to have installed fine. e.g.
echo "\uf20c"
now shows a glyph.However, the Readme states that "you can add a time symbol to [a] segment" with some code. This did not work for me (see screenshot below). Also,
echo "\uE868"
doesn't print out a correct glyph.In addition, it's stated here that the "Awesome Powerline" glyphs can be used to substitute for the home path. This did not happen automatically for me. Did I need to do something else?
The text was updated successfully, but these errors were encountered: