这是indexloc提供的服务,不要输入任何密码
Skip to content

Unable to patch fonts on Apple silicon #662

@selfagency

Description

@selfagency

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions