text editor
git clone https://git.lucas.co/cce-text-editor.git
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 5c33c2f..74dd49e 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -270,11 +270,7 @@ impl Application for TextEditorApp {
height: 600,
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,
ui_context: cce_ui::context::UiContext::new(),
ctrl_pressed: false,