Vendor things

This commit is contained in:
John Doty 2024-03-08 11:03:01 -08:00
parent 5deceec006
commit 977e3c17e5
19434 changed files with 10682014 additions and 0 deletions

View file

@ -0,0 +1,16 @@
use owned_ttf_parser::{AsFaceRef, OwnedFace};
const FONT: &[u8] = include_bytes!("../fonts/font.ttf");
#[test]
fn move_and_use() {
let owned_data = FONT.to_vec();
let pin_face = OwnedFace::from_vec(owned_data, 0).unwrap();
let ascent = pin_face.as_face_ref().ascender();
// force a move
let moved = Box::new(pin_face);
assert_eq!(moved.as_face_ref().ascender(), ascent);
}