ryanoasis / nerd-fonts

Iconic font aggregator, collection, & patcher. 3,600+ icons, 50+ patched fonts: Hack, Source Code Pro, more. Glyph collections: Font Awesome, Material Design Icons, Octicons, & more

Home Page:https://NerdFonts.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

2.0 Fonts Can't Be Used in Windows cmd.exe/powershell.exe/wsl shells

brennanfee opened this issue · comments

🎯 Subject of the issue

It seems that something in the fonts changed to prevent the cmd.exe (windows console) from recognizing the fonts. I'm aware that there are a few font flags that are required for cmd.exe to recognize the fonts (such as OEM_CHARSET for opentype and FF_MODERN for truetype).

This works with previous versions of the fonts (as recently as 1.2). I even tried the old-school method of adding them to the registry (which isn't supposed to be needed anymore).

🔧 Your Setup

  • Which font are you using (e.g. Anonymice Powerline Nerd Font Complete.ttf)?

I haven't tried them all but the ones I'm trying to get working are: Hack, SauceCodePro, Hasklug, Fura Code. In every case, I installed the "Windows Compatible Mono" versions of the fonts.

  • Which terminal emulator are you using (e.g. iterm2, urxvt, gnome, konsole)?

Standard Windows cmd.exe or PowerShell.exe or any of the WSL shells (ubuntu).

  • Are you using OS X, Linux or Windows? And which specific version or distribution?

Windows 10, 1803

Same here:

  • have tried DejaVu Sans Mono Nerd Font Complete Windows Compatible.ttf
  • stardard cmd.exe, debian wsl, wsl-terminal
  • Windows 10, 1803

Tried the old regedit stuff, does not work at all. I can also confirm that the previous version of the font works.

Could this be because of the latest Windows update?

From what I've read online, windows won't list fonts that have a variable font width in them of some kind. I have a feeling that even though these are marked as mono spaced, there is something in there variable or not conforming to whatever base size is used, and windows is automatically excluding them.

To whom it may concern: the fonts cannot be used by gVim neither. Obviously for the same reason…

I believe this is the same issue as #270 (or at least heavily related).

Is it possible that PR #283 fixes this!?

@Thraka yeah i just tested it and it fixes it. at first it didn't work because i tried to patch an otf font, but once i patched the ttf version i could use it in cmd/powershell. apparently windows shells don't support otf

@haasosaurus Awesome! Did your patching tests run through all the fonts? Or do I have to download the source and build and generate fonts (I don't really want to do that).

@Thraka i'm generating them all for you, but my computer sucks so it's taking a long time, i would hope by tonight it will be done

Awesome, thanks!!!

I'm afraid it's still not working for me :(

@haasosaurus Thanks! I tried LiberationMono from your branch and it worked

@haasosaurus I used your branch to patch PragmataPro Mono Liga (recently released) and it was able to be used in Powershell! Unfortunately it destroyed the kerning between letters and all letters and symbols seemed to have additional space between them as compared to regular PragmataPro Mono Liga which was a dealbreaker for me.

ffpython E:\repos\nerd-fonts\font-patcher "C:\Users\invad\Downloads\Pragmata Pro Regular\Pragmata Pro Regular\FSD - PragmataProMonoLiga-Regular.ttf" -s -w --careful --powerline --powerlineextra --octicons --out E:\repos\fonts

unpatched
patched

I discovered in 'Putty Configuration' -> Window -> Appearance, there is a check box 'Allow selection of variable-pitch fonts' that when enabled allowed me to use fonts in ssh that WSL or CMD.exe would not list.

Putty will not show the 'Hack mono' font when the checkbox is unchecked. When checked, it's available. I think that's a good indication the 2.0 Nerd fonts are not constructed properly.

I actually got the same problem.. any fix? I am using Source Code Pro

@haasosaurus
could you please regenerate ttf files for Meslo font? in your branch, only otf versions are available. thanks

I can confirm that the "mono" versions of the fonts provided in @haasosaurus branch work in cmd.exe and powershell.exe

There are some minor issues (like the "italic" version of Source Code Pro seems to be missing from his branch)... but the general fix he provided does seem to work in Windows.

@haasosaurus I was hitting the same problem, and your PR fixed it for me. I was even able to --custom Windows' Segoe UI Symbols font to get the prompt arrow used by https://github.com/sindresorhus/pure

Thank you!

still not working for me
Windows 10 v1809

Isn't this just a dupe of #270 ?

I can confirm that this is fixed as of the 2.1 release. I am closing this ticket.

the 3270 works on my windows 10 cmd. i used it as thin client to nvim installed on an ubuntu. download it here

@haasosaurus font fix works on cmd.exe, however I had to uninstall my existing fonts before reinstalling the patched ones for it to show up on the cmd.exe properties.

This issue has been automatically locked since there has not been any recent activity (i.e. last half year) after it was closed. It helps our maintainers focus on the active issues. If you have found a problem that seems similar, please open a new issue, complete the issue template with all the details necessary to reproduce, and mention this issue as reference.