From ec04c3de2fcc5b31d94dc2be8561e569f28cc0a1 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Wed, 8 Nov 2023 13:11:11 +0100 Subject: Extract `typst-render` crate --- crates/typst-cli/Cargo.toml | 1 + crates/typst-cli/src/compile.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'crates/typst-cli') diff --git a/crates/typst-cli/Cargo.toml b/crates/typst-cli/Cargo.toml index 6155c046..9a96c6b2 100644 --- a/crates/typst-cli/Cargo.toml +++ b/crates/typst-cli/Cargo.toml @@ -22,6 +22,7 @@ doc = false [dependencies] typst = { workspace = true } typst-library = { workspace = true } +typst-render = { workspace = true } chrono = { workspace = true } clap = { workspace = true } codespan-reporting = { workspace = true } diff --git a/crates/typst-cli/src/compile.rs b/crates/typst-cli/src/compile.rs index b5cf0e54..80e19f1b 100644 --- a/crates/typst-cli/src/compile.rs +++ b/crates/typst-cli/src/compile.rs @@ -220,7 +220,7 @@ fn export_image( match fmt { ImageExportFormat::Png => { let pixmap = - typst::export::render(frame, command.ppi / 72.0, Color::WHITE); + typst_render::render(frame, command.ppi / 72.0, Color::WHITE); pixmap .save_png(path) .map_err(|err| eco_format!("failed to write PNG file ({err})"))?; -- cgit v1.2.3