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

Unable to patch fonts on Apple silicon #662

Closed
selfagency opened this issue Sep 9, 2021 · 3 comments
Closed

Unable to patch fonts on Apple silicon #662

selfagency opened this issue Sep 9, 2021 · 3 comments

Comments

@selfagency
Copy link

selfagency commented Sep 9, 2021

Hello,

I'm trying to patch a font but despite having FontForge installed locally, which is said to be the only prerequisite in the docs, attempting to run the Python script resulted in:

» /opt/font-patcher.py         

Nerd Fonts: FontForge module is probably not installed. [See: http://designwithfontforge.com/en-US/Installing_Fontforge.html]

So I tried it this way:

» fontforge -script /opt/font-patcher.py RecMonoSemicasual-Bold-1.078.ttf 

Copyright (c) 2000-2021. See AUTHORS for Contributors.
 License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
 with many parts BSD <http://fontforge.org/license.html>. Please read LICENSE.
 Version: 20201107
 Based on sources from 2021-03-14 03:27 UTC-D.
The requested file, original-source.otf, does not exist
Traceback (most recent call last):
  File "/opt/font-patcher.py", line 929, in <module>
    main()
  File "/opt/font-patcher.py", line 924, in main
    patcher.patch()
  File "/opt/font-patcher.py", line 88, in patch
    symfont = fontforge.open(self.args.glyphdir + patch['Filename'])
OSError: Open failed

So then I tried it this way:

» docker run -v unpatched:/in -v patched:/out nerdfonts/patcher -c                          

WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested

And finally, I tried it this way:

» docker run --platform linux/amd64 --rm -v unpatched:/in -v patched:/out nerdfonts/patcher -c 

...which simply fails to launch, whereas Docker notes "Attempts to run Intel-based containers on Apple Silicon machines under emulation can crash as qemu sometimes fails to run the container." Docker's recommended remedy is "encouraging container authors to produce arm64, or multi-arch, versions of their containers." So I'm here to encourage you to please build a multi-arch version of the Docker image so that I may patch my fonts in peace.

Thank you!

@Finii
Copy link
Collaborator

Finii commented Oct 11, 2022

Added hint to download glyphs: done
Docker should work on Silicon now, I believe 🤔 there was some PR, iirc.
And/or use FontPatcher.zip from the release page.

@Finii Finii closed this as completed Oct 11, 2022
@sammcj
Copy link
Contributor

sammcj commented Oct 27, 2022

Somewhat related (but for the docker patcher) - #985

@github-actions
Copy link
Contributor

github-actions bot commented May 1, 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 May 1, 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

3 participants