Skip to content
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

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

Closed
brennanfee opened this issue May 18, 2018 · 24 comments
Closed

Comments

@brennanfee
Copy link
Contributor

brennanfee commented May 18, 2018

🎯 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

@razvancioarga
Copy link

razvancioarga commented May 22, 2018

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?

@Thraka
Copy link

Thraka commented May 22, 2018

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.

@Snaptags
Copy link

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

@brennanfee
Copy link
Contributor Author

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

@Thraka
Copy link

Thraka commented Jul 16, 2018

Is it possible that PR #283 fixes this!?

@haasosaurus
Copy link
Contributor

haasosaurus commented Jul 17, 2018

@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

@Thraka
Copy link

Thraka commented Jul 17, 2018

@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).

@haasosaurus
Copy link
Contributor

@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

@Thraka
Copy link

Thraka commented Jul 18, 2018

Awesome, thanks!!!

@haasosaurus
Copy link
Contributor

@Thraka try the fonts in this branch of my fork
https://github.com/haasosaurus/nerd-fonts/tree/regen-mono-font-fix

@RDeluxe
Copy link

RDeluxe commented Sep 10, 2018

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

@elentok
Copy link

elentok commented Sep 27, 2018

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

@ezpuzz
Copy link

ezpuzz commented Oct 5, 2018

@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

@kknox
Copy link

kknox commented Dec 16, 2018

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.

@ocelik94
Copy link

ocelik94 commented Dec 26, 2018

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

@faridcher
Copy link

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

@brennanfee
Copy link
Contributor Author

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.

@cspotcode
Copy link

@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!

@khmaies5
Copy link

khmaies5 commented Mar 4, 2019

still not working for me
Windows 10 v1809

@Jaykul
Copy link

Jaykul commented Oct 28, 2019

Isn't this just a dupe of #270 ?

@brennanfee
Copy link
Contributor Author

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

@ABDULAZIZ94
Copy link

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

@mb2g17
Copy link

mb2g17 commented Jul 6, 2020

@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.

@github-actions
Copy link
Contributor

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests