rename krilla file

This commit is contained in:
Laurenz Stampfl 2024-12-17 20:07:24 +01:00
parent b00137f67e
commit cc35c8f6af
11 changed files with 15 additions and 14 deletions

1
Cargo.lock generated
View File

@ -1313,6 +1313,7 @@ dependencies = [
[[package]]
name = "krilla"
version = "0.3.0"
source = "git+https://github.com/LaurenzV/krilla#e1a36bf6094332f0875f507a051e7e018e8bf6cf"
dependencies = [
"base64",
"bumpalo",

View File

@ -56,7 +56,7 @@ dirs = "5"
ecow = { version = "0.2", features = ["serde"] }
env_proxy = "0.4"
flate2 = "1"
fontdb = { version = "0.21", default-features = false }
fontdb = { version = "0.22", default-features = false }
fs_extra = "1.3"
hayagriva = "0.8"
heck = "0.5"
@ -70,6 +70,7 @@ if_chain = "1"
image = { version = "0.25.2", default-features = false, features = ["png", "jpeg", "gif"] }
indexmap = { version = "2", features = ["serde"] }
kamadak-exif = "0.5"
krilla = { git = "https://github.com/LaurenzV/krilla", features = ["comemo", "rayon", "svg"] }
kurbo = "0.11"
libfuzzer-sys = "0.4"
lipsum = "0.9"
@ -95,7 +96,7 @@ quote = "1"
rayon = "1.7.0"
regex = "1"
regex-syntax = "0.8"
resvg = { version = "0.43", default-features = false, features = ["raster-images"] }
resvg = { version = "0.44", default-features = false, features = ["raster-images"] }
roxmltree = "0.20"
rust_decimal = { version = "1.36.0", default-features = false, features = ["maths"] }
rustybuzz = "0.18"
@ -131,7 +132,7 @@ unicode-script = "0.5"
unicode-segmentation = "1"
unscanny = "0.1"
ureq = { version = "2", default-features = false, features = ["native-tls", "gzip", "json"] }
usvg = { version = "0.43", default-features = false, features = ["text"] }
usvg = { version = "0.44", default-features = false, features = ["text"] }
walkdir = "2"
wasmi = "0.39.0"
xmlparser = "0.13.5"

View File

@ -30,8 +30,7 @@ use crate::text::handle_text;
use crate::util::{convert_path, display_font, AbsExt, TransformExt};
use crate::PdfOptions;
#[typst_macros::time(name = "write pdf")]
pub fn pdf(
pub fn convert(
typst_document: &PagedDocument,
options: &PdfOptions,
) -> SourceResult<Vec<u8>> {

View File

@ -10,7 +10,7 @@ use typst_library::layout::Size;
use typst_library::visualize::{Image, ImageKind, RasterFormat, RasterImage};
use typst_syntax::Span;
use crate::krilla::{FrameContext, GlobalContext};
use crate::convert::{FrameContext, GlobalContext};
use crate::util::{SizeExt, TransformExt};
pub(crate) fn handle_image(

View File

@ -1,7 +1,7 @@
//! Exporting Typst documents to PDF.
mod image;
mod krilla;
mod convert;
mod link;
mod metadata;
mod outline;
@ -23,7 +23,7 @@ pub use ::krilla::version::PdfVersion;
/// Returns the raw bytes making up the PDF file.
#[typst_macros::time(name = "pdf")]
pub fn pdf(document: &PagedDocument, options: &PdfOptions) -> SourceResult<Vec<u8>> {
krilla::pdf(document, options)
convert::convert(document, options)
}
/// Settings for PDF export.

View File

@ -5,7 +5,7 @@ use krilla::geom::Rect;
use typst_library::layout::{Abs, Point, Size};
use typst_library::model::Destination;
use crate::krilla::{FrameContext, GlobalContext};
use crate::convert::{FrameContext, GlobalContext};
use crate::util::{AbsExt, PointExt};
pub(crate) fn handle_link(

View File

@ -2,7 +2,7 @@ use ecow::EcoString;
use krilla::metadata::Metadata;
use typst_library::foundations::{Datetime, Smart};
use crate::krilla::GlobalContext;
use crate::convert::GlobalContext;
use crate::Timezone;
pub(crate) fn build_metadata(gc: &GlobalContext) -> Metadata {

View File

@ -6,7 +6,7 @@ use typst_library::foundations::{NativeElement, Packed, StyleChain};
use typst_library::layout::Abs;
use typst_library::model::HeadingElem;
use crate::krilla::GlobalContext;
use crate::convert::GlobalContext;
use crate::util::AbsExt;
pub(crate) fn build_outline(gc: &GlobalContext) -> Outline {

View File

@ -11,7 +11,7 @@ use typst_library::visualize::{
};
use typst_utils::Numeric;
use crate::krilla::{handle_frame, FrameContext, GlobalContext, State};
use crate::convert::{handle_frame, FrameContext, GlobalContext, State};
use crate::util::{AbsExt, ColorExt, FillRuleExt, LineCapExt, LineJoinExt, TransformExt};
pub(crate) fn convert_fill(

View File

@ -1,4 +1,4 @@
use crate::krilla::{FrameContext, GlobalContext};
use crate::convert::{FrameContext, GlobalContext};
use crate::paint;
use crate::util::{convert_path, AbsExt, TransformExt};
use krilla::geom::Rect;

View File

@ -10,7 +10,7 @@ use typst_library::text::{Font, Glyph, TextItem};
use typst_library::visualize::FillRule;
use typst_syntax::Span;
use crate::krilla::{FrameContext, GlobalContext};
use crate::convert::{FrameContext, GlobalContext};
use crate::paint;
use crate::util::{display_font, AbsExt, TransformExt};