fix(viewer): every font the viewer ships is named, with its licence beside it
egui's default font set (the crate epaint_default_fonts, switched on by the `default_fonts` feature) includes Ubuntu Light under the Ubuntu Font Licence 1.0. Debian and Fedora class that licence as non-free, so a package of wanderbooks carrying it could not go into either. The viewer never drew a letter with it (all text is Inter), but the file was compiled into the program all the same. The feature is now off, on eframe and on egui, and epaint_default_fonts leaves the lock file. The viewer names its whole font set in theme.rs: - Inter (InterTab, as before) for all text: SIL OFL 1.1. - Hack for fixed-width text: MIT, with the Bitstream Vera licence. - Noto Emoji for symbols: SIL OFL 1.1. - emoji-icon-font for the few symbols Noto Emoji lacks: MIT. The last three are the files egui's set held, copied byte for byte (SHA-256 in assets/fonts/README.md), each now beside its licence text. They are files in this repository, not new dependencies. The OFL stays: it is Inter's own licence, it allows bundling with software under any licence, and Debian, Fedora, the FSF and the OSI accept it. Without the default set a missing glyph is an empty box, and nothing said so. A new test lays out every symbol the viewer's source draws and fails on one no bundled font has. It compares what is drawn with what is drawn for a code point no font has, since egui's `has_glyph` answers no for every character of the font that holds the replacement glyph. The test checks itself on a Cherokee letter, which no bundled font covers. Shown: `cargo test -p ledger-gui --lib theme` 2 passed; the side navigation's snapshot is unchanged (12 passed); the 33 screenshots of the demo books (tests/screens.rs) show Inter, Hack in the journal's hashes and JSON, and every arrow, check mark and icon drawn. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
1 parent
fe3b10e2d1
commit
b66dff899d
10 files changed
+368
-50
No files matched your search
Generated
-7
@@ -2076,7 +2076,6 @@ dependencies = [
|
||||
"bytemuck",
|
||||
"ecolor",
|
||||
"emath",
|
||||
"epaint_default_fonts",
|
||||
"font-types 0.12.6",
|
||||
"harfrust",
|
||||
"log",
|
||||
@@ -2092,12 +2091,6 @@ dependencies = [
|
||||
"vello_cpu 0.1.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "epaint_default_fonts"
|
||||
version = "0.36.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "773fa9c96dd0dbef887e39d0ed6177f141cce4d68e6041df77570aa3702dfa13"
|
||||
|
||||
[[package]]
|
||||
name = "equivalent"
|
||||
version = "1.0.2"
|
||||
|
||||
Reference in new issue
Block a user