git.lucas.co / cce-text-editor
text editor
git clone https://git.lucas.co/cce-text-editor.git

commitfcac306230198434641429014fb7fa7b0f38d2d2
parent403027e4fb
authorLucas Galante <[email protected]>
date2026-07-07 10:23
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,