From f9f06ce1e2fbb260d2cc9f3279f17d8900868323 Mon Sep 17 00:00:00 2001 From: George Atkinson Date: Sat, 10 Sep 2022 21:21:37 +0100 Subject: [PATCH] Sync fonts before event loop Fixes bug on MacOS where redraw occurs before fonts are synced. --- crates/vizia_winit/src/application.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/vizia_winit/src/application.rs b/crates/vizia_winit/src/application.rs index 3145e911f..1ce765bd8 100644 --- a/crates/vizia_winit/src/application.rs +++ b/crates/vizia_winit/src/application.rs @@ -184,6 +184,9 @@ impl Application { let default_should_poll = self.should_poll; let stored_control_flow = RefCell::new(ControlFlow::Poll); + let mut cx = BackendContext::new(&mut context); + cx.synchronize_fonts(); + event_loop.run(move |event, _, control_flow| { let mut cx = BackendContext::new(&mut context);