font browser
fix: opt into system fonts in the engine's render FontSystem (Phase 6k)
The alphabet preview of any system-only family was INVISIBLE: preview
buffers are shaped against this app's system-fonts FontSystem, whose
fontdb face IDs the engine's bundled-only render FontSystem couldn't
rasterize. With Application::load_system_fonts the engine loads the same
font set (bundled first, system after — identical IDs) and previews of
installed families render. Verified live: baseline previews Berkeley
Mono (bundled) but draws Adwaita Mono (system) blank; with the opt-in
Adwaita Mono renders as its own face.
Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016MjP3pGQEDLkJbV5WEmYBe
src/main.rs | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/main.rs b/src/main.rs
index 6f4883f..283b733 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -482,6 +482,13 @@ impl Application for TypefaceApp {
Some(cce_ui::scene::painter::paint_tree(&self.ui_context, root))
}
+ /// The font picker previews arbitrary installed families: the engine's render FontSystem
+ /// must contain the system fonts, or preview buffers shaped against this app's
+ /// system-fonts FontSystem carry face IDs the engine can't rasterize (invisible text).
+ fn load_system_fonts(&self) -> bool {
+ true
+ }
+
fn new(_qh: &QueueHandle<EngineState<Self>>, _sender: calloop::channel::Sender<Self::Message>) -> Self {
cce_ui::scale::set_scale_factor(1.0);
// Parse command line arguments