diff --git a/Cargo.lock b/Cargo.lock index 6dc9e6fbb..ac08b57ee 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -217,20 +217,6 @@ name = "bytemuck" version = "1.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef657dfab802224e671f5818e9a4935f9b1957ed18e58292690cc39e7a4092a3" -dependencies = [ - "bytemuck_derive", -] - -[[package]] -name = "bytemuck_derive" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fa76293b4f7bb636ab88fd78228235b5248b4d05cc589aed610f954af5d7c7a" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] [[package]] name = "byteorder" @@ -763,15 +749,6 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4" -[[package]] -name = "float-cmp" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b09cf3155332e944990140d967ff5eceb70df778b34f77d8075db46e4704e6d8" -dependencies = [ - "num-traits", -] - [[package]] name = "fnv" version = "1.0.7" @@ -784,15 +761,6 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0d2fde1f7b3d48b8395d5f2de76c18a528bd6a9cdde438df747bfcba3e05d6f" -[[package]] -name = "font-types" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d868ec188a98bb014c606072edd47e52e7ab7297db943b0b28503121e1d037bd" -dependencies = [ - "bytemuck", -] - [[package]] name = "fontconfig-parser" version = "0.5.7" @@ -998,7 +966,7 @@ checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" dependencies = [ "displaydoc", "serde", - "yoke 0.7.5", + "yoke", "zerofrom", "zerovec", ] @@ -1096,7 +1064,7 @@ dependencies = [ "stable_deref_trait", "tinystr", "writeable", - "yoke 0.7.5", + "yoke", "zerofrom", "zerovec", ] @@ -1342,38 +1310,6 @@ dependencies = [ "libc", ] -[[package]] -name = "krilla" -version = "0.3.0" -source = "git+https://github.com/LaurenzV/krilla?rev=e7006f2#e7006f2f0ba598bbe426e8d63306fb2e007c4988" -dependencies = [ - "base64", - "bumpalo", - "comemo", - "flate2", - "float-cmp 0.10.0", - "fontdb", - "gif", - "image-webp", - "imagesize", - "miniz_oxide", - "once_cell", - "pdf-writer", - "rayon", - "resvg", - "rustybuzz", - "siphasher", - "skrifa", - "subsetter", - "tiny-skia", - "tiny-skia-path", - "usvg", - "xmp-writer", - "yoke 0.8.0", - "zune-jpeg", - "zune-png", -] - [[package]] name = "kurbo" version = "0.11.1" @@ -1802,8 +1738,9 @@ checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3" [[package]] name = "pdf-writer" -version = "0.12.0" -source = "git+https://github.com/LaurenzV/pdf-writer?rev=f95a19c#f95a19c07a1b3e3ee021c1199e91f19badb57d46" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5df03c7d216de06f93f398ef06f1385a60f2c597bb96f8195c8d98e08a26b1d5" dependencies = [ "bitflags 2.8.0", "itoa", @@ -2060,16 +1997,6 @@ dependencies = [ "crossbeam-utils", ] -[[package]] -name = "read-fonts" -version = "0.27.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f004ee5c610b8beb5f33273246893ac6258ec22185a6eb8ee132bccdb904cdaa" -dependencies = [ - "bytemuck", - "font-types", -] - [[package]] name = "redox_syscall" version = "0.5.8" @@ -2388,16 +2315,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" -[[package]] -name = "skrifa" -version = "0.28.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16e7936ca3627fdb516e97aca3c8ab5103f94ae32fe5ce80a0a02edcbacb7b53" -dependencies = [ - "bytemuck", - "read-fonts", -] - [[package]] name = "slotmap" version = "1.0.7" @@ -2444,7 +2361,7 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6637bab7722d379c8b41ba849228d680cc12d0a45ba1fa2b48f2a30577a06731" dependencies = [ - "float-cmp 0.9.0", + "float-cmp", ] [[package]] @@ -2488,7 +2405,28 @@ dependencies = [ [[package]] name = "subsetter" version = "0.2.0" -source = "git+https://github.com/typst/subsetter?rev=172416a#172416a806246e6e9010d400d5690ca7a026e53d" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74f98178f34057d4d4de93d68104007c6dea4dfac930204a69ab4622daefa648" + +[[package]] +name = "svg2pdf" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e50dc062439cc1a396181059c80932a6e6bd731b130e674c597c0c8874b6df22" +dependencies = [ + "fontdb", + "image", + "log", + "miniz_oxide", + "once_cell", + "pdf-writer", + "resvg", + "siphasher", + "subsetter", + "tiny-skia", + "ttf-parser", + "usvg", +] [[package]] name = "svgtypes" @@ -3079,17 +3017,26 @@ dependencies = [ name = "typst-pdf" version = "0.13.1" dependencies = [ + "arrayvec", + "base64", "bytemuck", "comemo", "ecow", "image", - "krilla", + "indexmap 2.7.1", + "miniz_oxide", + "pdf-writer", + "serde", + "subsetter", + "svg2pdf", + "ttf-parser", "typst-assets", "typst-library", "typst-macros", "typst-syntax", "typst-timing", "typst-utils", + "xmp-writer", ] [[package]] @@ -3714,7 +3661,8 @@ checksum = "ec7a2a501ed189703dba8b08142f057e887dfc4b2cc4db2d343ac6376ba3e0b9" [[package]] name = "xmp-writer" version = "0.3.1" -source = "git+https://github.com/LaurenzV/xmp-writer?rev=a1cbb887#a1cbb887a84376fea4d7590d41c194a332840549" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7eb5954c9ca6dcc869e98d3e42760ed9dab08f3e70212b31d7ab8ae7f3b7a487" [[package]] name = "xz2" @@ -3752,19 +3700,7 @@ checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" dependencies = [ "serde", "stable_deref_trait", - "yoke-derive 0.7.5", - "zerofrom", -] - -[[package]] -name = "yoke" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f41bb01b8226ef4bfd589436a297c53d118f65921786300e427be8d487695cc" -dependencies = [ - "serde", - "stable_deref_trait", - "yoke-derive 0.8.0", + "yoke-derive", "zerofrom", ] @@ -3780,18 +3716,6 @@ dependencies = [ "synstructure", ] -[[package]] -name = "yoke-derive" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "synstructure", -] - [[package]] name = "zerocopy" version = "0.7.35" @@ -3853,7 +3777,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" dependencies = [ "serde", - "yoke 0.7.5", + "yoke", "zerofrom", "zerovec-derive", ] @@ -3906,15 +3830,6 @@ version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f423a2c17029964870cfaabb1f13dfab7d092a62a29a89264f4d36990ca414a" -[[package]] -name = "zune-inflate" -version = "0.2.54" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73ab332fe2f6680068f3582b16a24f90ad7096d5d39b974d1c0aff0125116f02" -dependencies = [ - "simd-adler32", -] - [[package]] name = "zune-jpeg" version = "0.4.14" @@ -3923,13 +3838,3 @@ checksum = "99a5bab8d7dedf81405c4bb1f2b83ea057643d9cb28778cea9eecddeedd2e028" dependencies = [ "zune-core", ] - -[[package]] -name = "zune-png" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d29c085769c6f29effea890f093120ac019375fdc789d2a496ba8ba96c77509" -dependencies = [ - "zune-core", - "zune-inflate", -] diff --git a/Cargo.toml b/Cargo.toml index 5f0dfcd8f..03e21adb4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -87,7 +87,7 @@ parking_lot = "0.12.1" pathdiff = "0.2" pdf-writer = "0.12.1" phf = { version = "0.11", features = ["macros"] } -pixglyph = "0.6.0" +pixglyph = "0.6" png = "0.17" portable-atomic = "1.6" proc-macro2 = "1" @@ -97,10 +97,10 @@ quote = "1" rayon = "1.7.0" regex = "1" regex-syntax = "0.8" -resvg = { version = "0.45.0", default-features = false, features = ["raster-images"] } +resvg = { version = "0.45", default-features = false, features = ["raster-images"] } roxmltree = "0.20" rust_decimal = { version = "1.36.0", default-features = false, features = ["maths"] } -rustybuzz = "0.20.1" +rustybuzz = "0.20" same-file = "1" self-replace = "1.3.7" semver = "1" @@ -113,7 +113,6 @@ siphasher = "1" smallvec = { version = "1.11.1", features = ["union", "const_generics", "const_new"] } stacker = "0.1.15" subsetter = "0.2" -svg2pdf = "0.12" syn = { version = "2", features = ["full", "extra-traits"] } syntect = { version = "5", default-features = false, features = ["parsing", "regex-fancy", "plist-load", "yaml-load"] } tar = "0.4" @@ -123,7 +122,7 @@ time = { version = "0.3.20", features = ["formatting", "macros", "parsing"] } tiny_http = "0.12" tiny-skia = "0.11" toml = { version = "0.8", default-features = false, features = ["parse", "display"] } -ttf-parser = "0.25.1" +ttf-parser = "0.25.0" two-face = { version = "0.4.3", default-features = false, features = ["syntect-fancy"] } typed-arena = "2" unicode-bidi = "0.3.18" @@ -134,7 +133,7 @@ unicode-normalization = "0.1.24" unicode-segmentation = "1" unscanny = "0.1" ureq = { version = "2", default-features = false, features = ["native-tls", "gzip", "json"] } -usvg = { version = "0.45.0", default-features = false, features = ["text"] } +usvg = { version = "0.45", default-features = false, features = ["text"] } walkdir = "2" wasmi = "0.40.0" web-sys = "0.3" diff --git a/crates/typst-library/src/foundations/func.rs b/crates/typst-library/src/foundations/func.rs index 66c6b70a5..27eb34eac 100644 --- a/crates/typst-library/src/foundations/func.rs +++ b/crates/typst-library/src/foundations/func.rs @@ -112,7 +112,7 @@ use crate::foundations::{ /// it into another file by writing `{import "foo.typ": alert}`. /// /// # Unnamed functions { #unnamed } -/// You can also created an unnamed function without creating a binding by +/// You can also create an unnamed function without creating a binding by /// specifying a parameter list followed by `=>` and the function body. If your /// function has just one parameter, the parentheses around the parameter list /// are optional. Unnamed functions are mainly useful for show rules, but also