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

"FontForge module is probably not installed" but on Windows WSL #284

Closed
4 tasks done
jcklpe opened this issue Jul 20, 2018 · 10 comments
Closed
4 tasks done

"FontForge module is probably not installed" but on Windows WSL #284

jcklpe opened this issue Jul 20, 2018 · 10 comments

Comments

@jcklpe
Copy link

jcklpe commented Jul 20, 2018

🗹 Requirements

  • A brief but descriptive title of your issue
  • I have searched the issues for my issue and found nothing related and/or helpful
  • I have read or scanned the FAQ
  • I have read or scanned the Wiki

🎯 Subject of the issue

I'm running into an issue that looks to be the same as this one: #225

Except that I am on Windows using WSL. I am a designer learning to code so I'm not totally up on the differences between Mac and WSL but from what I can tell I don't think their solution will work for me because of file path differences. Any suggestions on what I should do?

🔧 Your Setup

  • Input Mono
  • Hyper 2
  • Windows 10 WSL Ubuntu 18.04

I also tried installing fontforge but the ppa provided by fontforge is not been put out for Ubuntu 18. I tried to compile it from source (something I've never done before) and I almost got there until the compile make threw an error that I didn't understand. I also tried installing it via a deb package I found online but it said it was unable to locate the package even though I was in the exact same folder as it.

Any help would be appreciated. I'm going to go try and do this on my Linux machine but it would be nice to have access to fontforge on my windows machine and it seemed worth reporting.

@jcklpe
Copy link
Author

jcklpe commented Jul 21, 2018

Okay I'm trying this on a straight Kubuntu machine and it is not working.... same error.

@jcklpe
Copy link
Author

jcklpe commented Jul 22, 2018

Okay I got this to work. I opened up the file and I saw that it was in python and that the thing that was throwing the error had to do with psMat. I don't know what that is but from what I can tell it has something to do with fontforge being installed in python 3 but not 2 on Ubuntu so in order to run the script I had to use my command like this: https://stackoverflow.com/questions/29441053/importerror-psmat-is-not-a-built-in-module

fontforge -script script.py {{name of font to be changed}}

This also required me to rename font-patcher to font-patcher.py

This fixed my issue as far as I can tell. I'm now trying to install the fonts which I can't because the owner is set to root. So I'm trying to figure out how to do this.

I'm not closing this issue yet as I haven't received a response and I think this case should be included in the documentation. I was using a fresh install so I doubt this would be a unique occurrence. @ryanoasis can of course close this issue as he wishes, but I think some kind of information should be included in the instructions.

@efade
Copy link

efade commented Aug 20, 2018

I had the same issue with openSUSE. Your solution worked for me. Looks like the script needs to be updated.

@jrhalchak
Copy link

I couldn't get past this issue on Windows 10 proper, but this seems to have worked for WSL.

I had to install pip and config-parser as well, and then run:
fontforge -script font-patcher {flags} {font-filename}

@AkechiShiro
Copy link

I've had the same issue on Linux, PopOS 20.04 (Kinda of similar to Unbuntu 20.04) but it's probably because my default python binary refers to python3, your solution worked as well for me.

@chrisant996
Copy link

chrisant996 commented Dec 27, 2020

Same problem on Windows 10.0.19041. Installed FontForge, but the fontpatcher.py script can't import psMat and I'm left to manually figure out how to placate the fontpatcher.py script.

UPDATE: fontforge -script script.py args works for me. This should be covered in the Nerd Fonts site, or even directly in font-patcher.py itself (e.g. with a more information error message that mentions how to successfully invoke the script).

@Finii
Copy link
Collaborator

Finii commented Feb 4, 2023

Thanks for reporting and the information.

To be honest I never ever run the script directly, always through fontforge. And you are right the messages and docu on the web page could be improved.

Finii added a commit to Finii/nerd-fonts that referenced this issue Feb 4, 2023
[why]
A lot of issues arise here. Running through fontforge instead of direct
seems to be more compatibe across setups.

Fixes: ryanoasis#284

Signed-off-by: Fini Jastrow <[email protected]>
Finii added a commit to Finii/nerd-fonts that referenced this issue Feb 4, 2023
[why]
A lot of issues arise here. Running through fontforge instead of direct
seems to be more compatibe across setups.

Fixes: ryanoasis#284

Signed-off-by: Fini Jastrow <[email protected]>
@Finii Finii closed this as completed in d083aa6 Feb 4, 2023
@Finii
Copy link
Collaborator

Finii commented Feb 4, 2023

Fixed:

  • ac60053 font-patcher: Correct python module missing message
  • d083aa6 docs: Improve self-patching instructions

@chrisant996
Copy link

Thanks, @Finii !

Finii added a commit that referenced this issue Feb 13, 2023
[why]
A lot of issues arise here. Running through fontforge instead of direct
seems to be more compatibe across setups.

Fixes: #284

Signed-off-by: Fini Jastrow <[email protected]>
Finii added a commit to b-/nerd-fonts that referenced this issue Feb 17, 2023
[why]
A lot of issues arise here. Running through fontforge instead of direct
seems to be more compatibe across setups.

Fixes: ryanoasis#284

Signed-off-by: Fini Jastrow <[email protected]>
@github-actions
Copy link
Contributor

github-actions bot commented Aug 7, 2023

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 Aug 7, 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

6 participants