Vendor things
This commit is contained in:
parent
5deceec006
commit
977e3c17e5
19434 changed files with 10682014 additions and 0 deletions
16
third-party/vendor/owned_ttf_parser/tests/owned_ttf.rs
vendored
Normal file
16
third-party/vendor/owned_ttf_parser/tests/owned_ttf.rs
vendored
Normal 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);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue