-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Include a python3 version of the font-patcher script #49
Comments
@SageEx Thanks for the info and I am glad this project is useful to you 😄
I will have to look into that, I see the changes you had to make. There has to be a way to make it compatible for py3 and py2 without having 2 separate scripts to maintain?
Looks like the license will allow this (OFL (SIL Open Font License)), the only I was checking for is if there is a Reserved Font Name specified in the license but I don't see one. If the name is reserved we would just have to rename the patched version (e.g. Hack becomes Knack). |
Most of the changes are due to the convention changes from python2 to python3 - like
I doubt that a single python script would suffice. Rather, as a solution, you can maintain the python2 script only and use 2to3 to automatically generate the python3 script. The only manual change you will have to make in the generated script is to revert the change at line 306. By default 2to3 will change from Unicode to str - but str is not an attribute - hence the error. Any way to use 2to3 which does not change this will be the answer to this problem. I really hope to see the Fantasque Sans Mono font in the repo. Thanks again for this repo - along with vim-webdevicons. |
Thanks btw. I will probably get to this but not anytime soon.
Probably not too difficult to add just a handful of bugs that I've been focusing on. Cheers! |
I don't have fontforge setup with py3 bindings nor have it compiled with py3 so I cannot test however this script:
This is only on the 0.7.0 branch for now. I will test it when I get a chance. |
Fix the branch icon in the VCS segment. Resolves bug ryanoasis#49.
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. |
Hi,
First of all thanks a lot for this project.
Recently, I tried to patch the font Fantasque Sans Mono.
The problem is that on ArchLinux the fontforge library has bindings for python3 by default( python3 is the default python). So, running with
./font-patcher ...
didn't work.I had to use the fontforge program directly -
fontforge -script font-patcher --fontawesome --careful FantasqueSansMonoRegular.ttf
.But the script is in python2. Using 2to3 on the file gave an attribute error. I found the problem and everything worked.
I suggest including a python3 version of the script in the repo. I am attaching it - it will save a lot of hassle for many people.
Besides, how about including Fantasque Sans Mono in the default patched fonts set ?
font-patcher.txt
The text was updated successfully, but these errors were encountered: