commit ef5606beb89101e1b251d8709040c9ce74908e97
parent 3287f3e7f05d6b4865a4ff15bf9617913e929e46
Author: = <=>
Date: Mon, 30 Dec 2019 13:36:44 +1300
Task: Embed font file.
Diffstat:
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/res/DejaVuSansMono.ttf b/res/DejaVuSansMono.ttf
Binary files differ.
diff --git a/src/main.rs b/src/main.rs
@@ -259,7 +259,10 @@ impl Game {
board: Board::new(),
turn: Player::White,
selected: vec![],
- font: graphics::Font::new(ctx, "/DejaVuSansMono.ttf")?,
+ font: graphics::Font::new_glyph_font_bytes(
+ ctx,
+ include_bytes!("../res/DejaVuSansMono.ttf"),
+ )?,
})
}
/// Moves calculates all valid moves for the currently selected piece.