Skip to content
This repository has been archived by the owner on Apr 24, 2020. It is now read-only.

Switching awesome-patched-mode to nerd-fonts #95

Closed
dritter opened this issue Sep 15, 2015 · 17 comments
Closed

Switching awesome-patched-mode to nerd-fonts #95

dritter opened this issue Sep 15, 2015 · 17 comments

Comments

@dritter
Copy link
Member

dritter commented Sep 15, 2015

I recently stumbled upon another font-patching project nerd-fonts which looks quite nice and foremost uses the same codepoints as the original fonts. Using this fonts instead of the awesome-terminal-fonts would improve the code in a sustainable way. We just have to test two font-settings and the users would have a nice overview of the available glyphs (in case they want to override one or another).

It still has some issues with the glyph sizes, but once that is cleaned up, I'll give it a chance. This issue is just to remember me (or to inform anybody who wants to get involved).

@rjorgenson
Copy link
Collaborator

I found the same thing and tried out a swap the other day. All of the font-awesome icons were narrow and squished, but I was just trying their patched fonts which are about a month old. Might have better luck patching myself. There were also a few glyphs still missing from font-awesome and octicons, but I found suitable replacements for them with what was included.

@dritter
Copy link
Member Author

dritter commented Oct 20, 2015

@rjorgenson I had exactly the same experience with nerd-fonts. Thats why this is a long-term issue. The plan to switch fonts is in #97

@martinpelikan
Copy link
Contributor

I actually didn't have luck with awesome-terminal-fonts before, because I didn't like any of the pre-patched fonts and urxvt does not like the fontconfig fallback approach. nerd-fonts seems like an outright improvement, at least in my case.

The glyph sizes are appropriate in gnome-terminal (seen on the right). However, I think some/most of these are "double-wide glyphs", so urxvt shrinks them to occupy just one cell (seen on the left). I'm not sure how to configure urxvt to handle this properly and I'm out of ideas at this point. ryanoasis/vim-devicons#11 may be relevant.

I'm actually amazed at how annoying and complicated fonts are to deal with in the grand scheme of things, but at least this is an improvement over what I had before.

2015-10-25-195131_1280x70_scrot

@ariscn
Copy link

ariscn commented Nov 1, 2015

It looks like none of powerline9k's modes work with nerd-fonts? I'm using a pre-patched nerd-fonts (fontawesome, octicons, pomicons, and implicit devicons), and while awesome-fontconfig comes close, it still has some gaps:

screenshot 2015-11-01 00 34 50

It's pretty clear how to add a new mode to powerline9k, but how can I figure out the corresponding nerd-fonts codepoints?

Edit: Tentatively looks like a nerd-fonts issue with some but not all of their fonts. However, there seems to be a different issue, which is that many of the icons are shifted up by a few pixels?

I'm now using Inconsolata from awesome-tools. On a first read, this issue made it seem like that would be a drop-in replacement, but that appears not to be the case.

@ryanoasis
Copy link
Member

Ah font fun 😏

@dritter Yeah unfortunately there are quite a few serious issues still 😟 so I have mostly been focusing on the low hanging fruit to keep the project moving 😄 . I was initially just creating it for another project I had but the more useful others find it the more I try to put into it.

@rjorgenson All of the "pure" mono versions currently have the squished issue/effect. If you can use the double width glyph version (if your terminal allows it) you might get better results

@martinpelikan Yeah the primary driving force behind the "pure" mono versions was to get the glyphs to show up in terminal emulators like urxvt where seems to skip them if they are too wide.

@ariscn see my comment on: ryanoasis/nerd-fonts#40 (comment)

@dritter
Copy link
Member Author

dritter commented Nov 1, 2015

@ryanoasis Don't worry, I'll wait till everything is ready 😉

@ariscn awesome-terminal-fonts use to relocate the code points by default. So the code points differ from the ones used by nerd-fonts. To make things worse, the code points in awesome-terminal-fonts differ depending what kind of strategy (patching or fallback) you use (which is why we have to care about two different icon (code point) sets.
Also nerd-fonts code points are nearer to the ones from the original fonts, and that is why I want to switch to that. So it should be a drop-in replacement in the future IMHO.

@DanielGGordon
Copy link

I tried a few nerd fonts (using Babun with Zsh on Windows via Mintty), but none of them worked properly. Getting these fonts to work with Windows is a big pain.

@ryanoasis
Copy link
Member

@DanielGGordon Yeah I have not had a lot of time recently and I never really tested the fonts on Windows fully. Nevertheless your feedback is helpful for me to focus on the pain points 👍

@DanielGGordon
Copy link

Meslo LG M for Powerline actually seems to work fine for me - this is a nerd font.

Although all the icons are a bit small.

@biax
Copy link

biax commented Oct 28, 2016

i tried several nerd fonts and none seem to display the clock:
POWERLEVEL9K_TIME_FORMAT="%D{%H:%M:%S \uE868 %d.%m.%y}"

anyone have the below working?
DejaVu Sans Mono for Powerline Nerd Font Plus Font Awesome Mono Windows Compatible.ttf

all i get is a weird compressed block.

@Arzte
Copy link

Arzte commented Feb 18, 2017

Whats the current status of this?

@bhilburn
Copy link
Member

I will be pulling in a separate font config option for nerd-fonts via @lcorsini's #390 PR!

@bhilburn
Copy link
Member

bhilburn commented Mar 8, 2017

We finally have nerd-fonts support!

@bhilburn bhilburn closed this as completed Mar 8, 2017
@DanielGGordon
Copy link

The problem is for windows users - I'm trying to use nerd fonts with the new Ubuntu For Windows terminal. A lot of the icons look small - and you have to use monospace.

1 similar comment
@DanielGGordon
Copy link

The problem is for windows users - I'm trying to use nerd fonts with the new Ubuntu For Windows terminal. A lot of the icons look small - and you have to use monospace.

@ryanoasis
Copy link
Member

@DanielGGordon Yeah the monospace ones will have to be small to maintain scale to fit as a single-width glyph. As for Windows and non-mono fonts... I don't know too much on what is possible so I'd have to get back to you on that!

@batousik
Copy link

@DanielGGordon same issue

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

10 participants