summaryrefslogtreecommitdiff
path: root/benches
diff options
context:
space:
mode:
Diffstat (limited to 'benches')
-rw-r--r--benches/oneshot.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/benches/oneshot.rs b/benches/oneshot.rs
index 2b3fb6ea..dda3c572 100644
--- a/benches/oneshot.rs
+++ b/benches/oneshot.rs
@@ -10,14 +10,12 @@ use typst::source::{SourceFile, SourceId};
use typst::Context;
const SRC: &str = include_str!("bench.typ");
+const FONT: &[u8] = include_bytes!("../fonts/IBMPlexSans-Regular.ttf");
fn context() -> (Context, SourceId) {
- let font = include_bytes!("../fonts/EBGaramond-Regular.ttf");
- let loader = MemLoader::new()
- .with(Path::new("EBGaramond-Regular.ttf"), &font[..])
- .wrap();
+ let loader = MemLoader::new().with(Path::new("font.ttf"), FONT).wrap();
let mut ctx = Context::new(loader);
- let id = ctx.sources.provide(Path::new(""), SRC.to_string());
+ let id = ctx.sources.provide(Path::new("src.typ"), SRC.to_string());
(ctx, id)
}