mooman219 / fontdue

The fastest font renderer in the world, written in pure rust.
Apache License 2.0
1.44k stars 72 forks source link

Add other licensing options #112

Closed lunabunn closed 2 years ago

lunabunn commented 2 years ago

Currently fontdue is licensed solely under MIT. In addition to not being as compatible as it could be with the rest of the ecosystem, most of which uses the MIT OR Apache-2.0 dual license, MIT is also problematic in that in lacks a patent protection clause and an explicit contribution clause. In fact, Rust itself is only keeping around MIT as a licensing option (instead of using just Apache-2.0) for GPLv2 compat.

If this project were to be dual-licensed under Apache-2.0 and MIT, contributors would be providing the Apache-2.0 patent grant, even though the project will still remain usable with the MIT license. It will also be more compatible with the rest of the ecosystem. I think this is the ideal option, especially for a crate such as fontdue that is more likely to end up in someone's dependency tree as an n-layers-deep indirect dependency than a direct one (having to deal with weird different licensing of some dependency of a dependency of a dependency is obviously not fun).

I would personally say that while we are at it we may as well also add the Zlib license to make it a MIT or Apache-2.0 or Zlib triple license, which would provide both the extra protection of Apache-2.0 and the extra permissiveness of Zlib. However, I do remember #7 being closed as wontfix, so if that had anything to do with you not liking the license, just the dual license above would still be better than what we have now. You closed that issue saying you cannot relicense due to legal reasons; however, that was 2 years ago. Does that still apply/does it also apply to Apache-2.0?

Obviously, both Apache-2.0 and Zlib are OSI-certified and relatively popular in the Rust community.

mooman219 commented 2 years ago

7 was closed because technically my employer owns this project and zlib wasn't an approved license at that time. I opened a ticket to add zlib which was resolved like a year later by the looks of it, so I should be able to use zlib now. Honestly though I'm not sure what I need to do to swap licenses since there's been a number of contributors and I haven't looked into it.

lunabunn commented 2 years ago

Honestly though I'm not sure what I need to do to swap licenses since there's been a number of contributors and I haven't looked into it.

There has been enough precedents of large crates being relicensed (https://github.com/gfx-rs/wgpu/issues/1440, https://github.com/gfx-rs/gfx/issues/847, https://github.com/sfackler/rust-postgres-macros/issues/19, etc.) that I think it would be safe to do what they did and ping all the contributors for permission. If you are okay with relicensing to MIT OR Apache-2.0 OR Zlib, I can go ahead and create a PR and handle the contributor checkoff.

mooman219 commented 2 years ago

Sounds good to me. I approve the license change to MIT OR Apache-2.0 OR Zlib.

I don't have the time right now to shepard the license change, so if you want to own the PR then I'll support it.

mooman219 commented 2 years ago

Ralith noted including the following:

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

grovesNL commented 2 years ago

This is done now

lunabunn commented 2 years ago

Indeed, thanks! 🎉