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

Separation of backend library code from app code #548

Open
justvanrossum opened this issue Jun 14, 2023 · 5 comments
Open

Separation of backend library code from app code #548

justvanrossum opened this issue Jun 14, 2023 · 5 comments
Labels
python Pull requests that update Python code

Comments

@justvanrossum
Copy link
Collaborator

justvanrossum commented Jun 14, 2023

Some of Fontra's Python code for reading/writing font files is becoming useful on its own.

To make that part of the code more accessible, it should be available with a less restrictive license, such as Apache.

This applies mostly to:

The same goes for the entirety of fontra-rcjk:

The fontra data structures should be part of this, too:

More internal dependencies:

Perhaps we should make a new package called fontra-core, that contains all library code.

The Python code left in the main app would be:

@justvanrossum justvanrossum added the python Pull requests that update Python code label Jun 14, 2023
@davelab6
Copy link
Member

davelab6 commented Jun 14, 2023

Perhaps we should make a new package called fontra-core, that contains all library code.

I don't think that will work so well technically for people who want separate pieces; I would expect each logical unit of code to be its own pypi package. The "mono library" design of fonttools is not widely loved.

If this stuff doesn't make sense in smaller pieces, I am strongly against it, because the Black Foundry strategy for using GPL is to encourage collaboration on the project.

Using Fontra's Python code to read/write source data (designspace/ufo/rcjk) outside of Fontra itself in build workflows, doesn't seem to me that GPL gets in the way, since build workflows aren't distributed to end users. Using GPL code in private is fine.

@justvanrossum
Copy link
Collaborator Author

justvanrossum commented Jun 14, 2023

I don't think that will work so well technically for people who want separate pieces; I would expect each logical unit of code to be its own pypi package. The "mono library" design of fonttools is not widely loved.

FWIW, the intention is for the separate pieces to be logical units of code, and I agree that should be the driving force. But if indeed the license imposes no issues, then I will not rush into such a refactoring.

I do eventually want the Fontra filesystem backend modules (Python) to be installable without pulling in all Fontra's front end stuff (JS).

@davelab6
Copy link
Member

davelab6 commented Jun 15, 2023

Sounds good

I guess we can keep this issue open and revisit when there is a unit of code that would make sense as an isolated pypi package?

The other thing about the copyleft issue is, code under copyleft licenses can be mixed with code under non copyleft licenses that are also libre, and the non copyleft parts remain non copyleft, but the whole thing can't be made proprietary; for that, the copyleft pieces need to be replaced. So if the rest of the other project is mit/apache/etc, it can be fine to add fontra originated code.

@justvanrossum
Copy link
Collaborator Author

The question comes back with googlefonts/fontra-compile#1.

I think I should spec out fontra-core, and we should go for it.

@rsheeter
Copy link

rsheeter commented Feb 1, 2024

The "mono library" design of fonttools is not widely loved

fwiw I have heard the exact opposite claimed as well. I don't claim to know the correct answer :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python Pull requests that update Python code
Projects
Status: 📋 Backlog
Development

No branches or pull requests

3 participants