Vendor dependencies for 0.3.0 release

This commit is contained in:
2025-09-27 10:29:08 -05:00
parent 0c8d39d483
commit 82ab7f317b
26803 changed files with 16134934 additions and 0 deletions

15
vendor/fontdb/tests/add_fonts.rs vendored Normal file
View File

@@ -0,0 +1,15 @@
const DEMO_TTF: &[u8] = include_bytes!("./fonts/Tuffy.ttf");
use std::sync::Arc;
#[test]
fn add_fonts_and_get_ids_back() {
env_logger::init();
let mut font_db = fontdb::Database::new();
let ids = font_db.load_font_source(fontdb::Source::Binary(Arc::new(DEMO_TTF)));
assert_eq!(ids.len(), 1);
let id = ids[0];
let font = font_db.face(id).unwrap();
assert!(font.families.iter().any(|(name, _)| name == "Tuffy"));
}