diff --git a/Cargo.lock b/Cargo.lock index e2379eed2..6e1b3ba94 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -918,6 +918,15 @@ dependencies = [ "libc", ] +[[package]] +name = "core_maths" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3b02505ccb8c50b0aa21ace0fc08c3e53adebd4e58caa18a36152803c7709a3" +dependencies = [ + "libm", +] + [[package]] name = "cpufeatures" version = "0.2.12" @@ -1319,6 +1328,20 @@ dependencies = [ "ttf-parser 0.21.1", ] +[[package]] +name = "fontdb" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37be9fc20d966be438cd57a45767f73349477fb0f85ce86e000557f787298afb" +dependencies = [ + "fontconfig-parser", + "log", + "memmap2", + "slotmap", + "tinyvec", + "ttf-parser 0.24.1", +] + [[package]] name = "fontique" version = "0.1.0" @@ -1842,7 +1865,6 @@ dependencies = [ "gosub_shared", "resvg", "tiny-skia", - "usvg", ] [[package]] @@ -2373,6 +2395,12 @@ version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "029d73f573d8e8d63e6d5020011d3255b28c3ba85d6cf870a07184ed23de9284" +[[package]] +name = "imagesize" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edcd27d72f2f071c64249075f42e205ff93c9a4c5f6c6da53e79ed9f9832c285" + [[package]] name = "imgref" version = "1.10.1" @@ -3305,7 +3333,7 @@ version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "490d3a563d3122bf7c911a59b0add9389e5ec0f5f0c3ac6b91ff235a0e6a7f90" dependencies = [ - "ttf-parser 0.24.0", + "ttf-parser 0.24.1", ] [[package]] @@ -3876,18 +3904,19 @@ dependencies = [ [[package]] name = "resvg" -version = "0.42.0" +version = "0.43.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "944d052815156ac8fa77eaac055220e95ba0b01fa8887108ca710c03805d9051" +checksum = "c7314563c59c7ce31c18e23ad3dd092c37b928a0fa4e1c0a1a6504351ab411d1" dependencies = [ "gif", - "jpeg-decoder", + "image-webp", "log", "pico-args", "rgb", "svgtypes", "tiny-skia", - "usvg", + "usvg 0.43.0", + "zune-jpeg", ] [[package]] @@ -4016,8 +4045,26 @@ dependencies = [ "bytemuck", "smallvec", "ttf-parser 0.21.1", - "unicode-bidi-mirroring", - "unicode-ccc", + "unicode-bidi-mirroring 0.2.0", + "unicode-ccc 0.2.0", + "unicode-properties", + "unicode-script", +] + +[[package]] +name = "rustybuzz" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c85d1ccd519e61834798eb52c4e886e8c2d7d698dd3d6ce0b1b47eb8557f1181" +dependencies = [ + "bitflags 2.6.0", + "bytemuck", + "core_maths", + "log", + "smallvec", + "ttf-parser 0.24.1", + "unicode-bidi-mirroring 0.3.0", + "unicode-ccc 0.3.0", "unicode-properties", "unicode-script", ] @@ -4703,9 +4750,12 @@ checksum = "2c591d83f69777866b9126b24c6dd9a18351f177e49d625920d19f989fd31cf8" [[package]] name = "ttf-parser" -version = "0.24.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8686b91785aff82828ed725225925b33b4fde44c4bb15876e5f7c832724c420a" +checksum = "5be21190ff5d38e8b4a2d3b6a3ae57f612cc39c96e83cedeaf7abc338a8bac4a" +dependencies = [ + "core_maths", +] [[package]] name = "typenum" @@ -4731,6 +4781,12 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23cb788ffebc92c5948d0e997106233eeb1d8b9512f93f41651f52b6c5f5af86" +[[package]] +name = "unicode-bidi-mirroring" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64af057ad7466495ca113126be61838d8af947f41d93a949980b2389a118082f" + [[package]] name = "unicode-canonical-combining-class" version = "0.5.0" @@ -4743,6 +4799,12 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1df77b101bcc4ea3d78dafc5ad7e4f58ceffe0b2b16bf446aeb50b6cb4157656" +[[package]] +name = "unicode-ccc" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "260bc6647b3893a9a90668360803a15f96b85a5257b1c3a0c3daf6ae2496de42" + [[package]] name = "unicode-general-category" version = "0.6.0" @@ -4858,13 +4920,40 @@ dependencies = [ "base64", "data-url", "flate2", - "fontdb", - "imagesize", + "fontdb 0.18.0", + "imagesize 0.12.0", + "kurbo", + "log", + "pico-args", + "roxmltree 0.20.0", + "rustybuzz 0.14.1", + "simplecss", + "siphasher 1.0.1", + "strict-num", + "svgtypes", + "tiny-skia-path", + "unicode-bidi", + "unicode-script", + "unicode-vo", + "xmlwriter", +] + +[[package]] +name = "usvg" +version = "0.43.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6803057b5cbb426e9fb8ce2216f3a9b4ca1dd2c705ba3cbebc13006e437735fd" +dependencies = [ + "base64", + "data-url", + "flate2", + "fontdb 0.21.0", + "imagesize 0.13.0", "kurbo", "log", "pico-args", "roxmltree 0.20.0", - "rustybuzz", + "rustybuzz 0.18.0", "simplecss", "siphasher 1.0.1", "strict-num", @@ -5012,7 +5101,7 @@ checksum = "fe5b606f733291749051e27fcc3420d36d1e39af481911d7e7b769a9b6a33709" dependencies = [ "image", "thiserror", - "usvg", + "usvg 0.42.0", "vello 0.2.1", ] diff --git a/crates/gosub_svg/Cargo.toml b/crates/gosub_svg/Cargo.toml index 502331c69..d79d35d8a 100644 --- a/crates/gosub_svg/Cargo.toml +++ b/crates/gosub_svg/Cargo.toml @@ -5,11 +5,10 @@ edition = "2021" [dependencies] tiny-skia = "0.11.4" -usvg = { version = "0.42.0", default-features = false, features = [] } gosub_shared = { path = "../gosub_shared" } gosub_html5 = { path = "../gosub_html5" } gosub_render_backend = { path = "../gosub_render_backend" } -resvg = { version = "0.42.0", optional = true } +resvg = { version = "0.43.0", optional = true } anyhow = "1.0.87" diff --git a/crates/gosub_svg/src/lib.rs b/crates/gosub_svg/src/lib.rs index 1a9c46f60..33b9f2fe9 100644 --- a/crates/gosub_svg/src/lib.rs +++ b/crates/gosub_svg/src/lib.rs @@ -1,3 +1,5 @@ +use ::resvg::usvg; + use gosub_html5::{node::NodeId, parser::document::DocumentHandle}; use gosub_shared::types::Result;