From be7cfc85d08c545abfac08098b7b33b4bd71f37e Mon Sep 17 00:00:00 2001 From: Laurenz Date: Sun, 27 Oct 2024 19:04:55 +0100 Subject: Split out four new crates (#5302) --- crates/typst-render/Cargo.toml | 4 +--- crates/typst-render/src/image.rs | 4 ++-- crates/typst-render/src/lib.rs | 6 +++--- crates/typst-render/src/paint.rs | 4 ++-- crates/typst-render/src/shape.rs | 4 ++-- crates/typst-render/src/text.rs | 8 ++++---- 6 files changed, 14 insertions(+), 16 deletions(-) (limited to 'crates/typst-render') diff --git a/crates/typst-render/Cargo.toml b/crates/typst-render/Cargo.toml index 56a18e80..7d01d7e3 100644 --- a/crates/typst-render/Cargo.toml +++ b/crates/typst-render/Cargo.toml @@ -13,7 +13,7 @@ keywords = { workspace = true } readme = { workspace = true } [dependencies] -typst = { workspace = true } +typst-library = { workspace = true } typst-macros = { workspace = true } typst-timing = { workspace = true } bytemuck = { workspace = true } @@ -21,10 +21,8 @@ comemo = { workspace = true } image = { workspace = true } pixglyph = { workspace = true } resvg = { workspace = true } -roxmltree = { workspace = true } tiny-skia = { workspace = true } ttf-parser = { workspace = true } -usvg = { workspace = true } [lints] workspace = true diff --git a/crates/typst-render/src/image.rs b/crates/typst-render/src/image.rs index dcbf7982..27b03911 100644 --- a/crates/typst-render/src/image.rs +++ b/crates/typst-render/src/image.rs @@ -3,8 +3,8 @@ use std::sync::Arc; use image::imageops::FilterType; use image::{GenericImageView, Rgba}; use tiny_skia as sk; -use typst::layout::Size; -use typst::visualize::{Image, ImageKind}; +use typst_library::layout::Size; +use typst_library::visualize::{Image, ImageKind}; use crate::{AbsExt, State}; diff --git a/crates/typst-render/src/lib.rs b/crates/typst-render/src/lib.rs index d5eeacce..8de3852d 100644 --- a/crates/typst-render/src/lib.rs +++ b/crates/typst-render/src/lib.rs @@ -6,11 +6,11 @@ mod shape; mod text; use tiny_skia as sk; -use typst::layout::{ +use typst_library::layout::{ Abs, Axes, Frame, FrameItem, FrameKind, GroupItem, Page, Point, Size, Transform, }; -use typst::model::Document; -use typst::visualize::{Color, Geometry, Paint}; +use typst_library::model::Document; +use typst_library::visualize::{Color, Geometry, Paint}; /// Export a page into a raster image. /// diff --git a/crates/typst-render/src/paint.rs b/crates/typst-render/src/paint.rs index 3a507ca4..689f28a8 100644 --- a/crates/typst-render/src/paint.rs +++ b/crates/typst-render/src/paint.rs @@ -1,8 +1,8 @@ use std::sync::Arc; use tiny_skia as sk; -use typst::layout::{Axes, Point, Ratio, Size}; -use typst::visualize::{Color, Gradient, Paint, Pattern, RelativeTo}; +use typst_library::layout::{Axes, Point, Ratio, Size}; +use typst_library::visualize::{Color, Gradient, Paint, Pattern, RelativeTo}; use crate::{AbsExt, State}; diff --git a/crates/typst-render/src/shape.rs b/crates/typst-render/src/shape.rs index f31262ef..f9ff7f3a 100644 --- a/crates/typst-render/src/shape.rs +++ b/crates/typst-render/src/shape.rs @@ -1,6 +1,6 @@ use tiny_skia as sk; -use typst::layout::{Abs, Axes, Point, Ratio, Size}; -use typst::visualize::{ +use typst_library::layout::{Abs, Axes, Point, Ratio, Size}; +use typst_library::visualize::{ DashPattern, FillRule, FixedStroke, Geometry, LineCap, LineJoin, Path, PathItem, Shape, }; diff --git a/crates/typst-render/src/text.rs b/crates/typst-render/src/text.rs index 1685e67d..c017b1ce 100644 --- a/crates/typst-render/src/text.rs +++ b/crates/typst-render/src/text.rs @@ -3,10 +3,10 @@ use std::sync::Arc; use pixglyph::Bitmap; use tiny_skia as sk; use ttf_parser::{GlyphId, OutlineBuilder}; -use typst::layout::{Abs, Axes, Point, Size}; -use typst::text::color::{glyph_frame, should_outline}; -use typst::text::{Font, TextItem}; -use typst::visualize::{FixedStroke, Paint}; +use typst_library::layout::{Abs, Axes, Point, Size}; +use typst_library::text::color::{glyph_frame, should_outline}; +use typst_library::text::{Font, TextItem}; +use typst_library::visualize::{FixedStroke, Paint}; use crate::paint::{self, GradientSampler, PaintSampler, PatternSampler}; use crate::{shape, AbsExt, State}; -- cgit v1.2.3