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

Not able to open glyphnames json when running patcher 3.3.0 script in WIndows #1761

Closed
3 tasks done
saumyajyoti opened this issue Dec 15, 2024 · 7 comments
Closed
3 tasks done

Comments

@saumyajyoti
Copy link

Requirements

  • I have searched the issues for my issue and found nothing related or helpful
  • I have searched the FAQ for help
  • I have checked the Wiki for help

Experienced Behavior

The patcher script throws the below warning:

Nerd Fonts Patcher v3.3.0 (4.16.1) (ff 20230101)
WARNING: Can not read glyphnames file (UnicodeDecodeError('charmap', b'{"METADATA":{"website":"https://www.nerdfonts.com","development-website":"https://github.com/ryanoasis/nerd-fonts","

Expected Behavior

Script runs without this warning

Example Symbols or Text

No response

Font Used

My custom IOSEVKA font.

Source of Font File

https://github.com/saumyajyoti/MiosevkaNerdFont

Terminal Emulator (and the title of the terminal window)

Windows Terminal

Operating System and Version

Windows 11, 23H2

Screenshots

No response

@Finii
Copy link
Collaborator

Finii commented Dec 15, 2024

Oh. Two questions:

  1. You patch directly under Windows, not in some Linux Subsystem?
  2. How did you get the patcher script on your machine? Repo clone, FontPatcher.zip, ... ?
  3. Which Python version are you using?

@saumyajyoti
Copy link
Author

You patch directly under Windows, not in some Linux Subsystem?

How did you get the patcher script on your machine? Repo clone, FontPatcher.zip, ... ?

  • Downloaded Fontpatcher.zip.

Which Python version are you using?

  • Using FFPYthon bundled in WIndows Fontforge release 2023-1-1. Python version:
  • Python 3.10.9 (main, Dec 10 2022, 09:16:22) [GCC 12.2.0 32 bit] on win32

@Finii Finii added this to the v3.4.0 milestone Jan 14, 2025
@Finii
Copy link
Collaborator

Finii commented Jan 15, 2025

On a completely "clean" Windows 11 machine (my kids gaming laptop)

cd 'C:\Program Files (x86)\FontForgeBuilds\bin\'
.\fontforge.exe --script C:\Users\jastr\Downloads\FontPatcher\font-patcher C:\Users\jastr\Downloads\Miosevka12.\Font\Miosevka12\Miosevka-Regular.ttf --outputdir ..\..\..\Users\jastr

grafik

Still I encountered the problem that the --outputdir may not contain colons, which is unexpected under windows.
I will fix that.

But this seems to work as expected. Obviously I have no PATH and whatnot to make it ok run without changing into the Programs directory (and I was too stupid to run Fontforge from a different directory).

Lets see if I can find out what went wrong in your case with the glyphname file...

Finii added a commit that referenced this issue Jan 15, 2025
[why]
Some user reported a unicode decoding issue.

[how]
Usually it should work but when the system has some strange setting the
datafile might be interpreted as something else (not utf8).

State the encoding now explicitly.

Possibly fixes: #1761

Signed-off-by: Fini Jastrow <[email protected]>
Finii added a commit that referenced this issue Jan 15, 2025
[why]
Some user reported a unicode decoding issue.

[how]
Usually it should work but when the system has some strange setting the
datafile might be interpreted as something else (not utf8).

When the file is opened as binary it should be decoded as utf*.

Possibly fixes: #1761

Signed-off-by: Fini Jastrow <[email protected]>
@Finii Finii closed this as completed in c1859cf Jan 15, 2025
@Finii
Copy link
Collaborator

Finii commented Jan 15, 2025

Please check again if this is still a problem with font-patcher 4.18.1

https://github.com/ryanoasis/nerd-fonts/blob/master/FontPatcher.zip

Please add a screenshot / image of your invocation if it still fails.

It is best to call directly fontforge with the script as parameter than to call the script via Python and that spins up Fontforge.

@saumyajyoti
Copy link
Author

Downloaded the latest patcher and reran my existing script. It worked w/o any error. This issue seems to be fixed now.

@Finii
Copy link
Collaborator

Finii commented Jan 17, 2025

Thanks for reporting back!

@Finii
Copy link
Collaborator

Finii commented Jan 17, 2025

@allcontributors please add @saumyajyoti for bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants