summaryrefslogtreecommitdiff
path: root/tests/src/benches.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2024-02-28 11:06:54 +0100
committerGitHub <noreply@github.com>2024-02-28 10:06:54 +0000
commite16d3f5a67a31154797b4d56cdc6ed142ee2a7cf (patch)
tree31dcd2243c2b51bac62fe19e7e60efe5f6289281 /tests/src/benches.rs
parent5036c5acebebe12cbf14338f5413514251d83d1e (diff)
Externalize assets (#3515)
Diffstat (limited to 'tests/src/benches.rs')
-rw-r--r--tests/src/benches.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/src/benches.rs b/tests/src/benches.rs
index 8a521419..1bcdb528 100644
--- a/tests/src/benches.rs
+++ b/tests/src/benches.rs
@@ -10,7 +10,6 @@ use typst::{Library, World};
use unscanny::Scanner;
const TEXT: &str = include_str!("../typ/compiler/bench.typ");
-const FONT: &[u8] = include_bytes!("../../assets/fonts/LinLibertine_R.ttf");
main!(
bench_decode,
@@ -87,9 +86,9 @@ struct BenchWorld {
impl BenchWorld {
fn new() -> 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()),
book: Prehashed::new(book),