embed font in the final binary
@@ -755,8 +755,10 @@ impl Editor {
fn new(engine: &mut GameEngine) -> Self {
let (message_sender, message_receiver) = mpsc::channel();
- *rg3d::gui::DEFAULT_FONT.0.lock().unwrap() = rg3d::core::futures::executor::block_on(
- Font::from_file("resources/arial.ttf", 14.0, Font::default_char_set()),
+ *rg3d::gui::DEFAULT_FONT.0.lock().unwrap() = Font::from_memory(
+ include_bytes!("../resources/arial.ttf").to_vec(),
+ 14.0,
+ Font::default_char_set(),
)
.unwrap();
