diff options
| author | Laurenz <laurmaedje@gmail.com> | 2024-02-28 11:06:54 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-28 10:06:54 +0000 |
| commit | e16d3f5a67a31154797b4d56cdc6ed142ee2a7cf (patch) | |
| tree | 31dcd2243c2b51bac62fe19e7e60efe5f6289281 /tests/fuzz/src/compile.rs | |
| parent | 5036c5acebebe12cbf14338f5413514251d83d1e (diff) | |
Externalize assets (#3515)
Diffstat (limited to 'tests/fuzz/src/compile.rs')
| -rw-r--r-- | tests/fuzz/src/compile.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/fuzz/src/compile.rs b/tests/fuzz/src/compile.rs index 883b9ea3..2d445bf5 100644 --- a/tests/fuzz/src/compile.rs +++ b/tests/fuzz/src/compile.rs @@ -10,8 +10,6 @@ use typst::text::{Font, FontBook}; use typst::visualize::Color; use typst::{Library, World}; -const FONT: &[u8] = include_bytes!("../../../assets/fonts/LinLibertine_R.ttf"); - struct FuzzWorld { library: Prehashed<Library>, book: Prehashed<FontBook>, @@ -21,7 +19,8 @@ struct FuzzWorld { impl FuzzWorld { fn new(text: &str) -> Self { - let font = Font::new(FONT.into(), 0).unwrap(); + let data = typst_assets::fonts().next().unwrap(); + let font = Font::new(Bytes::from_static(data), 0).unwrap(); let book = FontBook::from_fonts([&font]); Self { library: Prehashed::new(Library::default()), |
