emilk / egui

egui: an easy-to-use immediate mode GUI in Rust that runs on both web and native
https://www.egui.rs/
Apache License 2.0
21.85k stars 1.58k forks source link

Licenses for default embedded fonts not included in `epaint` crate license #2321

Closed repi closed 1 month ago

repi commented 1 year ago

The epaint crate uses license MIT OR Apache-2.0 but when one uses it with the default features or the default_fonts features a set of default fonts are embedded in the binary that have additional licenses.

This makes it so tools like cargo-deny (license compliance) and cargo-about (license attribution) can't see and validate/include the required licenses.

These are the licenses used for the default fonts:

So to be fully correct in the license definition of the epaint crate I believe we would have to specify to license as:

(MIT OR Apache-2.0) AND OFL-1.1 AND LicenseRef-UFL-1.0.

A recent and good previous example for another crate was https://github.com/dtolnay/unicode-ident/pull/9.

A drawback of that however would be that if you use the crate with default-features = false and not with features = ["default_fonts"] tools wouldn't know that these licenses are then not required.

So believe the most clean solution for everyone would be to split out the default fonts into a separate crate (like epaint-default-fonts) that has this full license, a crate that just does include_bytes! on the fonts and exposes global variable with them. And then in epaint we can keep MIT OR Apache-2.0 license and include the epaint-default-fonts optionally in that.

Tools like cargo-deny and cargo-about would fully understand this and then only require that the OFL-1.1 and LicenseRef-UFL-1.0 are on the allow list if the optional default fonts are included.

What do you think about such an approach @emilk ?

emilk commented 1 year ago

Thanks for taking a look at this and opening an issue!

I agree that the clean solution is desirable, but also more complicated, so maybe I'll start with the simple solution.

repi commented 1 year ago

sounds good!

GunnarMorrigan commented 7 months ago

Link to the ubuntu font license 404s Please correct me if wrong, but I assume this is it: https://ubuntu.com/legal/font-licence

TheButlah commented 3 months ago

Also just hit this - I think a separate crate for the fonts would be the right way to go

emilk commented 3 months ago

You wanna make a PR for that? epaint_default_fonts makes sense imho. Maybe we should version and publish it separately from the other crates, though that's slightly more annoying. But releasing a new version of it every time we release a new egui seems wasteful, when the default fonts rarely change.