font browser
refactor: create FontSystem via cce_ui::create_font_system_with_system_fonts
Use the shared cce_ui helper (system + bundled CCE fonts) instead of a bare
glyphon::FontSystem::new(). For the five apps that used FontSystem::new() this
additionally loads the bundled CCE fonts; the two hybrids drop their manual
load_fonts_dir call. Additive — no font source is lost.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
src/main.rs | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/src/main.rs b/src/main.rs
index 4107b45..e19ea72 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -526,11 +526,7 @@ impl Application for TypefaceApp {
height: if select_mode { 500 } else { 720 },
scale_factor: 1.0,
text_items: Vec::new(),
- font_system: {
- let mut fs = FontSystem::new();
- fs.db_mut().load_fonts_dir(cce_ui::fonts_dir());
- fs
- },
+ font_system: cce_ui::create_font_system_with_system_fonts(),
needs_rebuild: true,
root_window: {
let win_color = cce_ui::colors::page_low_color();