Skip to content

Commit

Permalink
Sync fonts before event loop
Browse files Browse the repository at this point in the history
Fixes bug on MacOS where redraw occurs before fonts are synced.
  • Loading branch information
geom3trik committed Sep 10, 2022
1 parent a2f4b4c commit f9f06ce
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/vizia_winit/src/application.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit f9f06ce

Please sign in to comment.