gregorio
gregorio copied to clipboard
Update scripts to Python 3.×
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? :pray:
Thank you for considering this!
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
Stupid question, but...can you fork, edit and create a merge request? Or: What's against it?
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.