From 210622d084cccec7a6a12b7319335bbf18bc56ac Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Wed, 12 Oct 2022 17:17:14 -0600 Subject: [PATCH] Remove dead code --- examples/text/src/main.rs | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/examples/text/src/main.rs b/examples/text/src/main.rs index 4b5df18..e6993ab 100644 --- a/examples/text/src/main.rs +++ b/examples/text/src/main.rs @@ -34,27 +34,6 @@ fn main() { &[WindowFlag::Resizable] ).unwrap(); - let mut font_datas = Vec::new(); - for (font_path, font_index) in &[ - ("/usr/share/fonts/truetype/freefont/FreeSans.ttf", 0), - ("/usr/share/fonts/truetype/freefont/FreeMono.ttf", 0), - ("/usr/share/fonts/truetype/noto/NotoSansArabic-Regular.ttf", 0), - ("/usr/share/fonts/opentype/noto/NotoSansCJK-Regular.ttc", 2 /* simplified chinese */), - ("/usr/share/fonts/truetype/noto/NotoColorEmoji.ttf", 0), - ] { - match fs::File::open(&font_path) { - Ok(font_file) => match unsafe { memmap2::Mmap::map(&font_file) } { - Ok(font_data) => font_datas.push((font_path, font_data, *font_index)), - Err(err) => { - eprintln!("failed to memory map font '{}': {}", font_path, err) - } - }, - Err(err) => { - eprintln!("failed to open font '{}': {}", font_path, err) - } - } - } - let font_system = FontSystem::new(); let font_matches = font_system.matches(|info| -> bool {