From 2818ceee44a523308d83643b8d2f921b4a5e5d2e Mon Sep 17 00:00:00 2001 From: Laurenz Date: Thu, 30 Sep 2021 22:46:03 +0200 Subject: New default fonts --- benches/oneshot.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'benches') 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) } -- cgit v1.2.3