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

Use fontTools.cu2qu instead of cu2qu #461

Closed
wants to merge 2 commits into from

Conversation

simoncozens
Copy link
Contributor

According to googlefonts/cu2qu#191, cu2qu (the independent Python module) has ceased development and has now been folded into fontTools. This PR changes ufo2ft to use the fontTools version.

@anthrotype
Copy link
Member

anthrotype commented Feb 11, 2021

We didn't replace it yet intentionally, because the standalone cu2qu is accelerated using cython the fonttools one is pure python thus slower. The two modules are still in sync, no new features was added in the fonttools copy that warrants losing the speed-up.
Why do you want to do this now?

@anthrotype
Copy link
Member

If you like we could make it optional, have ufo2ft first try to import the standalone cu2qu and then fall back to fonttools cu2qu. But I want to understand the reason first

@simoncozens
Copy link
Contributor Author

The issue I linked suggests that the standalone module is dead and replaced by fontTools, so I thought it would make sense to use the not-dead implementation. I didn’t know about the Cython optimisation. I agree it would be a shame to lose that. I wonder why it wasn’t brought over.

@anthrotype
Copy link
Member

I wonder why it wasn’t brought over.

Actually it was! But it's only enabled if you build fonttools from source and you have cython already installed, or if you explicitly pass an optional build-time flag to fonttools setup.py (--with-cython or exporting FONTTOOLS_WITH_CYTHON=1 environment variable). We didn't enable this by default for the standard fonttools wheel package that we distribute over PyPI because we wanted to keep the traditional pure-python-ness of fonttools.

@bkmgit
Copy link
Contributor

bkmgit commented Jul 18, 2022

It would likely be good for the environment to enable Cython optimization in fonttools to minimize software energy consumption.

@anthrotype
Copy link
Member

this has already happened so can be closed

@anthrotype anthrotype closed this May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants