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

Update scripts to Python 3.× #1579

Open
michalrus opened this issue Jul 23, 2023 · 3 comments
Open

Update scripts to Python 3.× #1579

michalrus opened this issue Jul 23, 2023 · 3 comments
Labels

Comments

@michalrus
Copy link

Hey, I noticed the scripts under fonts/ are still expecting Python 2.7 in FontForge, while Python 2 has reached end of life on Jan 1, 2020.

Recent FontForge versions also do not support it, I tried forcing 2.7, and this happened:

fontforge>   Could NOT find Python3 (missing: Python3_EXECUTABLE Python3_INCLUDE_DIRS
fontforge>   Python3_LIBRARIES Development Interpreter Development.Module
fontforge>   Development.Embed) (Required is at least version "3.6")

There's a tool helping with automated translation – https://docs.python.org/3/library/2to3.html – perhaps it could be used here? 🙏

Thank you for considering this!

@michalrus
Copy link
Author

michalrus commented Jul 23, 2023

So far, as a workaround, this works:

find -iname '*.py' -not -name 'checkSyllabation.py' | xargs 2to3 -w

sed -r 's/(newfont\[glyphnumber\]\.width) = (width)/\1 = int(\2)/g' -i fonts/squarize.py

@MaestroGlanz
Copy link

Stupid question, but...can you fork, edit and create a merge request? Or: What's against it?

@eschwab eschwab added the bug label Oct 28, 2023
@eschwab
Copy link
Contributor

eschwab commented Oct 28, 2023

Of course you can fork and make a pull request.

I may be able to update the scrips to python3 in mid November, but if @MaestroGlanz gets to it first, all the better.

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

No branches or pull requests

3 participants