diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-09-30 22:46:03 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-09-30 22:50:14 +0200 |
| commit | 2818ceee44a523308d83643b8d2f921b4a5e5d2e (patch) | |
| tree | 7578dd2e354e64c0265cc6e736828e5803d38762 /benches | |
| parent | 30f302f7ffc464b41f1ac3b6d8fc6b4214835549 (diff) | |
New default fonts
Diffstat (limited to 'benches')
| -rw-r--r-- | benches/oneshot.rs | 8 |
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) } |
