diff --git a/Cargo.lock b/Cargo.lock index 36f97cfb..982d8ddb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -25,7 +25,7 @@ version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" dependencies = [ - "getrandom 0.2.16", + "getrandom 0.2.17", "once_cell", "version_check", ] @@ -125,7 +125,7 @@ version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" dependencies = [ - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -136,7 +136,7 @@ checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" dependencies = [ "anstyle", "once_cell_polyfill", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -326,7 +326,7 @@ checksum = "fe2ef6f9d2f3579dc90b7f28c9f91c42daa4ea6c04225ad9336446f9ec45a363" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -356,12 +356,6 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" -[[package]] -name = "beef" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a8241f3ebb85c056b509d4327ad0358fbbba6ffb340bf388f26350aeda225b1" - [[package]] name = "bincode" version = "1.3.3" @@ -418,7 +412,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -467,9 +461,9 @@ checksum = "175812e0be2bccb6abe50bb8d566126198344f707e304f45c648fd8f2cc0365e" [[package]] name = "bytemuck" -version = "1.24.0" +version = "1.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fbdf580320f38b612e485521afda1ee26d10cc9884efaaa750d383e13e3c5f4" +checksum = "c8efb64bd706a16a1bdde310ae86b351e4d21550d98d056f22f8a7f7a2183fec" dependencies = [ "bytemuck_derive", ] @@ -482,7 +476,7 @@ checksum = "f9abbd1bc6865053c427f7198e6af43bfdedc55ab791faed4fbd361d789575ff" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -493,9 +487,9 @@ checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" [[package]] name = "bytes" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3" +checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" [[package]] name = "bzip2" @@ -517,25 +511,26 @@ dependencies = [ [[package]] name = "cargo-platform" -version = "0.1.9" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e35af189006b9c0f00a064685c727031e3ed2d8020f7ba284d78cc2671bd36ea" +checksum = "87a0c0e6148f11f01f32650a2ea02d532b2ad4e81d8bd41e6e565b5adc5e6082" dependencies = [ "serde", + "serde_core", ] [[package]] name = "cargo_metadata" -version = "0.19.2" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd5eb614ed4c27c5d706420e4320fbe3216ab31fa1c33cd8246ac36dae4479ba" +checksum = "ef987d17b0a113becdd19d3d0022d04d7ef41f9efe4f3fb63ac44ba61df3ade9" dependencies = [ "camino", "cargo-platform", "semver", "serde", "serde_json", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -546,9 +541,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.2.49" +version = "1.2.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90583009037521a116abf44494efecd645ba48b6622457080f080b85544e2215" +checksum = "47b26a0954ae34af09b50f0de26458fa95369a0d478d8236d3f93082b219bd29" dependencies = [ "find-msvc-tools", "jobserver", @@ -594,9 +589,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.56" +version = "4.5.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75ca66430e33a14957acc24c5077b503e7d374151b2b4b3a10c83b4ceb4be0e" +checksum = "6899ea499e3fb9305a65d5ebf6e3d2248c5fab291f300ad0a704fbe142eae31a" dependencies = [ "clap_builder", "clap_derive", @@ -604,9 +599,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.56" +version = "4.5.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793207c7fa6300a0608d1080b858e5fdbe713cdc1c8db9fb17777d8a13e63df0" +checksum = "7b12c8b680195a62a8364d16b8447b01b6c2c8f9aaf68bee653be34d4245e238" dependencies = [ "anstream", "anstyle", @@ -623,14 +618,14 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] name = "clap_lex" -version = "0.7.6" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d" +checksum = "c3e64b0cc0439b12df2fa678eae89a1c56a529fd067a9115f7827f1fffd22b32" [[package]] name = "close_already" @@ -713,7 +708,7 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" dependencies = [ - "getrandom 0.2.16", + "getrandom 0.2.17", "once_cell", "tiny-keccak", ] @@ -822,9 +817,9 @@ dependencies = [ [[package]] name = "crokey" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51360853ebbeb3df20c76c82aecf43d387a62860f1a59ba65ab51f00eea85aad" +checksum = "04a63daf06a168535c74ab97cdba3ed4fa5d4f32cb36e437dcceb83d66854b7c" dependencies = [ "crokey-proc_macros", "crossterm", @@ -835,15 +830,15 @@ dependencies = [ [[package]] name = "crokey-proc_macros" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bf1a727caeb5ee5e0a0826a97f205a9cf84ee964b0b48239fef5214a00ae439" +checksum = "847f11a14855fc490bd5d059821895c53e77eeb3c2b73ee3dded7ce77c93b231" dependencies = [ "crossterm", "proc-macro2", "quote", "strict", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -914,7 +909,7 @@ dependencies = [ "document-features", "mio", "parking_lot", - "rustix 1.1.2", + "rustix 1.1.3", "signal-hook", "signal-hook-mio", "winapi", @@ -965,7 +960,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" dependencies = [ "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -999,6 +994,16 @@ dependencies = [ "darling_macro 0.20.11", ] +[[package]] +name = "darling" +version = "0.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cdf337090841a411e2a7f3deb9187445851f91b309c0c0a29e05f74a00a48c0" +dependencies = [ + "darling_core 0.21.3", + "darling_macro 0.21.3", +] + [[package]] name = "darling" version = "0.23.0" @@ -1020,7 +1025,21 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.111", + "syn 2.0.114", +] + +[[package]] +name = "darling_core" +version = "0.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1247195ecd7e3c85f83c8d2a366e4210d588e802133e1e355180a9870b517ea4" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.114", ] [[package]] @@ -1033,7 +1052,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -1044,7 +1063,18 @@ checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" dependencies = [ "darling_core 0.20.11", "quote", - "syn 2.0.111", + "syn 2.0.114", +] + +[[package]] +name = "darling_macro" +version = "0.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81" +dependencies = [ + "darling_core 0.21.3", + "quote", + "syn 2.0.114", ] [[package]] @@ -1055,7 +1085,7 @@ checksum = "ac3984ec7bd6cfa798e62b4a642426a5be0e68f9401cfc2a01e3fa9ea2fcdb8d" dependencies = [ "darling_core 0.23.0", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -1071,6 +1101,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ececcb659e7ba858fb4f10388c250a7252eb0a27373f1a72b8748afdd248e587" dependencies = [ "powerfmt", + "serde_core", ] [[package]] @@ -1081,7 +1112,7 @@ checksum = "1e567bd82dcff979e4b03460c307b3cdc9e96fde3d73bed1496d2bc75d9dd62a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -1102,7 +1133,7 @@ dependencies = [ "darling 0.20.11", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -1112,29 +1143,29 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" dependencies = [ "derive_builder_core", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] name = "derive_more" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10b768e943bed7bf2cab53df09f4bc34bfd217cdb57d971e769874c9a6710618" +checksum = "d751e9e49156b02b44f9c1815bcb94b984cdcc4396ecc32521c739452808b134" dependencies = [ "derive_more-impl", ] [[package]] name = "derive_more-impl" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d286bfdaf75e988b4a78e013ecd79c581e06399ab53fbacd2d916c2f904f30b" +checksum = "799a97264921d8623a957f6c3b9011f3b5492f557bbb7a5a19b7fa6d06ba8dcb" dependencies = [ "convert_case", "proc-macro2", "quote", "rustc_version", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -1156,7 +1187,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -1170,9 +1201,9 @@ dependencies = [ [[package]] name = "dtoa" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6add3b8cff394282be81f3fc1a0605db594ed69890078ca6e2cab1c408bcf04" +checksum = "4c3cf4824e2d5f025c7b531afcb2325364084a16806f6d47fbc1f5fbd9960590" [[package]] name = "dtoa-short" @@ -1185,9 +1216,9 @@ dependencies = [ [[package]] name = "duckdb" -version = "1.4.2" +version = "1.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e46d5568337ee1f7ea8779e1d9aa2eafcdf156458713ce65afb246c5d2cf5850" +checksum = "8685352ce688883098b61a361e86e87df66fc8c444f4a2411e884c16d5243a65" dependencies = [ "arrow", "cast", @@ -1200,6 +1231,12 @@ dependencies = [ "strum 0.27.2", ] +[[package]] +name = "dyn-clone" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" + [[package]] name = "ego-tree" version = "0.10.0" @@ -1263,14 +1300,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] name = "euclid" -version = "0.22.11" +version = "0.22.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad9cdb4b747e485a12abb0e6566612956c7a1bafa3bdb8d682c5b6d403589e48" +checksum = "df61bf483e837f88d5c2291dcf55c67be7e676b3a51acc48db3a7b163b91ed63" dependencies = [ "num-traits", ] @@ -1311,32 +1348,31 @@ dependencies = [ "ansi_term", "env_logger", "fontdrasil", - "indexmap", + "indexmap 2.13.0", "log", "ordered-float", "serde", "smol_str", - "thiserror 2.0.17", + "thiserror 2.0.18", "write-fonts 0.44.1", ] [[package]] name = "filetime" -version = "0.2.26" +version = "0.2.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc0505cd1b6fa6580283f6bdf70a73fcf4aba1184038c90902b92b3dd0df63ed" +checksum = "f98844151eee8917efc50bd9e8318cb963ae8b297431495d3f758616ea5c57db" dependencies = [ "cfg-if", "libc", "libredox", - "windows-sys 0.60.2", ] [[package]] name = "find-msvc-tools" -version = "0.1.5" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a3076410a55c90011c298b04d0cfa770b00fa04e1e3c97d3f6c9de105a03844" +checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" [[package]] name = "fixedbitset" @@ -1352,13 +1388,13 @@ checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99" [[package]] name = "flate2" -version = "1.1.5" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfe33edd8e85a12a67454e37f8c75e730830d83e313556ab9ebf9ee7fbeb3bfb" +checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c" dependencies = [ "crc32fast", - "libz-rs-sys", "miniz_oxide", + "zlib-rs", ] [[package]] @@ -1422,14 +1458,14 @@ dependencies = [ "fontdrasil", "fontir", "icu_properties", - "indexmap", + "indexmap 2.13.0", "kurbo 0.12.0", "log", "ordered-float", "parking_lot", "serde", "smol_str", - "thiserror 2.0.17", + "thiserror 2.0.18", "tinystr", "write-fonts 0.44.1", ] @@ -1449,13 +1485,13 @@ dependencies = [ "fontir", "fontra2fontir", "glyphs2fontir", - "indexmap", + "indexmap 2.13.0", "log", "rayon", "regex", "serde", "serde_yaml", - "thiserror 2.0.17", + "thiserror 2.0.18", "ufo2fontir", "vergen-gitcl", "write-fonts 0.44.1", @@ -1473,7 +1509,7 @@ dependencies = [ "ordered-float", "serde", "smol_str", - "thiserror 2.0.17", + "thiserror 2.0.18", "write-fonts 0.44.1", ] @@ -1487,7 +1523,7 @@ dependencies = [ "chrono", "env_logger", "fontdrasil", - "indexmap", + "indexmap 2.13.0", "kurbo 0.12.0", "log", "ordered-float", @@ -1495,7 +1531,7 @@ dependencies = [ "serde", "serde_yaml", "smol_str", - "thiserror 2.0.17", + "thiserror 2.0.18", "write-fonts 0.44.1", ] @@ -1508,13 +1544,13 @@ dependencies = [ "env_logger", "fontdrasil", "fontir", - "indexmap", + "indexmap 2.13.0", "kurbo 0.12.0", "log", "ordered-float", "serde", "serde_json", - "thiserror 2.0.17", + "thiserror 2.0.18", "write-fonts 0.44.1", ] @@ -1539,7 +1575,7 @@ dependencies = [ "fontspector-profile-universal", "glyphs2fontir", "homedir", - "indexmap", + "indexmap 2.13.0", "indicatif", "itertools 0.14.0", "log", @@ -1553,7 +1589,7 @@ dependencies = [ "termimad", "toml", "walkdir", - "zip", + "zip 7.2.0", ] [[package]] @@ -1564,17 +1600,19 @@ dependencies = [ "fontations", "fontspector-checkhelper", "glob-match", - "indexmap", + "glyphslib", + "indexmap 2.13.0", "itertools 0.14.0", "kurbo 0.11.3", "log", "minreq", + "norad 0.16.1", "pluginator", "regex", "scraper", "serde", "serde_json", - "thiserror 2.0.17", + "thiserror 2.0.18", "toml", ] @@ -1585,7 +1623,7 @@ dependencies = [ "darling 0.23.0", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -1645,6 +1683,7 @@ dependencies = [ "fontspector-checkapi", "gf-metadata", "glob", + "glyphslib", "google-fonts-axisregistry", "google-fonts-glyphsets", "google-fonts-languages", @@ -1652,10 +1691,11 @@ dependencies = [ "harfrust 0.4.1", "hashbrown 0.16.1", "image", - "indexmap", + "indexmap 2.13.0", "itertools 0.14.0", "kurbo 0.11.3", "log", + "norad 0.16.1", "num-traits", "protobuf", "regex", @@ -1728,12 +1768,14 @@ dependencies = [ "fontspector-checkapi", "fontspector-checkhelper", "freetype-rs", + "glyphslib", "hashbrown 0.16.1", "humansize", "interpolatable", "itertools 0.14.0", "kurbo 0.11.3", "log", + "norad 0.16.1", "reqwest", "serde_json", "stringcase", @@ -1908,13 +1950,15 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" dependencies = [ "cfg-if", + "js-sys", "libc", "wasi", + "wasm-bindgen", ] [[package]] @@ -1924,9 +1968,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" dependencies = [ "cfg-if", + "js-sys", "libc", "r-efi", "wasip2", + "wasm-bindgen", ] [[package]] @@ -1953,9 +1999,9 @@ dependencies = [ [[package]] name = "git2" -version = "0.20.3" +version = "0.20.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e2b37e2f62729cdada11f0e6b3b6fe383c69c29fc619e391223e12856af308c" +checksum = "7b88256088d75a56f8ecfa070513a775dd9107f6530ef14919dac831af9cfe2b" dependencies = [ "bitflags", "libc", @@ -2011,7 +2057,7 @@ dependencies = [ "env_logger", "fontdrasil", "icu_properties", - "indexmap", + "indexmap 2.13.0", "kurbo 0.12.0", "log", "ordered-float", @@ -2019,7 +2065,7 @@ dependencies = [ "regex", "serde", "smol_str", - "thiserror 2.0.17", + "thiserror 2.0.18", "write-fonts 0.44.1", ] @@ -2034,43 +2080,52 @@ dependencies = [ "fontdrasil", "fontir", "glyphs-reader", - "indexmap", + "indexmap 2.13.0", "kurbo 0.12.0", "log", "ordered-float", "smol_str", - "thiserror 2.0.17", + "thiserror 2.0.18", "write-fonts 0.44.1", ] +[[package]] +name = "glyphslib" +version = "0.2.3" +source = "git+https://github.com/simoncozens/glyphslib-rs#8919c25d2b76d67ce4b45acc50020481ba79ce2a" +dependencies = [ + "itertools 0.14.0", + "openstep-plist", + "paste", + "serde", + "serde_path_to_error", + "serde_with", + "thiserror 2.0.18", +] + [[package]] name = "google-fonts-axisregistry" version = "0.4.17" -source = "git+https://github.com/googlefonts/axisregistry#0b4a47d3a7904d11ba7fba981badf2662225a5b8" +source = "git+https://github.com/googlefonts/axisregistry#485d4bcde691a3eeec05c29cbbebb9a2b01f3d44" dependencies = [ "bytes", "fontations", + "gf-metadata", "glob", - "indexmap", + "indexmap 2.13.0", "itertools 0.13.0", "prettyplease", "proc-macro2", - "prost", - "prost-build", - "protobuf", - "protobuf-parse", - "protobuf-support", - "protox", "quote", "serde", "serde_json", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] name = "google-fonts-glyphsets" version = "1.1.0" -source = "git+https://github.com/googlefonts/glyphsets#d226338bba5c3c835754a3b79d81a05a10b0972a" +source = "git+https://github.com/googlefonts/glyphsets#d0a6fcd4a6aa1e6282a1a2c38aae788bc5088314" dependencies = [ "glob", "google-fonts-languages", @@ -2081,8 +2136,8 @@ dependencies = [ "serde", "serde_json", "serde_yaml_ng", - "syn 2.0.111", - "thiserror 2.0.17", + "syn 2.0.114", + "thiserror 2.0.18", ] [[package]] @@ -2105,7 +2160,7 @@ dependencies = [ "quote", "serde", "serde_json", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -2129,9 +2184,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3c0b69cfcb4e1b9f1bf2f53f95f766e4661169728ec61cd3fe5a0166f2d1386" +checksum = "2f44da3a8150a6703ed5d34e164b875fd14c2cdab9af1252a9a1020bde2bdc54" dependencies = [ "atomic-waker", "bytes", @@ -2139,7 +2194,7 @@ dependencies = [ "futures-core", "futures-sink", "http", - "indexmap", + "indexmap 2.13.0", "slab", "tokio", "tokio-util", @@ -2234,6 +2289,12 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + [[package]] name = "hmac" version = "0.12.1" @@ -2353,11 +2414,12 @@ dependencies = [ "http", "hyper", "hyper-util", - "rustls 0.23.35", + "rustls 0.23.36", "rustls-pki-types", "tokio", "tokio-rustls", "tower-service", + "webpki-roots 1.0.5", ] [[package]] @@ -2378,14 +2440,13 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.19" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "727805d60e7938b76b826a6ef209eb70eaa1812794f9424d4a4e2d740662df5f" +checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0" dependencies = [ "base64", "bytes", "futures-channel", - "futures-core", "futures-util", "http", "http-body", @@ -2404,9 +2465,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.64" +version = "0.1.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33e57f83510bb73707521ebaffa789ec8caf86f9657cad665b092b581d40e9fb" +checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -2414,7 +2475,7 @@ dependencies = [ "js-sys", "log", "wasm-bindgen", - "windows-core", + "windows-core 0.62.2", ] [[package]] @@ -2575,9 +2636,20 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.12.1" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ad4bb2b565bca0645f4d68c5c9af97fba094e9791da685bf83cb5f3ce74acf2" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", + "serde", +] + +[[package]] +name = "indexmap" +version = "2.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" dependencies = [ "equivalent", "hashbrown 0.16.1", @@ -2620,7 +2692,7 @@ dependencies = [ [[package]] name = "interpolatable" version = "1.1.1" -source = "git+https://github.com/simoncozens/interpolatable#d95fb8a353bf11649cce62428362fa53d651cf45" +source = "git+https://github.com/simoncozens/interpolatable#698c66949a4f7f9fa0785e5a33c8c4b8b197d311" dependencies = [ "fontations", "greencurves", @@ -2638,9 +2710,9 @@ checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" [[package]] name = "iri-string" -version = "0.7.9" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f867b9d1d896b67beb18518eda36fdb77a32ea590de864f1325b294a6d14397" +checksum = "c91338f0783edbd6195decb37bae672fd3b165faffb89bf7b9e6942f8b1a731a" dependencies = [ "memchr", "serde", @@ -2687,15 +2759,15 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.15" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" +checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" [[package]] name = "jiff" -version = "0.2.16" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49cce2b81f2098e7e3efc35bc2e0a6b7abec9d34128283d7a26fa8f32a6dbb35" +checksum = "e67e8da4c49d6d9909fe03361f9b620f58898859f5c7aded68351e85e71ecf50" dependencies = [ "jiff-static", "log", @@ -2706,13 +2778,13 @@ dependencies = [ [[package]] name = "jiff-static" -version = "0.2.16" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "980af8b43c3ad5d8d349ace167ec8170839f753a42d233ba19e08afe1850fa69" +checksum = "e0c84ee7f197eca9a86c6fd6cb771e55eb991632f15f2bc3ca6ec838929e6e78" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -2727,9 +2799,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.83" +version = "0.3.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "464a3709c7f55f1f721e5389aa6ea4e3bc6aba669353300af094b29ffbdde1d8" +checksum = "8c942ebf8e95485ca0d52d97da7c5a2c387d0e7f0ba4c35e93bfcaee045955b3" dependencies = [ "once_cell", "wasm-bindgen", @@ -2760,9 +2832,9 @@ dependencies = [ [[package]] name = "lazy-regex" -version = "3.4.2" +version = "3.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "191898e17ddee19e60bccb3945aa02339e81edd4a8c50e21fd4d48cdecda7b29" +checksum = "c5c13b6857ade4c8ee05c3c3dc97d2ab5415d691213825b90d3211c425c1f907" dependencies = [ "lazy-regex-proc_macros", "once_cell", @@ -2771,14 +2843,14 @@ dependencies = [ [[package]] name = "lazy-regex-proc_macros" -version = "3.4.2" +version = "3.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c35dc8b0da83d1a9507e12122c80dea71a9c7c613014347392483a83ea593e04" +checksum = "32a95c68db5d41694cea563c86a4ba4dc02141c16ef64814108cb23def4d5438" dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -2852,23 +2924,25 @@ checksum = "2c4a545a15244c7d945065b5d392b2d2d7f21526fba56ce51467b06ed445e8f7" [[package]] name = "libc" -version = "0.2.178" +version = "0.2.180" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37c93d8daa9d8a012fd8ab92f088405fb202ea0b6ab73ee2482ae66af4f42091" +checksum = "bcc35a38544a891a5f7c865aca548a982ccb3b8650a5b06d0fd33a10283c56fc" [[package]] name = "libduckdb-sys" -version = "1.4.2" +version = "1.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6650a7ea86fce24fe1fbf5b037671a8b77c59d135703fc6085b8a1827e66e977" +checksum = "d78bacb8933586cee3b550c39b610d314f9b7a48701ac7a914a046165a4ad8da" dependencies = [ "cc", "flate2", "pkg-config", + "reqwest", "serde", "serde_json", "tar", "vcpkg", + "zip 6.0.0", ] [[package]] @@ -2895,28 +2969,19 @@ dependencies = [ [[package]] name = "libm" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" +checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" [[package]] name = "libredox" -version = "0.1.11" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df15f6eac291ed1cf25865b1ee60399f57e7c227e7f51bdbd4c5270396a9ed50" +checksum = "3d0b95e02c851351f877147b7deea7b1afb1df71b63aa5f8270716e0c5720616" dependencies = [ "bitflags", "libc", - "redox_syscall 0.6.0", -] - -[[package]] -name = "libz-rs-sys" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15413ef615ad868d4d65dce091cb233b229419c7c0c4bcaa746c0901c49ff39c" -dependencies = [ - "zlib-rs", + "redox_syscall 0.7.0", ] [[package]] @@ -2971,44 +3036,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" [[package]] -name = "logos" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff472f899b4ec2d99161c51f60ff7075eeb3097069a36050d8037a6325eb8154" -dependencies = [ - "logos-derive", -] - -[[package]] -name = "logos-codegen" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "192a3a2b90b0c05b27a0b2c43eecdb7c415e29243acc3f89cc8247a5b693045c" -dependencies = [ - "beef", - "fnv", - "lazy_static", - "proc-macro2", - "quote", - "regex-syntax", - "rustc_version", - "syn 2.0.111", -] - -[[package]] -name = "logos-derive" -version = "0.15.1" +name = "lru-slab" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "605d9697bcd5ef3a42d38efc51541aa3d6a4a25f7ab6d1ed0da5ac632a26b470" -dependencies = [ - "logos-codegen", -] +checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" [[package]] name = "lzma-rust2" -version = "0.15.4" +version = "0.15.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48172246aa7c3ea28e423295dd1ca2589a24617cc4e588bb8cfe177cb2c54d95" +checksum = "1670343e58806300d87950e3401e820b519b9384281bbabfb15e3636689ffd69" dependencies = [ "crc", "sha2", @@ -3064,28 +3101,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "miette" -version = "7.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f98efec8807c63c752b5bd61f862c165c115b0a35685bdcfd9238c7aeb592b7" -dependencies = [ - "cfg-if", - "miette-derive", - "unicode-width 0.1.14", -] - -[[package]] -name = "miette-derive" -version = "7.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db5b29714e950dbb20d5e6f74f9dcec4edbcc1067bb7f8ed198c097b8c1a818b" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.111", -] - [[package]] name = "mime" version = "0.3.17" @@ -3119,7 +3134,7 @@ checksum = "05015102dad0f7d61691ca347e9d9d9006685a64aefb3d79eecf62665de2153d" dependencies = [ "rustls 0.21.12", "rustls-webpki 0.101.7", - "webpki-roots", + "webpki-roots 0.25.4", ] [[package]] @@ -3222,13 +3237,14 @@ checksum = "af78fa33027e25d57ac99c174a885632f58fd427598e646ae4913f42baf09b49" dependencies = [ "base64", "close_already", - "indexmap", + "indexmap 2.13.0", "plist", "quick-xml", "serde", "serde_derive", "serde_repr", - "thiserror 2.0.17", + "thiserror 2.0.18", + "uuid", ] [[package]] @@ -3239,14 +3255,14 @@ checksum = "df868796aec99b7bbaa3f7a4267c10d9145ff871c5692cdb7d760ed1a5d56591" dependencies = [ "base64", "close_already", - "indexmap", + "indexmap 2.13.0", "log", "plist", "quick-xml", "serde", "serde_derive", "serde_repr", - "thiserror 2.0.17", + "thiserror 2.0.18", "uuid", ] @@ -3294,9 +3310,9 @@ dependencies = [ [[package]] name = "num-conv" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" +checksum = "cf97ec579c3c42f953ef76dbf8d55ac91fb219dde70e49aa4a6b7d74e9919050" [[package]] name = "num-integer" @@ -3393,7 +3409,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -3414,6 +3430,18 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "openstep-plist" +version = "1.0.0" +source = "git+https://github.com/simoncozens/glyphslib-rs#8919c25d2b76d67ce4b45acc50020481ba79ce2a" +dependencies = [ + "itertools 0.14.0", + "serde", + "serde_bytes", + "smol_str", + "thiserror 2.0.18", +] + [[package]] name = "ordered-float" version = "5.1.0" @@ -3421,7 +3449,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f4779c6901a562440c3786d08192c6fbda7c1c2060edd10006b05ee35d10f2d" dependencies = [ "num-traits", - "rand", + "rand 0.8.5", "serde", ] @@ -3459,6 +3487,12 @@ dependencies = [ "windows-link 0.2.1", ] +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + [[package]] name = "pbkdf2" version = "0.12.2" @@ -3477,9 +3511,9 @@ checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "pest" -version = "2.8.4" +version = "2.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbcfd20a6d4eeba40179f05735784ad32bdaef05ce8e8af05f180d45bb3e7e22" +checksum = "2c9eb05c21a464ea704b53158d358a31e6425db2f63a1a7312268b05fe2b75f7" dependencies = [ "memchr", "ucd-trie", @@ -3487,9 +3521,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.8.4" +version = "2.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51f72981ade67b1ca6adc26ec221be9f463f2b5839c7508998daa17c23d94d7f" +checksum = "68f9dbced329c441fa79d80472764b1a2c7e57123553b8519b36663a2fb234ed" dependencies = [ "pest", "pest_generator", @@ -3497,22 +3531,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.8.4" +version = "2.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee9efd8cdb50d719a80088b76f81aec7c41ed6d522ee750178f83883d271625" +checksum = "3bb96d5051a78f44f43c8f712d8e810adb0ebf923fc9ed2655a7f66f63ba8ee5" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] name = "pest_meta" -version = "2.8.4" +version = "2.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf1d70880e76bdc13ba52eafa6239ce793d85c8e43896507e43dd8984ff05b82" +checksum = "602113b5b5e8621770cfd490cfd90b9f84ab29bd2b0e49ad83eb6d186cef2365" dependencies = [ "pest", "sha2", @@ -3525,7 +3559,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3672b37090dbd86368a4145bc067582552b29c27377cad4e0a306c97f9bd7772" dependencies = [ "fixedbitset 0.5.7", - "indexmap", + "indexmap 2.13.0", ] [[package]] @@ -3575,7 +3609,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" dependencies = [ "phf_shared 0.11.3", - "rand", + "rand 0.8.5", ] [[package]] @@ -3598,7 +3632,7 @@ dependencies = [ "phf_shared 0.13.1", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -3644,7 +3678,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "740ebea15c5d1428f910cd1a5f52cebf8d25006245ed8ade92702f4943d91e07" dependencies = [ "base64", - "indexmap", + "indexmap 2.13.0", "quick-xml", "serde", "time", @@ -3674,15 +3708,15 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.11.1" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483" +checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49" [[package]] name = "portable-atomic-util" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8a2f0d8d040d7848a709caf78912debcc3f33ee4b3cac47d73d1e1069e83507" +checksum = "7a9db96d7fa8782dd8c15ce32ffe8680bbd1e978a43bf51a34d39483540495f5" dependencies = [ "portable-atomic", ] @@ -3704,9 +3738,9 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppmd-rust" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d558c559f0450f16f2a27a1f017ef38468c1090c9ce63c8e51366232d53717b4" +checksum = "efca4c95a19a79d1c98f791f10aebd5c1363b473244630bb7dbde1dc98455a24" [[package]] name = "ppv-lite86" @@ -3730,7 +3764,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" dependencies = [ "proc-macro2", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -3761,14 +3795,14 @@ dependencies = [ "proc-macro-error-attr2", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] name = "proc-macro2" -version = "1.0.105" +version = "1.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "535d180e0ecab6268a3e718bb9fd44db66bbbc256257165fc699dadf70d16fe7" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" dependencies = [ "unicode-ident", ] @@ -3790,7 +3824,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be769465445e8c1474e9c5dac2018218498557af32d9ed057325ec9a41ae81bf" dependencies = [ "heck", - "itertools 0.10.5", + "itertools 0.14.0", "log", "multimap", "once_cell", @@ -3799,7 +3833,7 @@ dependencies = [ "prost", "prost-types", "regex", - "syn 2.0.111", + "syn 2.0.114", "tempfile", ] @@ -3810,22 +3844,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a56d757972c98b346a9b766e3f02746cde6dd1cd1d1d563472929fdd74bec4d" dependencies = [ "anyhow", - "itertools 0.10.5", + "itertools 0.14.0", "proc-macro2", "quote", - "syn 2.0.111", -] - -[[package]] -name = "prost-reflect" -version = "0.15.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37587d5a8a1b3dc9863403d084fc2254b91ab75a702207098837950767e2260b" -dependencies = [ - "logos", - "miette", - "prost", - "prost-types", + "syn 2.0.114", ] [[package]] @@ -3855,7 +3877,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4aeaa1f2460f1d348eeaeed86aea999ce98c1bded6f089ff8514c9d9dbdc973" dependencies = [ "anyhow", - "indexmap", + "indexmap 2.13.0", "log", "protobuf", "protobuf-support", @@ -3937,33 +3959,6 @@ version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95067976aca6421a523e491fce939a3e65249bac4b977adee0ee9771568e8aa3" -[[package]] -name = "protox" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "424c2bd294b69c49b949f3619362bc3c5d28298cd1163b6d1a62df37c16461aa" -dependencies = [ - "bytes", - "miette", - "prost", - "prost-reflect", - "prost-types", - "protox-parse", - "thiserror 2.0.17", -] - -[[package]] -name = "protox-parse" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57927f9dbeeffcce7192404deee6157a640cbb3fe8ac11eabbe571565949ab75" -dependencies = [ - "logos", - "miette", - "prost-types", - "thiserror 2.0.17", -] - [[package]] name = "ptr_meta" version = "0.1.4" @@ -4039,7 +4034,7 @@ dependencies = [ "proc-macro2", "pyo3-macros-backend", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -4052,7 +4047,7 @@ dependencies = [ "proc-macro2", "pyo3-build-config", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -4075,11 +4070,66 @@ dependencies = [ "serde", ] +[[package]] +name = "quinn" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e20a958963c291dc322d98411f541009df2ced7b5a4f2bd52337638cfccf20" +dependencies = [ + "bytes", + "cfg_aliases", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash", + "rustls 0.23.36", + "socket2", + "thiserror 2.0.18", + "tokio", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-proto" +version = "0.11.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1906b49b0c3bc04b5fe5d86a77925ae6524a19b816ae38ce1e426255f1d8a31" +dependencies = [ + "bytes", + "getrandom 0.3.4", + "lru-slab", + "rand 0.9.2", + "ring", + "rustc-hash", + "rustls 0.23.36", + "rustls-pki-types", + "slab", + "thiserror 2.0.18", + "tinyvec", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-udp" +version = "0.5.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "addec6a0dcad8a8d96a771f815f0eaf55f9d1805756410b39f5fa81332574cbd" +dependencies = [ + "cfg_aliases", + "libc", + "once_cell", + "socket2", + "tracing", + "windows-sys 0.60.2", +] + [[package]] name = "quote" -version = "1.0.42" +version = "1.0.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f" +checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4" dependencies = [ "proc-macro2", ] @@ -4103,11 +4153,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", - "rand_chacha", - "rand_core", + "rand_chacha 0.3.1", + "rand_core 0.6.4", "serde", ] +[[package]] +name = "rand" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" +dependencies = [ + "rand_chacha 0.9.0", + "rand_core 0.9.5", +] + [[package]] name = "rand_chacha" version = "0.3.1" @@ -4115,7 +4175,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.5", ] [[package]] @@ -4124,10 +4194,19 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.16", + "getrandom 0.2.17", "serde", ] +[[package]] +name = "rand_core" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" +dependencies = [ + "getrandom 0.3.4", +] + [[package]] name = "rawpointer" version = "0.2.1" @@ -4198,18 +4277,38 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec96166dafa0886eb81fe1c0a388bece180fbef2135f97c1e2cf8302e74b43b5" +checksum = "49f3fe0889e69e2ae9e41f4d6c4c0181701d00e4697b356fb1f74173a5e0ee27" dependencies = [ "bitflags", ] +[[package]] +name = "ref-cast" +version = "1.0.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f354300ae66f76f1c85c5f84693f0ce81d747e2c3f21a45fef496d89c960bf7d" +dependencies = [ + "ref-cast-impl", +] + +[[package]] +name = "ref-cast-impl" +version = "1.0.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7186006dcb21920990093f30e3dea63b7d6e977bf1256be20c3563a5db070da" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.114", +] + [[package]] name = "regex" -version = "1.12.2" +version = "1.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4" +checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276" dependencies = [ "aho-corasick", "memchr", @@ -4219,9 +4318,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" +checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" dependencies = [ "aho-corasick", "memchr", @@ -4230,9 +4329,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.8" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" +checksum = "a96887878f22d7bad8a3b6dc5b7440e0ada9a245242924394987b21cf2210a4c" [[package]] name = "rend" @@ -4245,9 +4344,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.12.26" +version = "0.12.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b4c14b2d9afca6a60277086b0cc6a6ae0b568f6f7916c943a8cdc79f8be240f" +checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147" dependencies = [ "base64", "bytes", @@ -4269,6 +4368,8 @@ dependencies = [ "native-tls", "percent-encoding", "pin-project-lite", + "quinn", + "rustls 0.23.36", "rustls-pki-types", "serde", "serde_json", @@ -4276,6 +4377,7 @@ dependencies = [ "sync_wrapper", "tokio", "tokio-native-tls", + "tokio-rustls", "tower", "tower-http", "tower-service", @@ -4283,6 +4385,7 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", + "webpki-roots 1.0.5", ] [[package]] @@ -4293,7 +4396,7 @@ checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" dependencies = [ "cc", "cfg-if", - "getrandom 0.2.16", + "getrandom 0.2.17", "libc", "untrusted", "windows-sys 0.52.0", @@ -4301,9 +4404,9 @@ dependencies = [ [[package]] name = "rkyv" -version = "0.7.45" +version = "0.7.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9008cd6385b9e161d8229e1f6549dd23c3d022f132a2ea37ac3a10ac4935779b" +checksum = "2297bf9c81a3f0dc96bc9521370b88f054168c29826a75e89c55ff196e7ed6a1" dependencies = [ "bitvec", "bytecheck", @@ -4319,9 +4422,9 @@ dependencies = [ [[package]] name = "rkyv_derive" -version = "0.7.45" +version = "0.7.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "503d1d27590a2b0a3a4ca4c94755aa2875657196ecbf401a42eff41d7de532c0" +checksum = "84d7b42d4b8d06048d3ac8db0eb31bcb942cbeb709f0b5f2b2ebde398d3038f5" dependencies = [ "proc-macro2", "quote", @@ -4330,15 +4433,15 @@ dependencies = [ [[package]] name = "rust_decimal" -version = "1.39.0" +version = "1.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35affe401787a9bd846712274d97654355d21b2a2c092a3139aabe31e9022282" +checksum = "61f703d19852dbf87cbc513643fa81428361eb6940f1ac14fd58155d295a3eb0" dependencies = [ "arrayvec", "borsh", "bytes", "num-traits", - "rand", + "rand 0.8.5", "rkyv", "serde", "serde_json", @@ -4374,15 +4477,15 @@ dependencies = [ [[package]] name = "rustix" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd15f8a2c5551a84d56efdc1cd049089e409ac19a3072d5037a17fd70719ff3e" +checksum = "146c9e247ccc180c1f61615433868c99f3de3ae256a30a43b49f67c2d9171f34" dependencies = [ "bitflags", "errno", "libc", "linux-raw-sys 0.11.0", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -4399,23 +4502,25 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.35" +version = "0.23.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "533f54bc6a7d4f647e46ad909549eda97bf5afc1585190ef692b4286b198bd8f" +checksum = "c665f33d38cea657d9614f766881e4d510e0eda4239891eea56b4cadcf01801b" dependencies = [ "once_cell", + "ring", "rustls-pki-types", - "rustls-webpki 0.103.8", + "rustls-webpki 0.103.9", "subtle", "zeroize", ] [[package]] name = "rustls-pki-types" -version = "1.13.2" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21e6f2ab2928ca4291b86736a8bd920a277a399bba1589409d72154ff87c1282" +checksum = "be040f8b0a225e40375822a563fa9524378b9d63112f53e19ffff34df5d33fdd" dependencies = [ + "web-time", "zeroize", ] @@ -4431,9 +4536,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.103.8" +version = "0.103.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ffdfa2f5286e2247234e03f680868ac2815974dc39e00ea15adc445d0aafe52" +checksum = "d7df23109aa6c1567d1c575b9952556388da57401e4ace1d15f79eedad0d8f53" dependencies = [ "ring", "rustls-pki-types", @@ -4448,9 +4553,9 @@ checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] name = "ryu" -version = "1.0.20" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" +checksum = "a50f4cf475b65d88e057964e0e9bb1f0aa9bbb2036dc65c64596b42932536984" [[package]] name = "same-file" @@ -4470,6 +4575,30 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "schemars" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd191f9397d57d581cddd31014772520aa448f65ef991055d7f61582c65165f" +dependencies = [ + "dyn-clone", + "ref-cast", + "serde", + "serde_json", +] + +[[package]] +name = "schemars" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2b42f36aa1cd011945615b92222f6bf73c599a102a300334cd7f8dbeec726cc" +dependencies = [ + "dyn-clone", + "ref-cast", + "serde", + "serde_json", +] + [[package]] name = "scopeguard" version = "1.2.0" @@ -4569,6 +4698,16 @@ dependencies = [ "serde_derive", ] +[[package]] +name = "serde_bytes" +version = "0.11.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5d440709e79d88e51ac01c4b72fc6cb7314017bb7da9eeff678aa94c10e3ea8" +dependencies = [ + "serde", + "serde_core", +] + [[package]] name = "serde_core" version = "1.0.228" @@ -4586,7 +4725,7 @@ checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -4595,7 +4734,7 @@ version = "1.0.149" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" dependencies = [ - "indexmap", + "indexmap 2.13.0", "itoa", "memchr", "serde", @@ -4603,6 +4742,17 @@ dependencies = [ "zmij", ] +[[package]] +name = "serde_path_to_error" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10a9ff822e371bb5403e391ecd83e182e0e77ba7f6fe0160b795797109d1b457" +dependencies = [ + "itoa", + "serde", + "serde_core", +] + [[package]] name = "serde_repr" version = "0.1.20" @@ -4611,7 +4761,7 @@ checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -4635,13 +4785,44 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_with" +version = "3.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fa237f2807440d238e0364a218270b98f767a00d3dada77b1c53ae88940e2e7" +dependencies = [ + "base64", + "chrono", + "hex", + "indexmap 1.9.3", + "indexmap 2.13.0", + "schemars 0.9.0", + "schemars 1.2.1", + "serde_core", + "serde_json", + "serde_with_macros", + "time", +] + +[[package]] +name = "serde_with_macros" +version = "3.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52a8e3ca0ca629121f70ab50f95249e5a6f925cc0f6ffe8256c45b728875706c" +dependencies = [ + "darling 0.21.3", + "proc-macro2", + "quote", + "syn 2.0.114", +] + [[package]] name = "serde_yaml" version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ - "indexmap", + "indexmap 2.13.0", "itoa", "ryu", "serde", @@ -4654,7 +4835,7 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b4db627b98b36d4203a7b458cf3573730f2bb591b28871d916dfa9efabfd41f" dependencies = [ - "indexmap", + "indexmap 2.13.0", "itoa", "ryu", "serde", @@ -4694,9 +4875,9 @@ dependencies = [ [[package]] name = "shadow-rs" -version = "1.5.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff351910f271e7065781b6b4f0f43cb515d474d812f31176a0246d9058e47d5d" +checksum = "6d9967e7c3cd89d19cd533d8fceb3e5dcee28cf97fe76441481abe1d32723039" dependencies = [ "const_format", "git2", @@ -4713,7 +4894,7 @@ dependencies = [ "ambassador", "google-fonts-languages", "harfrust 0.3.2", - "indexmap", + "indexmap 2.13.0", "itertools 0.14.0", "log", "serde", @@ -4754,10 +4935,11 @@ dependencies = [ [[package]] name = "signal-hook-registry" -version = "1.4.7" +version = "1.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7664a098b8e616bdfcc2dc0e9ac44eb231eedf41db4e9fe95d8d32ec728dedad" +checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" dependencies = [ + "errno", "libc", ] @@ -4781,9 +4963,9 @@ checksum = "bbbb5d9659141646ae647b42fe094daf6c6192d1620870b449d9557f748b2daa" [[package]] name = "siphasher" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" +checksum = "b2aa850e253778c88a04c3d7323b043aeda9d3e30d5971937c1855769763678e" [[package]] name = "skrifa" @@ -4807,9 +4989,9 @@ dependencies = [ [[package]] name = "slab" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" [[package]] name = "smallvec" @@ -4822,9 +5004,9 @@ dependencies = [ [[package]] name = "smol_str" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3498b0a27f93ef1402f20eefacfaa1691272ac4eca1cdc8c596cb0a245d6cbf5" +checksum = "0f7a918bd2a9951d18ee6e48f076843e8e73a9a5d22cf05bcd4b7a81bdd04e17" dependencies = [ "borsh", "serde_core", @@ -4832,9 +5014,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17129e116933cf371d018bb80ae557e889637989d8638274fb25622827b03881" +checksum = "86f4aa3ad99f2088c990dfa82d367e19cb29268ed67c574d10d0a4bfe71f07e0" dependencies = [ "libc", "windows-sys 0.60.2", @@ -4862,7 +5044,6 @@ dependencies = [ "parking_lot", "phf_shared 0.13.1", "precomputed-hash", - "serde", ] [[package]] @@ -4914,7 +5095,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -4926,7 +5107,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -4948,9 +5129,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.111" +version = "2.0.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "390cc9a294ab71bdb1aa2e99d13be9c753cd2d7bd6560c77118597410c4d2e87" +checksum = "d4d107df263a3013ef9b1879b0df87d706ff80f65a86ea879bd9c31f9b307c2a" dependencies = [ "proc-macro2", "quote", @@ -4974,14 +5155,14 @@ checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] name = "system-configuration" -version = "0.6.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" +checksum = "a13f3d0daba03132c0aa9767f98351b3488edc2c100cda2d2ec2b04f3d8d3c8b" dependencies = [ "bitflags", "core-foundation", @@ -5019,7 +5200,7 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -5041,21 +5222,21 @@ dependencies = [ [[package]] name = "target-lexicon" -version = "0.13.3" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df7f62577c25e07834649fc3b39fafdc597c0a3527dc1c60129201ccfcbaa50c" +checksum = "b1dd07eb858a2067e2f3c7155d54e929265c264e6f37efe3ee7a8d1b5a1dd0ba" [[package]] name = "tempfile" -version = "3.23.0" +version = "3.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d31c77bdf42a745371d260a26ca7163f1e0924b64afa0b688e61b5a9fa02f16" +checksum = "655da9c7eb6305c55742045d5a8d2037996d61d8de95806335c7c86ce0f82e9c" dependencies = [ "fastrand", "getrandom 0.3.4", "once_cell", - "rustix 1.1.2", - "windows-sys 0.60.2", + "rustix 1.1.3", + "windows-sys 0.61.2", ] [[package]] @@ -5097,7 +5278,7 @@ dependencies = [ "lazy-regex", "minimad", "serde", - "thiserror 2.0.17", + "thiserror 2.0.18", "unicode-width 0.1.14", ] @@ -5121,11 +5302,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.17" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8" +checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" dependencies = [ - "thiserror-impl 2.0.17", + "thiserror-impl 2.0.18", ] [[package]] @@ -5136,18 +5317,18 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] name = "thiserror-impl" -version = "2.0.17" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913" +checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -5161,32 +5342,33 @@ dependencies = [ [[package]] name = "time" -version = "0.3.44" +version = "0.3.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e7d9e3bb61134e77bde20dd4825b97c010155709965fedf0f49bb138e52a9d" +checksum = "9da98b7d9b7dad93488a84b8248efc35352b0b2657397d4167e7ad67e5d535e5" dependencies = [ "deranged", "itoa", + "js-sys", "libc", "num-conv", "num_threads", "powerfmt", - "serde", + "serde_core", "time-core", "time-macros", ] [[package]] name = "time-core" -version = "0.1.6" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40868e7c1d2f0b8d73e4a8c7f0ff63af4f6d19be117e90bd73eb1d62cf831c6b" +checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca" [[package]] name = "time-macros" -version = "0.2.24" +version = "0.2.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30cfb0125f12d9c277f35663a0a33f8c30190f4e4574868a330595412d34ebf3" +checksum = "78cc610bac2dcee56805c99642447d4c5dbde4d01f752ffea0199aee1f601dc4" dependencies = [ "num-conv", "time-core", @@ -5229,9 +5411,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.48.0" +version = "1.49.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff360e02eab121e0bc37a2d3b4d4dc622e6eda3a8e5253d5435ecf5bd4c68408" +checksum = "72a2903cd7736441aac9df9d7688bd0ce48edccaadf181c3b90be801e81d3d86" dependencies = [ "bytes", "libc", @@ -5257,15 +5439,15 @@ version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" dependencies = [ - "rustls 0.23.35", + "rustls 0.23.36", "tokio", ] [[package]] name = "tokio-util" -version = "0.7.17" +version = "0.7.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2efa149fe76073d6e8fd97ef4f4eca7b67f599660115591483572e406e165594" +checksum = "9ae9cec805b01e8fc3fd2fe289f89149a9b66dd16786abd8b19cfa7b48cb0098" dependencies = [ "bytes", "futures-core", @@ -5280,7 +5462,7 @@ version = "0.9.11+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3afc9a848309fe1aaffaed6e1546a7a14de1f935dc9d89d32afd9a44bab7c46" dependencies = [ - "indexmap", + "indexmap 2.13.0", "serde_core", "serde_spanned", "toml_datetime", @@ -5304,7 +5486,7 @@ version = "0.23.10+spec-1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "84c8b9f757e028cee9fa244aea147aab2a9ec09d5325a9b01e0a49730c2b5269" dependencies = [ - "indexmap", + "indexmap 2.13.0", "toml_datetime", "toml_parser", "winnow", @@ -5327,9 +5509,9 @@ checksum = "ab16f14aed21ee8bfd8ec22513f7287cd4a91aa92e44edfe2c17ddd004e92607" [[package]] name = "tower" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" +checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" dependencies = [ "futures-core", "futures-util", @@ -5372,9 +5554,9 @@ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" -version = "0.1.43" +version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d15d90a0b5c19378952d479dc858407149d7bb45a14de0142f6c534b16fc647" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" dependencies = [ "pin-project-lite", "tracing-core", @@ -5382,9 +5564,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.35" +version = "0.1.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a04e24fab5c89c6a36eb8558c9656f30d81de51dfa4d3b45f26b21d61fa0a6c" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" dependencies = [ "once_cell", ] @@ -5395,6 +5577,12 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" +[[package]] +name = "typed-path" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3015e6ce46d5ad8751e4a772543a30c7511468070e98e64e20165f8f81155b64" + [[package]] name = "typenum" version = "1.19.0" @@ -5403,9 +5591,9 @@ checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" [[package]] name = "tz-rs" -version = "0.7.1" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14eff19b8dc1ace5bf7e4d920b2628ae3837f422ff42210cb1567cbf68b5accf" +checksum = "4fc6c929ffa10fb34f4a3c7e9a73620a83ef2e85e47f9ec3381b8289e6762f42" [[package]] name = "tzdb" @@ -5443,7 +5631,7 @@ dependencies = [ "env_logger", "fontdrasil", "fontir", - "indexmap", + "indexmap 2.13.0", "kurbo 0.12.0", "log", "norad 0.16.1", @@ -5451,7 +5639,7 @@ dependencies = [ "plist", "serde", "serde_yaml", - "thiserror 2.0.17", + "thiserror 2.0.18", "write-fonts 0.44.1", ] @@ -5541,7 +5729,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1262662dc96937c71115228ce2e1d30f41db71a7a45d3459e98783ef94052214" dependencies = [ "phf_codegen 0.11.3", - "rand", + "rand 0.8.5", ] [[package]] @@ -5570,9 +5758,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.7" +version = "2.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08bc136a29a3d1758e07a9cca267be308aeebf5cfd5a10f3f67ab2097683ef5b" +checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" dependencies = [ "form_urlencoded", "idna", @@ -5600,9 +5788,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.19.0" +version = "1.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e054861b4bd027cd373e18e8d8d8e6548085000e41290d95ce0c373a654b4a" +checksum = "ee48d38b119b0cd71fe4141b30f5ba9c7c5d9f4e7a3a8b4a674e4b6ef789976f" dependencies = [ "getrandom 0.3.4", "js-sys", @@ -5617,9 +5805,9 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "vergen" -version = "9.0.6" +version = "9.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b2bf58be11fc9414104c6d3a2e464163db5ef74b12296bda593cac37b6e4777" +checksum = "b849a1f6d8639e8de261e81ee0fc881e3e3620db1af9f2e0da015d4382ceaf75" dependencies = [ "anyhow", "cargo_metadata", @@ -5628,7 +5816,7 @@ dependencies = [ "rustc_version", "rustversion", "time", - "vergen-lib", + "vergen-lib 9.1.0", ] [[package]] @@ -5642,7 +5830,7 @@ dependencies = [ "rustversion", "time", "vergen", - "vergen-lib", + "vergen-lib 0.1.6", ] [[package]] @@ -5656,6 +5844,17 @@ dependencies = [ "rustversion", ] +[[package]] +name = "vergen-lib" +version = "9.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b34a29ba7e9c59e62f229ae1932fb1b8fb8a6fdcc99215a641913f5f5a59a569" +dependencies = [ + "anyhow", + "derive_builder", + "rustversion", +] + [[package]] name = "version_check" version = "0.9.5" @@ -5689,18 +5888,18 @@ checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "wasip2" -version = "1.0.1+wasi-0.2.4" +version = "1.0.2+wasi-0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" +checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5" dependencies = [ "wit-bindgen", ] [[package]] name = "wasm-bindgen" -version = "0.2.106" +version = "0.2.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d759f433fa64a2d763d1340820e46e111a7a5ab75f993d1852d70b03dbb80fd" +checksum = "64024a30ec1e37399cf85a7ffefebdb72205ca1c972291c51512360d90bd8566" dependencies = [ "cfg-if", "once_cell", @@ -5711,11 +5910,12 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.56" +version = "0.4.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836d9622d604feee9e5de25ac10e3ea5f2d65b41eac0d9ce72eb5deae707ce7c" +checksum = "70a6e77fd0ae8029c9ea0063f87c46fde723e7d887703d74ad2616d792e51e6f" dependencies = [ "cfg-if", + "futures-util", "js-sys", "once_cell", "wasm-bindgen", @@ -5724,9 +5924,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.106" +version = "0.2.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48cb0d2638f8baedbc542ed444afc0644a29166f1595371af4fecf8ce1e7eeb3" +checksum = "008b239d9c740232e71bd39e8ef6429d27097518b6b30bdf9086833bd5b6d608" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -5734,31 +5934,31 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.106" +version = "0.2.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cefb59d5cd5f92d9dcf80e4683949f15ca4b511f4ac0a6e14d4e1ac60c6ecd40" +checksum = "5256bae2d58f54820e6490f9839c49780dff84c65aeab9e772f15d5f0e913a55" dependencies = [ "bumpalo", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.106" +version = "0.2.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbc538057e648b67f72a982e708d485b2efa771e1ac05fec311f9f63e5800db4" +checksum = "1f01b580c9ac74c8d8f0c0e4afb04eeef2acf145458e52c03845ee9cd23e3d12" dependencies = [ "unicode-ident", ] [[package]] name = "web-sys" -version = "0.3.83" +version = "0.3.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b32828d774c412041098d182a8b38b16ea816958e07cf40eec2bc080ae137ac" +checksum = "312e32e551d92129218ea9a2452120f4aabc03529ef03e4d0d82fb2780608598" dependencies = [ "js-sys", "wasm-bindgen", @@ -5776,9 +5976,9 @@ dependencies = [ [[package]] name = "web_atoms" -version = "0.2.0" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acd0c322f146d0f8aad130ce6c187953889359584497dac6561204c8e17bb43d" +checksum = "57a9779e9f04d2ac1ce317aee707aa2f6b773afba7b931222bff6983843b1576" dependencies = [ "phf 0.13.1", "phf_codegen 0.13.1", @@ -5792,6 +5992,15 @@ version = "0.25.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" +[[package]] +name = "webpki-roots" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12bed680863276c63889429bfd6cab3b99943659923822de1c8a39c49e4d722c" +dependencies = [ + "rustls-pki-types", +] + [[package]] name = "weezl" version = "0.1.12" @@ -5838,7 +6047,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -5854,7 +6063,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893" dependencies = [ "windows-collections", - "windows-core", + "windows-core 0.61.2", "windows-future", "windows-link 0.1.3", "windows-numerics", @@ -5866,7 +6075,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8" dependencies = [ - "windows-core", + "windows-core 0.61.2", ] [[package]] @@ -5882,13 +6091,26 @@ dependencies = [ "windows-strings 0.4.2", ] +[[package]] +name = "windows-core" +version = "0.62.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-link 0.2.1", + "windows-result 0.4.1", + "windows-strings 0.5.1", +] + [[package]] name = "windows-future" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e" dependencies = [ - "windows-core", + "windows-core 0.61.2", "windows-link 0.1.3", "windows-threading", ] @@ -5901,7 +6123,7 @@ checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -5912,7 +6134,7 @@ checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -5933,7 +6155,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1" dependencies = [ - "windows-core", + "windows-core 0.61.2", "windows-link 0.1.3", ] @@ -6169,9 +6391,9 @@ dependencies = [ [[package]] name = "wit-bindgen" -version = "0.46.0" +version = "0.51.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" +checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" [[package]] name = "write-fonts" @@ -6180,7 +6402,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cac89848aeba9b7e1877f1e89e3f9c95adb8771f640e1ef23c605aa734748c2b" dependencies = [ "font-types 0.9.0", - "indexmap", + "indexmap 2.13.0", "kurbo 0.11.3", "log", "read-fonts 0.31.3", @@ -6193,7 +6415,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "187aca250ee00f9d9ad3a1ebc9ed65c9c921fdd4690b095ca6e5a8df7246d871" dependencies = [ "font-types 0.10.1", - "indexmap", + "indexmap 2.13.0", "kurbo 0.12.0", "log", "read-fonts 0.36.0", @@ -6222,7 +6444,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32e45ad4206f6d2479085147f02bc2ef834ac85886624a23575ae137c8aa8156" dependencies = [ "libc", - "rustix 1.1.2", + "rustix 1.1.3", ] [[package]] @@ -6250,28 +6472,28 @@ checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", "synstructure", ] [[package]] name = "zerocopy" -version = "0.8.31" +version = "0.8.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd74ec98b9250adb3ca554bdde269adf631549f51d8a8f8f0a10b50f1cb298c3" +checksum = "7456cf00f0685ad319c5b1693f291a650eaf345e941d082fc4e03df8a03996ac" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.31" +version = "0.8.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8a8d209fdf45cf5138cbb5a506f6b52522a25afccc534d1475dad8e31105c6a" +checksum = "1328722bbf2115db7e19d69ebcc15e795719e2d66b60827c6a69a117365e37a0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -6291,7 +6513,7 @@ checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", "synstructure", ] @@ -6306,13 +6528,13 @@ dependencies = [ [[package]] name = "zeroize_derive" -version = "1.4.2" +version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +checksum = "85a5b4158499876c763cb03bc4e49185d3cccbabb15b33c627f7884f43db852e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -6346,17 +6568,30 @@ checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] name = "zip" -version = "7.0.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdd8a47718a4ee5fe78e07667cd36f3de80e7c2bfe727c7074245ffc7303c037" +checksum = "eb2a05c7c36fde6c09b08576c9f7fb4cda705990f73b58fe011abf7dfb24168b" dependencies = [ - "aes", "arbitrary", + "crc32fast", + "flate2", + "indexmap 2.13.0", + "memchr", + "zopfli", +] + +[[package]] +name = "zip" +version = "7.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c42e33efc22a0650c311c2ef19115ce232583abbe80850bc8b66509ebef02de0" +dependencies = [ + "aes", "bzip2", "constant_time_eq", "crc32fast", @@ -6365,13 +6600,14 @@ dependencies = [ "generic-array", "getrandom 0.3.4", "hmac", - "indexmap", + "indexmap 2.13.0", "lzma-rust2", "memchr", "pbkdf2", "ppmd-rust", "sha1", "time", + "typed-path", "zeroize", "zopfli", "zstd", @@ -6379,15 +6615,15 @@ dependencies = [ [[package]] name = "zlib-rs" -version = "0.5.4" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51f936044d677be1a1168fae1d03b583a285a5dd9d8cbf7b24c23aa1fc775235" +checksum = "a7948af682ccbc3342b6e9420e8c51c1fe5d7bf7756002b4a3c6cabfe96a7e3c" [[package]] name = "zmij" -version = "1.0.12" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fc5a66a20078bf1251bde995aa2fdcc4b800c70b5d92dd2c62abc5c60f679f8" +checksum = "3ff05f8caa9038894637571ae6b9e29466c1f4f829d26c9b28f869a29cbe3445" [[package]] name = "zopfli" @@ -6431,15 +6667,15 @@ dependencies = [ [[package]] name = "zune-core" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "111f7d9820f05fd715df3144e254d6fc02ee4088b0644c0ffd0efc9e6d9d2773" +checksum = "cb8a0807f7c01457d0379ba880ba6322660448ddebc890ce29bb64da71fb40f9" [[package]] name = "zune-jpeg" -version = "0.5.7" +version = "0.5.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d915729b0e7d5fe35c2f294c5dc10b30207cc637920e5b59077bfa3da63f28" +checksum = "410e9ecef634c709e3831c2cfdb8d9c32164fae1c67496d5b68fff728eec37fe" dependencies = [ "zune-core", ] diff --git a/Cargo.toml b/Cargo.toml index f993da88..8c08e0ad 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -54,6 +54,10 @@ kurbo = "0.11" # For italic angle check regex = "1.10.6" +# Source fixes +norad = "0.16.0" +glyphslib = { git = "https://github.com/simoncozens/glyphslib-rs" } + [workspace.lints.clippy] unwrap_used = "deny" expect_used = "deny" diff --git a/fontspector-checkapi/Cargo.toml b/fontspector-checkapi/Cargo.toml index d65d03a0..5ec291da 100644 --- a/fontspector-checkapi/Cargo.toml +++ b/fontspector-checkapi/Cargo.toml @@ -44,6 +44,8 @@ itertools = { workspace = true } kurbo = { workspace = true, optional = true } thiserror = "2.0.12" +glyphslib.workspace = true +norad.workspace = true [lints] workspace = true diff --git a/fontspector-checkapi/src/check.rs b/fontspector-checkapi/src/check.rs index 81ac9da8..baa97c2c 100644 --- a/fontspector-checkapi/src/check.rs +++ b/fontspector-checkapi/src/check.rs @@ -4,6 +4,7 @@ use crate::{ context::Context, error::FontspectorError, prelude::FixFnResult, + source::SourceFile, status::CheckFnResult, testable::{TestableCollection, TestableType}, CheckResult, Registry, Status, Testable, @@ -50,6 +51,9 @@ pub enum CheckImplementation<'a> { /// The function signature for a hotfix function pub type HotfixFunction = dyn Fn(&mut Testable) -> FixFnResult; +/// The function signature for a source fix function +pub type FixSourceFunction = dyn Fn(&mut SourceFile) -> FixFnResult; + #[derive(Clone)] /// A check definition pub struct Check<'a> { @@ -66,7 +70,7 @@ pub struct Check<'a> { /// Function pointer implementing a hotfix to the binary file pub hotfix: Option<&'a HotfixFunction>, /// Function pointer implementing a hotfix to the font source file - pub fix_source: Option<&'a dyn Fn(&Testable) -> FixFnResult>, + pub fix_source: Option<&'a FixSourceFunction>, /// A registered file type that this check applies to pub applies_to: &'a str, /// Additional flags for the check diff --git a/fontspector-checkapi/src/checkresult.rs b/fontspector-checkapi/src/checkresult.rs index 17ce33fb..8cbe54fd 100644 --- a/fontspector-checkapi/src/checkresult.rs +++ b/fontspector-checkapi/src/checkresult.rs @@ -4,7 +4,7 @@ use serde::{ser::SerializeStruct, Serialize}; use crate::{Check, CheckId, Status, StatusCode}; -#[derive(Debug, Clone, Serialize)] +#[derive(Debug, Clone, Serialize, PartialEq)] /// The result of a fix operation. pub enum FixResult { /// A fix was available, but not requested diff --git a/fontspector-checkapi/src/error.rs b/fontspector-checkapi/src/error.rs index ca750bf0..180c483b 100644 --- a/fontspector-checkapi/src/error.rs +++ b/fontspector-checkapi/src/error.rs @@ -1,4 +1,4 @@ -use std::sync::PoisonError; +use std::{path::PathBuf, sync::PoisonError}; use thiserror::Error; @@ -38,6 +38,21 @@ pub enum FontspectorError { /// Additional details about the error more_details: String, }, + /// A file was not found + #[error("File not found: {0}")] + FileNotFound(PathBuf), + /// Could not load a UFO file + #[error("Could not load UFO file: {0}")] + UfoLoad(Arc), + /// Could not save a UFO file + #[error("Could not save UFO file: {0}")] + UfoSave(Arc), + /// Could not load a designspace file + #[error("Could not load designspace file: {0}")] + DesignspaceLoad(Arc), + /// A file was not recognized as a source + #[error("Unrecognized source file: {0}")] + UnrecognizedSource(PathBuf), /// Something went wrong doing Python things #[error("Python error: {0}")] Python(String), @@ -71,6 +86,14 @@ pub enum FontspectorError { /// Something else happened when fixing the font #[error("Something went wrong while fixing: {0}")] Fix(String), + /// Something else happened when saving the font + #[error("Something went wrong while saving {path}: {error}")] + SaveError { + /// The path to the file that could not be saved + path: PathBuf, + /// The error that occurred while saving + error: String, + }, } impl From for FontspectorError { @@ -97,6 +120,30 @@ impl From> for FontspectorError { } } +use std::sync::Arc; +impl From for FontspectorError { + fn from(err: norad::error::DesignSpaceLoadError) -> Self { + FontspectorError::DesignspaceLoad(Arc::new(err)) + } +} + +impl From for FontspectorError { + fn from(err: norad::error::FontLoadError) -> Self { + FontspectorError::UfoLoad(Arc::new(err)) + } +} + +impl From for FontspectorError { + fn from(err: norad::error::FontWriteError) -> Self { + FontspectorError::UfoSave(Arc::new(err)) + } +} +impl From> for FontspectorError { + fn from(err: Box) -> Self { + FontspectorError::General(err.to_string()) + } +} + impl FontspectorError { /// Create a skip error with a code and message pub fn skip(code: &'static str, message: &'static str) -> Self { diff --git a/fontspector-checkapi/src/lib.rs b/fontspector-checkapi/src/lib.rs index fb0d0931..87fe6861 100644 --- a/fontspector-checkapi/src/lib.rs +++ b/fontspector-checkapi/src/lib.rs @@ -37,13 +37,19 @@ pub mod pens; mod profile; /// The registry of checks and profiles mod registry; + +/// Source files which can be fixed +pub mod source; /// Data structures representing the most basic elements of a check's result mod status; /// Wraps a file or "thing" to be tested mod testable; /// Common utility functions for check implementors mod utils; -pub use check::{return_result, Check, CheckFlags, CheckId, CheckImplementation, HotfixFunction}; +pub use check::{ + return_result, Check, CheckFlags, CheckId, CheckImplementation, FixSourceFunction, + HotfixFunction, +}; pub use checkresult::{CheckResult, FixResult}; pub use context::Context; pub use error::FontspectorError; @@ -55,6 +61,7 @@ pub use font::{ pub use gsub::{GetSubstitutionMap, SubstitutionMap}; pub use profile::{Override, Profile, ProfileBuilder}; pub use registry::Registry; +pub use source::{Source, SourceFile}; pub use status::{CheckFnResult, Status, StatusCode, StatusList}; pub use testable::{Testable, TestableCollection, TestableType}; diff --git a/fontspector-checkapi/src/source.rs b/fontspector-checkapi/src/source.rs new file mode 100644 index 00000000..dd1059ea --- /dev/null +++ b/fontspector-checkapi/src/source.rs @@ -0,0 +1,159 @@ +use std::{ + collections::HashMap, + ffi::OsStr, + path::{Path, PathBuf}, +}; + +use glyphslib::Font; +use norad::{designspace::DesignSpaceDocument, Font as UfoFont}; + +use crate::{prelude::FixFnResult, FontspectorError}; + +#[derive(Debug, Clone)] +/// Our representation of a DesignSpace document, which contains multiple UFO sources. +pub struct DesignSpace { + /// The DesignSpace document. + pub document: DesignSpaceDocument, + /// The source fonts + pub sources: HashMap>, +} + +impl DesignSpace { + /// Load a DesignSpace document from a path. + pub fn load(path: &Path) -> Result { + let document = DesignSpaceDocument::load(path)?; + let mut sources = HashMap::new(); + for source in &document.sources { + let ufo_font = UfoFont::load(path.with_file_name(&source.filename))?; + sources.insert(source.filename.clone(), Box::new(ufo_font)); + } + Ok(Self { document, sources }) + } + + /// Save the DesignSpace document to a path. + pub fn save(&self, path: &Path) -> Result<(), FontspectorError> { + self.document + .save(path) + .map_err(|e| FontspectorError::SaveError { + path: path.to_path_buf(), + error: e.to_string(), + })?; + // Now save all the UFO sources + for (name, font) in &self.sources { + font.save(path.with_file_name(name))?; + } + Ok(()) + } + + /// Apply to fix to each UFO source in the DesignSpace document. + pub fn apply_fix(&mut self, fix: &dyn Fn(&mut UfoFont) -> FixFnResult) -> FixFnResult { + let mut changed = false; + for font in self.sources.values_mut() { + if fix(font)? { + changed = true; + } + } + Ok(changed) + } +} + +/// A source of a font, which can be a Glyphs file, a UFO file, or a DesignSpace document. +#[derive(Debug)] +pub enum Source { + /// A source that contains a Glyphs font. + /// + /// This may be either Glyphs 2 or Glyphs 3 format. + Glyphs(Box), + /// A source that contains a UFO font. + Ufo(Box), + /// A source that contains a DesignSpace document. + Designspace(Box), +} + +/// A source file that can be loaded (and saved) from a path. +pub struct SourceFile { + /// The source of the font. + pub source: Source, + /// The path to the file, if available. + pub file: PathBuf, +} + +impl SourceFile { + /// Load a source file from a given path. + pub fn new(path: &Path) -> Result { + if !path.exists() { + return Err(FontspectorError::FileNotFound(path.to_path_buf())); + } + let ext = path + .extension() + .and_then(OsStr::to_str) + .ok_or_else(|| FontspectorError::UnrecognizedSource(path.to_path_buf()))?; + let source = match ext { + "designspace" => Ok(Source::Designspace(Box::new(DesignSpace::load(path)?))), + "ufo" => Ok(Source::Ufo(Box::new(UfoFont::load(path)?))), + "glyphs" | "glyphspackage" => Ok(Source::Glyphs(Box::new(Font::load(path)?))), + _ => Err(FontspectorError::UnrecognizedSource(path.to_path_buf())), + }?; + Ok(Self { + source, + file: path.to_path_buf(), + }) + } + + /// Returns the filename of the source file. + pub fn filename(&self) -> String { + // Displaying a PathBuf is a chore, let's have a method for it. + self.file + .file_name() + .and_then(OsStr::to_str) + .map_or_else(|| "unknown".to_string(), |s| s.to_string()) + } + + /// Saves the source file. + pub fn save(&self) -> Result<(), FontspectorError> { + match &self.source { + Source::Glyphs(font) => { + font.save(&self.file) + .map_err(|e| FontspectorError::SaveError { + path: self.file.clone(), + error: e.to_string(), + }) + } + Source::Ufo(font) => Ok(font.save(&self.file)?), + Source::Designspace(doc) => { + doc.save(&self.file) + .map_err(|e| FontspectorError::SaveError { + path: self.file.clone(), + error: e.to_string(), + }) + } + } + } +} + +// Utility functions for source fixes + +/// Find or add a custom parameter in a Glyphs font. +pub fn find_or_add_cp( + cps: &mut Vec, + name: &str, + value: glyphslib::Plist, +) -> FixFnResult { + if let Some(cp) = cps.iter_mut().find(|cp| cp.name == name) { + if cp.value != value { + log::info!("Setting {name} custom parameter to {value:?} in Glyphs font."); + cp.value = value; + Ok(true) + } else { + Ok(false) + } + } else { + log::info!("Adding {name} custom parameter with value {value:?} in Glyphs font."); + cps.push(glyphslib::common::CustomParameter { + name: name.to_string(), + value, + disabled: false, + }); + Ok(true) + } +} diff --git a/fontspector-checkapi/src/status.rs b/fontspector-checkapi/src/status.rs index cd8ad686..23180522 100644 --- a/fontspector-checkapi/src/status.rs +++ b/fontspector-checkapi/src/status.rs @@ -9,14 +9,19 @@ use crate::{error::FontspectorError, Override}; /// A severity level for a single check subresult pub enum StatusCode { /// Skip: the check didn't run because some condition was not met + #[cfg_attr(feature = "clap", value(alias("SKIP"), hide = true))] Skip, /// Pass: there's no problem here + #[cfg_attr(feature = "clap", value(alias("PASS"), hide = true))] Pass, /// Info: the check returned some useful information, but no problems + #[cfg_attr(feature = "clap", value(alias("INFO"), hide = true))] Info, /// Warn: a problem which should be manually reviewed + #[cfg_attr(feature = "clap", value(alias("WARN"), hide = true))] Warn, /// Fail: a problem materially affects the correctness of the font + #[cfg_attr(feature = "clap", value(alias("FAIL"), hide = true))] Fail, /// Error: something went wrong /// @@ -25,6 +30,7 @@ pub enum StatusCode { /// parsed, even though we did our best to check for things. In /// other words, it's something so bad there's no point continuing /// with the check; it's equivalent to a Fontbakery FATAL. + #[cfg_attr(feature = "clap", value(alias("ERROR"), hide = true))] Error, } diff --git a/fontspector-cli/src/args.rs b/fontspector-cli/src/args.rs index f8063f20..9cd583b0 100644 --- a/fontspector-cli/src/args.rs +++ b/fontspector-cli/src/args.rs @@ -112,6 +112,32 @@ pub struct Args { #[clap(long, help_heading = "Fix problems")] pub fix_sources: bool, + #[arg(long, help_heading = "Fix problems", value_parser = parse_source_map)] + pub source_map: Vec<(String, String)>, + /// Input files pub inputs: Vec, } + +fn parse_source_map(s: &str) -> Result<(String, String), String> { + let parts: Vec<&str> = s.splitn(2, ':').collect(); + if parts.len() != 2 { + return Err(format!( + "Invalid source map entry (should be binary_file.ttf:source.glyphs): {s}" + )); + } + #[allow(clippy::indexing_slicing)] // We know there are exactly two parts + if parts[0].ends_with(".glyphs") + || parts[0].ends_with(".glyphspackage") + || parts[0].ends_with(".ufo") + || parts[0].ends_with(".designspace") + || parts[1].ends_with(".ttf") + || parts[1].ends_with(".otf") + { + return Err(format!( + "Invalid source map key (the binary font should go on the left): {s}", + )); + } + #[allow(clippy::indexing_slicing)] // We know there are exactly two parts + Ok((parts[0].to_string(), parts[1].to_string())) +} diff --git a/fontspector-cli/src/configuration.rs b/fontspector-cli/src/configuration.rs index a28c6251..72d2524b 100644 --- a/fontspector-cli/src/configuration.rs +++ b/fontspector-cli/src/configuration.rs @@ -17,6 +17,8 @@ pub(crate) struct UserConfigurationFile { #[serde(flatten)] pub per_check_config: HashMap, + #[serde(default)] + pub source_map: HashMap, } pub(crate) fn load_configuration(args: &Args) -> UserConfigurationFile { diff --git a/fontspector-cli/src/main.rs b/fontspector-cli/src/main.rs index bac484da..9926e5a2 100644 --- a/fontspector-cli/src/main.rs +++ b/fontspector-cli/src/main.rs @@ -16,8 +16,8 @@ use args::Args; use clap::{CommandFactory, FromArgMatches}; use fontspector_checkapi::{ - Check, CheckResult, Context, FixResult, HotfixFunction, Registry, StatusCode, Testable, - TestableCollection, TestableType, + Check, CheckResult, Context, FixResult, FixSourceFunction, HotfixFunction, Registry, + SourceFile, StatusCode, Testable, TestableCollection, TestableType, }; #[cfg(not(debug_assertions))] @@ -146,6 +146,10 @@ fn main() { if let Some(more_excludes) = configuration.exclude_checks.as_ref() { excludes.extend(more_excludes.iter().cloned()); } + let mut source_map = configuration.source_map.clone(); + for (key, val) in args.source_map.clone() { + source_map.insert(key, val); + } // Establish a check order let checkorder: Vec<(String, &TestableType, &Check, Context)> = profile.check_order( @@ -169,7 +173,7 @@ fn main() { let count_of_files = testables.iter().filter(|x| x.is_single()).count(); let count_of_families = testables.len() - count_of_files; - if !any_reports_to_stdout { + if !any_reports_to_stdout && !args.quiet && !args.succinct { let _ = writeln!( std::io::stdout(), "Running {:} check{} on {} file{} in {} famil{}", @@ -211,7 +215,7 @@ fn main() { .into(); if args.hotfix || args.fix_sources { - try_fixing_stuff(&mut results, &args, ®istry); + try_fixing_stuff(&mut results, &args, ®istry, &source_map); } let worst_status = results.worst_status(); @@ -226,7 +230,7 @@ fn main() { reporter.report(&results, &args, ®istry); } - if !args.quiet && !any_reports_to_stdout { + if !args.quiet && !args.succinct && !any_reports_to_stdout { let _ = writeln!( std::io::stdout(), "Ran {} checks in {:.3}s", @@ -263,7 +267,14 @@ fn list_checks(args: &Args, registry: &Registry<'static>, profile: &fontspector_ let checks: Vec<_> = checks .iter() .flat_map(|check| registry.checks.get(check)) - .map(|check| json!({ "id": check.id, "title": check.title })) + .map(|check| { + json!({ + "id": check.id, + "title": check.title, + "hotfix": check.hotfix.is_some(), + "source_fix": check.fix_source.is_some(), + }) + }) .collect(); if checks.is_empty() { continue; @@ -280,13 +291,20 @@ fn list_checks(args: &Args, registry: &Registry<'static>, profile: &fontspector_ for (section, checks) in checks_per_section.iter() { termimad::print_text(&format!("\n# {section:}\n\n")); let mut table = "|Check ID|Title|\n|---|---|\n".to_string(); + #[allow(clippy::indexing_slicing, clippy::unwrap_used)] + // We know these keys are present, we made them for check in checks { - #[allow(clippy::unwrap_used)] // We know these keys are present, we made them - table.push_str(&format!( - "|{}|{}|\n", - check.get("id").unwrap().as_str().unwrap(), - check.get("title").unwrap().as_str().unwrap() - )); + let mut id = check["id"].as_str().unwrap().to_string(); + let can_hotfix = check["hotfix"].as_bool().unwrap_or(false); + let can_source_fix = check["source_fix"].as_bool().unwrap_or(false); + if can_hotfix && can_source_fix { + id = format!("{id} [H,S]"); + } else if can_hotfix { + id = format!("{id} [H]"); + } else if can_source_fix { + id = format!("{id} [S]"); + } + table.push_str(&format!("|{}|{}|\n", id, check["title"].as_str().unwrap())); } termimad::print_text(&table); } @@ -391,15 +409,27 @@ fn group_inputs(args: &mut Args) -> Vec { .collect() } -fn try_fixing_stuff(results: &mut RunResults, args: &Args, registry: &Registry) { +// We have to consider sources and binaries together, because we're borrowing the +// CheckResult mutably, and we can't have two mutable borrows of the same thing. +struct FixJob<'a> { + hotfix: Option<&'a HotfixFunction>, // The hotfix function, if any + source_fix: Option<&'a FixSourceFunction>, // The source fix function, if any + result: &'a mut CheckResult, // The result to fix +} + +fn try_fixing_stuff( + results: &mut RunResults, + args: &Args, + registry: &Registry, + source_map: &HashMap, +) { let failed_checks = results .iter_mut() .filter(|x| x.worst_status() >= StatusCode::Warn) .collect::>(); // Group the fixes by filename because we want to provide testables - // // let mut fix_sources = HashMap::new(); - let mut fix_binaries: HashMap> = - HashMap::new(); + let mut fix_jobs: HashMap> = HashMap::new(); + for result in failed_checks.into_iter() { let Some(check) = registry.checks.get(&result.check_id) else { log::warn!( @@ -408,39 +438,94 @@ fn try_fixing_stuff(results: &mut RunResults, args: &Args, registry: &Registry) ); continue; }; - if let (Some(hotfix), Some(filename)) = (check.hotfix, result.filename.as_ref()) { - if args.hotfix { - fix_binaries.entry(filename.clone()).or_default().push(( - check.id.to_string(), - hotfix, - result, - )); - } - } + let Some(result_file) = result.filename.clone() else { + continue; + }; + let fix_job = FixJob { + hotfix: if args.hotfix { check.hotfix } else { None }, + source_fix: if args.fix_sources { + check.fix_source + } else { + None + }, + result, + }; + fix_jobs + .entry(result_file.clone()) + .or_default() + .push(fix_job); } - for (file, fixes) in fix_binaries.into_iter() { - let mut testable = Testable::new(&file).unwrap_or_else(|e| { - log::error!("Could not load files from {file:?}: {e:}"); - std::process::exit(1) - }); - let mut modified = false; - for (id, fix, result) in fixes.into_iter() { - log::info!("Trying to fix {file} with {id}"); - result.hotfix_result = match fix(&mut testable) { - Ok(hotfix_behaviour) => { - modified |= hotfix_behaviour; - Some(FixResult::Fixed) + for (file, fixes) in fix_jobs.into_iter() { + let Ok(mut testable) = Testable::new(&file) else { + continue; + }; + let mut source: Option = if !args.fix_sources { + None + } else { + find_source(&file, source_map) + }; + let mut source_modified = false; + let mut binary_modified = false; + for fix_job in fixes.into_iter() { + if let Some(hotfix_fn) = fix_job.hotfix { + log::info!("Trying to hoxfix {file} with {}", fix_job.result.check_id); + fix_job.result.hotfix_result = match hotfix_fn(&mut testable) { + Ok(hotfix_behaviour) => { + binary_modified |= hotfix_behaviour; + Some(FixResult::Fixed) + } + Err(e) => Some(FixResult::FixError(e.to_string())), + } + } + if let Some(sourcefix_fn) = fix_job.source_fix { + if let Some(ref mut source) = &mut source { + log::info!( + "Trying to fix source {} with {}", + source.filename(), + fix_job.result.check_id + ); + fix_job.result.sourcefix_result = match sourcefix_fn(source) { + Ok(hotfix_behaviour) => { + source_modified |= hotfix_behaviour; + Some(FixResult::Fixed) + } + Err(e) => Some(FixResult::FixError(e.to_string())), + } } - Err(e) => Some(FixResult::FixError(e.to_string())), } } - if modified { + if binary_modified { // save it testable.save().unwrap_or_else(|e| { log::error!("Could not save file {file:?}: {e:}"); std::process::exit(1) }); } + if source_modified { + // save it + #[allow(clippy::unwrap_used)] // We know this is Some + source.unwrap().save().unwrap_or_else(|e| { + log::error!("Could not save file {file:?}: {e:}"); + std::process::exit(1) + }); + } } } + +fn find_source(file: &str, source_map: &HashMap) -> Option { + // Find the source in the source map + let source_path_str = if let Some(source) = source_map.get(file) { + source + } else { + log::warn!("No source file found for {file:?} in source map; cannot fix sources"); + log::warn!("Specify --source-map=binary_file.ttf:source.glyphs on command line or in configuration file to fix sources"); + return None; + }; + let source_path = PathBuf::from(source_path_str); + // Now load it + Some(SourceFile::new(&source_path).unwrap_or_else(|e| { + log::error!("Could not load source file {source_path:?}: {e:}"); + std::process::exit(1) + })) +} diff --git a/fontspector-cli/src/reporters/terminal.rs b/fontspector-cli/src/reporters/terminal.rs index 7c0c415b..5f7dae5a 100644 --- a/fontspector-cli/src/reporters/terminal.rs +++ b/fontspector-cli/src/reporters/terminal.rs @@ -59,7 +59,7 @@ impl Reporter for TerminalReporter { } if self.succinct { - let _ = writeln!( + let _ = write!( std::io::stdout(), "{:}: {:} {:} [{}]", Path::new(filename) @@ -73,6 +73,13 @@ impl Reporter for TerminalReporter { .map(|r| colored_status(r.severity, r.code.as_deref())) .join(" ") ); + if result.hotfix_result == Some(FixResult::Fixed) { + termimad::print_inline(" [hotfixed]"); + } + if result.sourcefix_result == Some(FixResult::Fixed) { + termimad::print_inline(" [source fixed]"); + } + let _ = writeln!(std::io::stdout()); continue; } diff --git a/profile-googlefonts/Cargo.toml b/profile-googlefonts/Cargo.toml index 5bd56d5a..a56c7c30 100644 --- a/profile-googlefonts/Cargo.toml +++ b/profile-googlefonts/Cargo.toml @@ -55,6 +55,8 @@ image = { version = "0.25.5", default-features = false, features = [ "gif", ] } harfrust = { workspace = true } +norad.workspace = true +glyphslib.workspace = true [lints] workspace = true diff --git a/profile-googlefonts/src/checks/googlefonts/use_typo_metrics.rs b/profile-googlefonts/src/checks/googlefonts/use_typo_metrics.rs index 71e942c2..3a7e521a 100644 --- a/profile-googlefonts/src/checks/googlefonts/use_typo_metrics.rs +++ b/profile-googlefonts/src/checks/googlefonts/use_typo_metrics.rs @@ -2,7 +2,9 @@ use fontations::{ read::{tables::os2::SelectionFlags, TableProvider}, write::from_obj::ToOwnedTable, }; -use fontspector_checkapi::{prelude::*, skip, testfont, FileTypeConvert}; +use fontspector_checkapi::{ + prelude::*, skip, source::find_or_add_cp, testfont, FileTypeConvert, Source, SourceFile, +}; #[check( id = "googlefonts/use_typo_metrics", @@ -28,6 +30,7 @@ use fontspector_checkapi::{prelude::*, skip, testfont, FileTypeConvert}; proposal = "https://github.com/fonttools/fontbakery/issues/3241", title = "OS/2.fsSelection bit 7 (USE_TYPO_METRICS) is set in all fonts.", hotfix = fix_use_typo_metrics, + fix_source = sourcefix_use_typo_metrics, )] fn use_typo_metrics(t: &Testable, context: &Context) -> CheckFnResult { let f = testfont!(t); @@ -56,3 +59,36 @@ fn fix_use_typo_metrics(t: &mut Testable) -> FixFnResult { t.set(f.rebuild_with_new_table(&os2)?); Ok(true) } + +fn sourcefix_use_typo_metrics(s: &mut SourceFile) -> FixFnResult { + fn fix_a_ufo(font: &mut norad::Font) -> FixFnResult { + if let Some(selection) = font.font_info.open_type_os2_selection.as_mut() { + if !selection.contains(&7) { + log::info!("Adding OS/2.fsSelection bit 7 (USE_TYPO_METRICS) to UFO font."); + selection.push(7); + Ok(true) + } else { + Ok(false) + } + } else { + log::info!("Setting OS/2.fsSelection bit 7 (USE_TYPO_METRICS) in UFO font."); + font.font_info.open_type_os2_selection = Some(vec![7]); + Ok(true) + } + } + fn fix_custom_parameters(cps: &mut Vec) -> FixFnResult { + find_or_add_cp(cps, "Use Typo Metrics", glyphslib::Plist::Integer(1)) + } + match s.source { + Source::Ufo(ref mut font) => fix_a_ufo(font), + Source::Designspace(ref mut ds) => ds.apply_fix(&fix_a_ufo), + Source::Glyphs(ref mut font) => match &mut **font { + glyphslib::Font::Glyphs2(glyphs2) => { + fix_custom_parameters(&mut glyphs2.custom_parameters) + } + glyphslib::Font::Glyphs3(glyphs3) => { + fix_custom_parameters(&mut glyphs3.custom_parameters) + } + }, + } +} diff --git a/profile-universal/Cargo.toml b/profile-universal/Cargo.toml index 9732d65c..3416239f 100644 --- a/profile-universal/Cargo.toml +++ b/profile-universal/Cargo.toml @@ -36,6 +36,8 @@ hashbrown = { workspace = true } kurbo = { workspace = true } stringcase = "0.4.0" fontdrasil = "0.4.0" +norad.workspace = true +glyphslib.workspace = true [lints] workspace = true diff --git a/profile-universal/src/checks/linegaps.rs b/profile-universal/src/checks/linegaps.rs index 06c1c540..a54e7527 100644 --- a/profile-universal/src/checks/linegaps.rs +++ b/profile-universal/src/checks/linegaps.rs @@ -1,5 +1,14 @@ -use fontations::skrifa::raw::TableProvider; -use fontspector_checkapi::{prelude::*, testfont, FileTypeConvert}; +use fontations::{ + skrifa::raw::TableProvider, + write::{ + from_obj::ToOwnedTable, + tables::{hhea, os2::Os2}, + FontBuilder, + }, +}; +use fontspector_checkapi::{ + prelude::*, source::find_or_add_cp, testfont, FileTypeConvert, Source, SourceFile, +}; #[check( id = "linegaps", @@ -17,7 +26,9 @@ use fontspector_checkapi::{prelude::*, testfont, FileTypeConvert}; ", proposal = "https://github.com/fonttools/fontbakery/issues/4133", proposal = "https://googlefonts.github.io/gf-guide/metrics.html", - title = "Checking Vertical Metric linegaps." + title = "Checking Vertical Metric linegaps.", + hotfix = fix_linegaps, + fix_source = sourcefix_linegaps, )] fn linegaps(t: &Testable, _context: &Context) -> CheckFnResult { let f = testfont!(t); @@ -39,3 +50,69 @@ fn linegaps(t: &Testable, _context: &Context) -> CheckFnResult { } return_result(problems) } + +fn fix_linegaps(t: &mut Testable) -> FixFnResult { + let f = testfont!(t); + let mut hhea: hhea::Hhea = f.font().hhea()?.to_owned_table(); + let mut changed = false; + + if hhea.line_gap.to_i16() != 0 { + hhea.line_gap = 0.into(); + changed = true; + } + + let mut os2: Os2 = f.font().os2()?.to_owned_table(); + if os2.s_typo_line_gap != 0 { + os2.s_typo_line_gap = 0; + changed = true; + } + + if changed { + let mut builder = FontBuilder::new(); + builder.add_table(&hhea)?; + builder.add_table(&os2)?; + builder.copy_missing_tables(f.font()); + let new_bytes = builder.build(); + t.set(new_bytes); + } + + Ok(changed) +} + +fn sourcefix_linegaps(s: &mut SourceFile) -> FixFnResult { + fn fix_a_ufo(font: &mut norad::Font) -> FixFnResult { + let was_broken = (font.font_info.open_type_hhea_line_gap.is_some() + && font.font_info.open_type_hhea_line_gap != Some(0)) + || (font.font_info.open_type_os2_typo_line_gap.is_some() + && font.font_info.open_type_os2_typo_line_gap != Some(0)); + font.font_info.open_type_hhea_line_gap = Some(0); + font.font_info.open_type_os2_typo_line_gap = Some(0); + Ok(was_broken) + } + fn fix_custom_parameters(cps: &mut Vec) -> FixFnResult { + Ok( + find_or_add_cp(cps, "typoLineGap", glyphslib::Plist::Integer(0))? + || find_or_add_cp(cps, "hheaLineGap", glyphslib::Plist::Integer(0))?, + ) + } + match s.source { + Source::Ufo(ref mut font) => fix_a_ufo(font), + Source::Designspace(ref mut ds) => ds.apply_fix(&fix_a_ufo), + Source::Glyphs(ref mut font) => match &mut **font { + glyphslib::Font::Glyphs2(glyphs2) => { + let mut changed = false; + for master in glyphs2.masters.iter_mut() { + changed |= fix_custom_parameters(&mut master.custom_parameters)?; + } + Ok(changed) + } + glyphslib::Font::Glyphs3(glyphs3) => { + let mut changed = false; + for master in glyphs3.masters.iter_mut() { + changed |= fix_custom_parameters(&mut master.custom_parameters)?; + } + Ok(changed) + } + }, + } +} diff --git a/profile-universal/src/checks/soft_hyphen.rs b/profile-universal/src/checks/soft_hyphen.rs index af1ea703..1298728f 100644 --- a/profile-universal/src/checks/soft_hyphen.rs +++ b/profile-universal/src/checks/soft_hyphen.rs @@ -1,4 +1,4 @@ -use fontspector_checkapi::{prelude::*, testfont, FileTypeConvert}; +use fontspector_checkapi::{prelude::*, testfont, FileTypeConvert, Source, SourceFile}; #[check( id = "soft_hyphen", @@ -21,7 +21,8 @@ use fontspector_checkapi::{prelude::*, testfont, FileTypeConvert}; ", proposal = "https://github.com/fonttools/fontbakery/issues/4046", proposal = "https://github.com/fonttools/fontbakery/issues/3486", - title = "Does the font contain a soft hyphen?" + title = "Does the font contain a soft hyphen?", + fix_source = sourcefix_softhyphen, )] fn soft_hyphen(t: &Testable, context: &Context) -> CheckFnResult { let f = testfont!(t); @@ -31,9 +32,47 @@ fn soft_hyphen(t: &Testable, context: &Context) -> CheckFnResult { Status::just_one_pass() }) } -// def check_soft_hyphen(ttFont): -// """Does the font contain a soft hyphen?""" -// if 0x00AD in ttFont["cmap"].getBestCmap().keys(): -// yield WARN, Message("softhyphen", "This font has a 'Soft Hyphen' character.") -// else: -// yield PASS, "Looks good!" + +fn sourcefix_softhyphen(s: &mut SourceFile) -> FixFnResult { + fn fix_a_ufo(font: &mut norad::Font) -> FixFnResult { + let soft_hyphen_glyph = font + .default_layer() + .iter() + .find(|g| g.codepoints.contains(0xAD as char)) + .map(|g| g.name().to_string()); + if let Some(name) = soft_hyphen_glyph { + log::info!("Removing soft hyphen glyph '{name}' from UFO file."); + font.default_layer_mut().remove_glyph(&name); + Ok(true) + } else { + log::info!("No soft hyphen glyph found in UFO file."); + Ok(false) + } + } + match s.source { + Source::Ufo(ref mut font) => fix_a_ufo(font), + Source::Designspace(ref mut ds) => ds.apply_fix(&fix_a_ufo), + Source::Glyphs(ref mut font) => match &mut **font { + glyphslib::Font::Glyphs2(glyphs2) => { + let had_one = glyphs2.glyphs.iter().any(|g| g.unicode.contains(&0xAD)); + if !had_one { + log::info!("No soft hyphen glyph found in Glyphs file."); + return Ok(false); + } + glyphs2.glyphs.retain(|g| !g.unicode.contains(&0xAD)); + log::info!("Removing soft hyphen glyph from Glyphs file."); + Ok(true) + } + glyphslib::Font::Glyphs3(glyphs3) => { + let had_one = glyphs3.glyphs.iter().any(|g| g.unicode.contains(&0xAD)); + if !had_one { + log::info!("No soft hyphen glyph found in Glyphs file."); + return Ok(false); + } + glyphs3.glyphs.retain(|g| !g.unicode.contains(&0xAD)); + log::info!("Removing soft hyphen glyph from Glyphs file."); + Ok(true) + } + }, + } +} diff --git a/profile-universal/src/checks/valid_glyphnames.rs b/profile-universal/src/checks/valid_glyphnames.rs index e4f873b1..03fddfe9 100644 --- a/profile-universal/src/checks/valid_glyphnames.rs +++ b/profile-universal/src/checks/valid_glyphnames.rs @@ -1,7 +1,7 @@ use std::collections::HashSet; use fontations::skrifa::raw::{types::Version16Dot16, TableProvider}; -use fontspector_checkapi::{prelude::*, skip, testfont, FileTypeConvert}; +use fontspector_checkapi::{prelude::*, skip, testfont, FileTypeConvert, Source, SourceFile}; use itertools::Itertools; enum NameValidity { @@ -49,7 +49,8 @@ fn test_glyph_name(s: &str) -> NameValidity { https://github.com/adobe-type-tools/agl-specification Glyph names must also be unique, as duplicate glyph names prevent font installation on Mac OS X.", - proposal = "https://github.com/fonttools/fontbakery/issues/2832" + proposal = "https://github.com/fonttools/fontbakery/issues/2832", + fix_source = sourcefix_valid_glyphnames, )] fn valid_glyphnames(f: &Testable, _context: &Context) -> CheckFnResult { let font = testfont!(f); @@ -169,3 +170,58 @@ fn valid_glyphnames(f: &Testable, _context: &Context) -> CheckFnResult { return_result(problems) } + +fn sourcefix_valid_glyphnames(s: &mut SourceFile) -> FixFnResult { + fn fix_a_ufo(font: &mut norad::Font) -> FixFnResult { + let mut changed = false; + let mut renames = vec![]; + let layer = font.default_layer_mut(); + if let Some(space_glyph) = layer + .iter() + .find(|g| g.codepoints.contains(' ')) + .map(|x| x.name().as_str()) + { + if space_glyph != "space" { + renames.push((space_glyph.to_string(), "space")); + } + } + if let Some(nbspace_glyph) = layer + .iter() + .find(|g| g.codepoints.contains(0xa0 as char)) + .map(|x| x.name().as_str()) + { + if nbspace_glyph != "nbspace" { + renames.push((nbspace_glyph.to_string(), "nbspace")); + } + } + for (old_name, new_name) in renames { + layer.rename_glyph(&old_name, new_name, true).map_err(|e| { + FontspectorError::Fix(format!( + "Failed to rename glyph {old_name} to {new_name}: {e}" + )) + })?; + changed = true; + } + + Ok(changed) + } + match s.source { + Source::Ufo(ref mut font) => fix_a_ufo(font), + Source::Designspace(ref mut ds) => ds.apply_fix(&fix_a_ufo), + Source::Glyphs(ref mut font) => { + let font = font.font_mut(); + let mut changed = false; + for glyph in font.glyphs_mut().iter_mut() { + if glyph.unicode().contains(&0x20u32) && glyph.name() != "space" { + glyph.set_name("space".to_string()); + changed = true; + } + if glyph.unicode().contains(&0xa0u32) && glyph.name() != "nbspace" { + glyph.set_name("nbspace".to_string()); + changed = true; + } + } + Ok(changed) + } + } +}