cp437_tools/libs/public/
fonts.rs1use lazy_static::lazy_static;
10use rust_embed::RustEmbed;
11use ttf_parser::Face;
12
13#[derive(RustEmbed)]
14#[folder = "$CARGO_MANIFEST_DIR/res/fonts"]
15#[include = "*.otb"]
16#[include = "*.woff"]
17struct Fonts;
18
19lazy_static! {
20 pub static ref VGA_8X16_OTB: Vec<u8> = Fonts::get("IBM VGA.8x16.otb").expect("File exists").data.into_owned();
22 pub static ref VGA_9X16_OTB: Vec<u8> = Fonts::get("IBM VGA.9x16.otb").expect("File exists").data.into_owned();
24 pub static ref VGA_8X16_WOFF: Vec<u8> = Fonts::get("IBM VGA.8x16.woff").expect("File exists").data.into_owned();
26 pub static ref VGA_9X16_WOFF: Vec<u8> = Fonts::get("IBM VGA.9x16.woff").expect("File exists").data.into_owned();
28
29 pub static ref VGA_8X16: Face<'static> = Face::parse(&VGA_8X16_OTB, 0).expect("Valid font");
34
35 pub static ref VGA_9X16: Face<'static> = Face::parse(&VGA_9X16_OTB, 0).expect("Valid font");
40}