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
@@ -17,8 +17,12 @@ ledger-config = { path = "../ledger-config" }
|
||||
ledger-import = { path = "../ledger-import" }
|
||||
ledger-vault = { path = "../ledger-vault" }
|
||||
ledger-package = { path = "../ledger-package" }
|
||||
eframe = { version = "0.36", default-features = false, features = ["default_fonts", "wgpu", "wayland", "x11", "persistence"] }
|
||||
egui = "0.36"
|
||||
# No `default_fonts`, on eframe or on egui: egui's own font set includes
|
||||
# Ubuntu Light, under the Ubuntu Font Licence, which Debian and Fedora class
|
||||
# as non-free. The viewer names every font it draws with (theme.rs,
|
||||
# assets/fonts/README.md), and `just deny` refuses that licence.
|
||||
eframe = { version = "0.36", default-features = false, features = ["wgpu", "wayland", "x11", "persistence"] }
|
||||
egui = { version = "0.36", default-features = false }
|
||||
egui_extras = { version = "0.36", features = ["image", "datepicker", "serde"] }
|
||||
egui-phosphor = "0.14"
|
||||
# Markdown documents, drawn as text. No image loading (no `load-images`,
|
||||
|
||||
Reference in new issue
Block a user