mirror of
https://github.com/typst/typst
synced 2025-05-14 04:56:26 +08:00
Bump svg2pdf and related crates (#2992)
This commit is contained in:
parent
47bb32809a
commit
2f2dd17938
71
Cargo.lock
generated
71
Cargo.lock
generated
@ -705,14 +705,14 @@ version = "0.5.3"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "674e258f4b5d2dcd63888c01c68413c51f565e8af99d2f7701c7b81d79ef41c4"
|
checksum = "674e258f4b5d2dcd63888c01c68413c51f565e8af99d2f7701c7b81d79ef41c4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"roxmltree",
|
"roxmltree 0.18.1",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "fontdb"
|
name = "fontdb"
|
||||||
version = "0.15.0"
|
version = "0.16.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "020e203f177c0fb250fb19455a252e838d2bbbce1f80f25ecc42402aafa8cd38"
|
checksum = "98b88c54a38407f7352dd2c4238830115a6377741098ffd1f997c813d0e088a6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"fontconfig-parser",
|
"fontconfig-parser",
|
||||||
"log",
|
"log",
|
||||||
@ -1371,9 +1371,9 @@ checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "memmap2"
|
name = "memmap2"
|
||||||
version = "0.8.0"
|
version = "0.9.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "43a5a03cefb0d953ec0be133036f14e109412fa594edc2f77227249db66cc3ed"
|
checksum = "39a69c7c189ae418f83003da62820aca28d15a07725ce51fb924999335d622ff"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libc",
|
"libc",
|
||||||
]
|
]
|
||||||
@ -1671,9 +1671,9 @@ checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pixglyph"
|
name = "pixglyph"
|
||||||
version = "0.2.0"
|
version = "0.3.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f67591f21f6668e63c1cd85adab066ac8a92bc7b962668dd8042197a6e4b8f8f"
|
checksum = "e2e0f8ad4c197db38125b880c3c44544788665c7d5f4c42f5a35da44bca1a712"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ttf-parser",
|
"ttf-parser",
|
||||||
]
|
]
|
||||||
@ -1923,9 +1923,9 @@ checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "resvg"
|
name = "resvg"
|
||||||
version = "0.36.0"
|
version = "0.37.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "cc7980f653f9a7db31acff916a262c3b78c562919263edea29bf41a056e20497"
|
checksum = "cadccb3d99a9efb8e5e00c16fbb732cbe400db2ec7fc004697ee7d97d86cf1f4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"gif",
|
"gif",
|
||||||
"jpeg-decoder",
|
"jpeg-decoder",
|
||||||
@ -1976,6 +1976,12 @@ dependencies = [
|
|||||||
"xmlparser",
|
"xmlparser",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "roxmltree"
|
||||||
|
version = "0.19.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "3cd14fd5e3b777a7422cca79358c57a8f6e3a703d9ac187448d0daf220c2407f"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustc-hash"
|
name = "rustc-hash"
|
||||||
version = "1.1.0"
|
version = "1.1.0"
|
||||||
@ -2043,11 +2049,11 @@ checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustybuzz"
|
name = "rustybuzz"
|
||||||
version = "0.10.0"
|
version = "0.12.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "71cd15fef9112a1f94ac64b58d1e4628192631ad6af4dc69997f995459c874e7"
|
checksum = "f0ae5692c5beaad6a9e22830deeed7874eae8a4e3ba4076fb48e12c56856222c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 1.3.2",
|
"bitflags 2.4.1",
|
||||||
"bytemuck",
|
"bytemuck",
|
||||||
"smallvec",
|
"smallvec",
|
||||||
"ttf-parser",
|
"ttf-parser",
|
||||||
@ -2304,8 +2310,7 @@ checksum = "09eab8a83bff89ba2200bd4c59be45c7c787f988431b936099a5a266c957f2f9"
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "svg2pdf"
|
name = "svg2pdf"
|
||||||
version = "0.9.1"
|
version = "0.9.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "git+https://github.com/typst/svg2pdf?rev=11f34c7#11f34c7f407d504c49db19e4e2b521fce4c8622f"
|
||||||
checksum = "a81da66842e426278f20062cd249779565e13f9ab4bfe0ac9e94eb476bc3a0f3"
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"image",
|
"image",
|
||||||
"miniz_oxide",
|
"miniz_oxide",
|
||||||
@ -2316,9 +2321,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "svgtypes"
|
name = "svgtypes"
|
||||||
version = "0.12.0"
|
version = "0.13.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d71499ff2d42f59d26edb21369a308ede691421f79ebc0f001e2b1fd3a7c9e52"
|
checksum = "6e44e288cd960318917cbd540340968b90becc8bc81f171345d706e7a89d9d70"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"kurbo",
|
"kurbo",
|
||||||
"siphasher 0.3.11",
|
"siphasher 0.3.11",
|
||||||
@ -2477,9 +2482,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tiny-skia"
|
name = "tiny-skia"
|
||||||
version = "0.11.2"
|
version = "0.11.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "3b72a92a05db376db09fe6d50b7948d106011761c05a6a45e23e17ee9b556222"
|
checksum = "b6a067b809476893fce6a254cf285850ff69c847e6cfbade6a20b655b6c7e80d"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrayref",
|
"arrayref",
|
||||||
"arrayvec",
|
"arrayvec",
|
||||||
@ -2492,9 +2497,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tiny-skia-path"
|
name = "tiny-skia-path"
|
||||||
version = "0.11.2"
|
version = "0.11.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "6ac3865b9708fc7e1961a65c3a4fa55e984272f33092d3c859929f887fceb647"
|
checksum = "5de35e8a90052baaaf61f171680ac2f8e925a1e43ea9d2e3a00514772250e541"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrayref",
|
"arrayref",
|
||||||
"bytemuck",
|
"bytemuck",
|
||||||
@ -2641,9 +2646,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ttf-parser"
|
name = "ttf-parser"
|
||||||
version = "0.19.2"
|
version = "0.20.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "49d64318d8311fc2668e48b63969f4343e0a85c4a109aa8460d6672e364b8bd1"
|
checksum = "17f77d76d837a7830fe1d4f12b7b4ba4192c1888001c7164257e4bc6d21d96b4"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "two-face"
|
name = "two-face"
|
||||||
@ -2690,7 +2695,7 @@ dependencies = [
|
|||||||
"palette",
|
"palette",
|
||||||
"rayon",
|
"rayon",
|
||||||
"regex",
|
"regex",
|
||||||
"roxmltree",
|
"roxmltree 0.19.0",
|
||||||
"rustybuzz",
|
"rustybuzz",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
@ -2847,7 +2852,7 @@ dependencies = [
|
|||||||
"image",
|
"image",
|
||||||
"pixglyph",
|
"pixglyph",
|
||||||
"resvg",
|
"resvg",
|
||||||
"roxmltree",
|
"roxmltree 0.19.0",
|
||||||
"tiny-skia",
|
"tiny-skia",
|
||||||
"ttf-parser",
|
"ttf-parser",
|
||||||
"typst",
|
"typst",
|
||||||
@ -3082,9 +3087,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "usvg"
|
name = "usvg"
|
||||||
version = "0.36.0"
|
version = "0.37.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c51daa774fe9ee5efcf7b4fec13019b8119cda764d9a8b5b06df02bb1445c656"
|
checksum = "38b0a51b72ab80ca511d126b77feeeb4fb1e972764653e61feac30adc161a756"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base64",
|
"base64",
|
||||||
"log",
|
"log",
|
||||||
@ -3097,16 +3102,16 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "usvg-parser"
|
name = "usvg-parser"
|
||||||
version = "0.36.0"
|
version = "0.37.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "45c88a5ffaa338f0e978ecf3d4e00d8f9f493e29bed0752e1a808a1db16afc40"
|
checksum = "9bd4e3c291f45d152929a31f0f6c819245e2921bfd01e7bd91201a9af39a2bdc"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"data-url",
|
"data-url",
|
||||||
"flate2",
|
"flate2",
|
||||||
"imagesize",
|
"imagesize",
|
||||||
"kurbo",
|
"kurbo",
|
||||||
"log",
|
"log",
|
||||||
"roxmltree",
|
"roxmltree 0.19.0",
|
||||||
"simplecss",
|
"simplecss",
|
||||||
"siphasher 0.3.11",
|
"siphasher 0.3.11",
|
||||||
"svgtypes",
|
"svgtypes",
|
||||||
@ -3115,9 +3120,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "usvg-text-layout"
|
name = "usvg-text-layout"
|
||||||
version = "0.36.0"
|
version = "0.37.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4d2374378cb7a3fb8f33894e0fdb8625e1bbc4f25312db8d91f862130b541593"
|
checksum = "d383a3965de199d7f96d4e11a44dd859f46e86de7f3dca9a39bf82605da0a37c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"fontdb",
|
"fontdb",
|
||||||
"kurbo",
|
"kurbo",
|
||||||
@ -3131,9 +3136,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "usvg-tree"
|
name = "usvg-tree"
|
||||||
version = "0.36.0"
|
version = "0.37.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "6cacb0c5edeaf3e80e5afcf5b0d4004cc1d36318befc9a7c6606507e5d0f4062"
|
checksum = "8ee3d202ebdb97a6215604b8f5b4d6ef9024efd623cf2e373a6416ba976ec7d3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"rctree",
|
"rctree",
|
||||||
"strict-num",
|
"strict-num",
|
||||||
|
16
Cargo.toml
16
Cargo.toml
@ -42,7 +42,7 @@ dirs = "5"
|
|||||||
ecow = { version = "0.2", features = ["serde"] }
|
ecow = { version = "0.2", features = ["serde"] }
|
||||||
env_proxy = "0.4"
|
env_proxy = "0.4"
|
||||||
flate2 = "1"
|
flate2 = "1"
|
||||||
fontdb = { version = "0.15", default-features = false }
|
fontdb = { version = "0.16", default-features = false }
|
||||||
hayagriva = "0.5.1"
|
hayagriva = "0.5.1"
|
||||||
heck = "0.4"
|
heck = "0.4"
|
||||||
hypher = "0.1.4"
|
hypher = "0.1.4"
|
||||||
@ -70,17 +70,17 @@ palette = { version = "0.7.3", default-features = false, features = ["approx", "
|
|||||||
parking_lot = "0.12.1"
|
parking_lot = "0.12.1"
|
||||||
pathdiff = "0.2"
|
pathdiff = "0.2"
|
||||||
pdf-writer = "0.9.2"
|
pdf-writer = "0.9.2"
|
||||||
pixglyph = "0.2"
|
pixglyph = "0.3"
|
||||||
proc-macro2 = "1"
|
proc-macro2 = "1"
|
||||||
pulldown-cmark = "0.9"
|
pulldown-cmark = "0.9"
|
||||||
quote = "1"
|
quote = "1"
|
||||||
rayon = "1.7.0"
|
rayon = "1.7.0"
|
||||||
regex = "1"
|
regex = "1"
|
||||||
resvg = { version = "0.36.0", default-features = false, features = ["raster-images"] }
|
resvg = { version = "0.37.0", default-features = false, features = ["raster-images"] }
|
||||||
roxmltree = "0.18"
|
roxmltree = "0.19"
|
||||||
rustls = "0.21"
|
rustls = "0.21"
|
||||||
rustls-pemfile = "1"
|
rustls-pemfile = "1"
|
||||||
rustybuzz = "0.10"
|
rustybuzz = "0.12.1"
|
||||||
same-file = "1"
|
same-file = "1"
|
||||||
self-replace = "1.3.7"
|
self-replace = "1.3.7"
|
||||||
semver = "1"
|
semver = "1"
|
||||||
@ -91,7 +91,7 @@ siphasher = "1"
|
|||||||
smallvec = { version = "1.11.1", features = ["union", "const_generics", "const_new"] }
|
smallvec = { version = "1.11.1", features = ["union", "const_generics", "const_new"] }
|
||||||
stacker = "0.1.15"
|
stacker = "0.1.15"
|
||||||
subsetter = "0.1.1"
|
subsetter = "0.1.1"
|
||||||
svg2pdf = "0.9.1"
|
svg2pdf = { git = "https://github.com/typst/svg2pdf", rev = "11f34c7" }
|
||||||
syn = { version = "2", features = ["full", "extra-traits"] }
|
syn = { version = "2", features = ["full", "extra-traits"] }
|
||||||
syntect = { version = "5", default-features = false, features = ["parsing", "regex-fancy", "plist-load", "yaml-load"] }
|
syntect = { version = "5", default-features = false, features = ["parsing", "regex-fancy", "plist-load", "yaml-load"] }
|
||||||
tar = "0.4"
|
tar = "0.4"
|
||||||
@ -103,7 +103,7 @@ tracing = "0.1.37"
|
|||||||
tracing-error = "0.2"
|
tracing-error = "0.2"
|
||||||
tracing-flame = "0.2.0"
|
tracing-flame = "0.2.0"
|
||||||
tracing-subscriber = "0.3.17"
|
tracing-subscriber = "0.3.17"
|
||||||
ttf-parser = "0.19.2"
|
ttf-parser = "0.20.0"
|
||||||
two-face = { version = "0.3.0", default-features = false, features = ["syntect-fancy"] }
|
two-face = { version = "0.3.0", default-features = false, features = ["syntect-fancy"] }
|
||||||
typed-arena = "2"
|
typed-arena = "2"
|
||||||
unicode_names2 = "1.2"
|
unicode_names2 = "1.2"
|
||||||
@ -115,7 +115,7 @@ unicode-script = "0.5"
|
|||||||
unicode-segmentation = "1"
|
unicode-segmentation = "1"
|
||||||
unscanny = "0.1"
|
unscanny = "0.1"
|
||||||
ureq = "2"
|
ureq = "2"
|
||||||
usvg = { version = "0.36", default-features = false, features = ["text"] }
|
usvg = { version = "0.37", default-features = false, features = ["text"] }
|
||||||
walkdir = "2"
|
walkdir = "2"
|
||||||
wasmi = "0.31.0"
|
wasmi = "0.31.0"
|
||||||
xmlparser = "0.13.5"
|
xmlparser = "0.13.5"
|
||||||
|
@ -254,7 +254,7 @@ fn render_svg_glyph(
|
|||||||
id: GlyphId,
|
id: GlyphId,
|
||||||
) -> Option<()> {
|
) -> Option<()> {
|
||||||
let ts = &state.transform;
|
let ts = &state.transform;
|
||||||
let mut data = text.font.ttf().glyph_svg_image(id)?;
|
let mut data = text.font.ttf().glyph_svg_image(id)?.data;
|
||||||
|
|
||||||
// Decompress SVGZ.
|
// Decompress SVGZ.
|
||||||
let mut decoded = vec![];
|
let mut decoded = vec![];
|
||||||
|
@ -1108,7 +1108,7 @@ fn convert_bitmap_glyph_to_image(font: &Font, id: GlyphId) -> Option<(Image, f64
|
|||||||
/// Convert an SVG glyph to an encoded image URL.
|
/// Convert an SVG glyph to an encoded image URL.
|
||||||
#[comemo::memoize]
|
#[comemo::memoize]
|
||||||
fn convert_svg_glyph_to_base64_url(font: &Font, id: GlyphId) -> Option<EcoString> {
|
fn convert_svg_glyph_to_base64_url(font: &Font, id: GlyphId) -> Option<EcoString> {
|
||||||
let mut data = font.ttf().glyph_svg_image(id)?;
|
let mut data = font.ttf().glyph_svg_image(id)?.data;
|
||||||
|
|
||||||
// Decompress SVGZ.
|
// Decompress SVGZ.
|
||||||
let mut decoded = vec![];
|
let mut decoded = vec![];
|
||||||
|
@ -479,7 +479,7 @@ impl From<PackageError> for EcoString {
|
|||||||
/// Format a user-facing error message for an XML-like file format.
|
/// Format a user-facing error message for an XML-like file format.
|
||||||
pub fn format_xml_like_error(format: &str, error: roxmltree::Error) -> EcoString {
|
pub fn format_xml_like_error(format: &str, error: roxmltree::Error) -> EcoString {
|
||||||
match error {
|
match error {
|
||||||
roxmltree::Error::UnexpectedCloseTag { expected, actual, pos } => {
|
roxmltree::Error::UnexpectedCloseTag(expected, actual, pos) => {
|
||||||
eco_format!(
|
eco_format!(
|
||||||
"failed to parse {format} (found closing tag '{actual}' \
|
"failed to parse {format} (found closing tag '{actual}' \
|
||||||
instead of '{expected}' in line {})",
|
instead of '{expected}' in line {})",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user