From 165541e3bc08881774377c08dbb3ede8a1171181 Mon Sep 17 00:00:00 2001 From: Garret Rieger Date: Wed, 5 Aug 2026 20:06:49 +0000 Subject: [PATCH 1/3] Update to fontations head to get latest version of the IFT client. --- MODULE.bazel | 8 +- fontations/Cargo.lock | 753 ++++++++++++++++++----------------- third_party/fontations.BUILD | 21 +- 3 files changed, 401 insertions(+), 381 deletions(-) diff --git a/MODULE.bazel b/MODULE.bazel index 69f8333f..13c44f83 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -79,10 +79,10 @@ http_archive( # Fontations http_archive( name = "fontations", - urls = ["https://github.com/googlefonts/fontations/archive/1a8baba89aa129a899bc83b0b610881190f8bbad.zip"], - strip_prefix = "fontations-1a8baba89aa129a899bc83b0b610881190f8bbad", + urls = ["https://github.com/googlefonts/fontations/archive/f95a2db5b2367ddbe752884c39e13b62a2ea39bd.zip"], + strip_prefix = "fontations-f95a2db5b2367ddbe752884c39e13b62a2ea39bd", build_file = "//third_party:fontations.BUILD", - integrity = "sha256-vyDtQ7LJHdb+l0dz8IYs2jvw9bnQxNvhaZgyRLfnlTA=", + integrity = "sha256-ge23kFnixCUiaDdsgf2SZ1v9sqPdduEjss5rjrgUbUs=", ) @@ -101,7 +101,7 @@ crate.from_cargo( "@fontations//:font-types/Cargo.toml", "@fontations//:fuzz/Cargo.toml", "@fontations//:incremental-font-transfer/Cargo.toml", - "@fontations//:klippa/Cargo.toml", + "@fontations//:skera/Cargo.toml", "@fontations//:otexplorer/Cargo.toml", "@fontations//:read-fonts/Cargo.toml", "@fontations//:shared-brotli-patch-decoder/Cargo.toml", diff --git a/fontations/Cargo.lock b/fontations/Cargo.lock index cf309cdf..1716d95c 100644 --- a/fontations/Cargo.lock +++ b/fontations/Cargo.lock @@ -42,19 +42,10 @@ dependencies = [ ] [[package]] -name = "allocator-api2" -version = "0.2.21" +name = "anes" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" - -[[package]] -name = "ansi_term" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" -dependencies = [ - "winapi", -] +checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" [[package]] name = "anstream" @@ -121,17 +112,6 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi", -] - [[package]] name = "autocfg" version = "1.4.0" @@ -164,18 +144,23 @@ dependencies = [ [[package]] name = "bincode" -version = "1.3.3" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +checksum = "36eaf5d7b090263e8150820482d5d93cd964a81e4019913c972f4edcc6edb740" dependencies = [ + "bincode_derive", "serde", + "unty", ] [[package]] -name = "bitflags" -version = "1.3.2" +name = "bincode_derive" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +checksum = "bf95709a440f45e986983918d0e8a1f30a9b1df04918fc828670606804ac3c09" +dependencies = [ + "virtue", +] [[package]] name = "bitflags" @@ -183,6 +168,39 @@ version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" +[[package]] +name = "bitvec" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddcec3d12c579d40898fe0a9a358a803c23e9c52ca3c425707f81c9436211837" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + +[[package]] +name = "brotli" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc97b8f16f944bba54f0433f07e30be199b6dc2bd25937444bbad560bcea29bd" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", + "brotli-decompressor 4.0.3", +] + +[[package]] +name = "brotli-decompressor" +version = "4.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a334ef7c9e23abf0ce748e8cd309037da93e606ad52eb372e4ce327a0dcfbdfd" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", +] + [[package]] name = "brotli-decompressor" version = "5.0.0" @@ -234,9 +252,15 @@ checksum = "3fa76293b4f7bb636ab88fd78228235b5248b4d05cc589aed610f954af5d7c7a" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.100", ] +[[package]] +name = "bytes" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04" + [[package]] name = "cast" version = "0.3.0" @@ -261,14 +285,41 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] -name = "clap" -version = "2.34.0" +name = "chacha20" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" +checksum = "d524456ba66e72eb8b115ff89e01e497f8e6d11d78b70b1aa13c0fbd97540a81" dependencies = [ - "bitflags 1.3.2", - "textwrap 0.11.0", - "unicode-width", + "cfg-if", + "cpufeatures", + "rand_core", +] + +[[package]] +name = "ciborium" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42e69ffd6f0917f5c029256a24d0161db17cea3997d185db0d35926308770f0e" +dependencies = [ + "ciborium-io", + "ciborium-ll", + "serde", +] + +[[package]] +name = "ciborium-io" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05afea1e0a06c9be33d539b876f1ce3692f4afea2cb41f740e7743225ed1c757" + +[[package]] +name = "ciborium-ll" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9" +dependencies = [ + "ciborium-io", + "half", ] [[package]] @@ -302,7 +353,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn", + "syn 2.0.100", ] [[package]] @@ -326,27 +377,33 @@ dependencies = [ "libm", ] +[[package]] +name = "cpufeatures" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b2a41393f66f16b0823bb79094d54ac5fbd34ab292ddafb9a0456ac9f87d201" +dependencies = [ + "libc", +] + [[package]] name = "criterion" -version = "0.3.6" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b01d6de93b2b6c65e17c634a26653a29d107b3c98c607c765bf38d041531cd8f" +checksum = "e1c047a62b0cc3e145fa84415a3191f628e980b194c2755aa12300a4e6cbd928" dependencies = [ - "atty", + "anes", "cast", - "clap 2.34.0", + "ciborium", + "clap", "criterion-plot", - "csv", "itertools", - "lazy_static", "num-traits", "oorandom", "plotters", "rayon", "regex", "serde", - "serde_cbor", - "serde_derive", "serde_json", "tinytemplate", "walkdir", @@ -354,9 +411,9 @@ dependencies = [ [[package]] name = "criterion-plot" -version = "0.4.5" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2673cc8207403546f45f5fd319a974b1e6983ad1a3ee7e6041650013be041876" +checksum = "9b1bcc0dc7dfae599d84ad0b1a55f80cde8af3725da8313b528da95ef783e338" dependencies = [ "cast", "itertools", @@ -388,51 +445,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] -name = "csv" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acdc4883a9c96732e4733212c01447ebd805833b7275a73ca3ee080fd77afdaf" -dependencies = [ - "csv-core", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "csv-core" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d02f3b0da4c6504f86e9cd789d8dbafab48c2321be74e9987593de5a894d93d" -dependencies = [ - "memchr", -] - -[[package]] -name = "data-encoding" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "575f75dfd25738df5b91b8e43e14d44bda14637a58fae779fd2b064f8bf3e010" - -[[package]] -name = "data-encoding-macro" -version = "0.1.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f9724adfcf41f45bf652b3995837669d73c4d49a1b5ac1ff82905ac7d9b5558" -dependencies = [ - "data-encoding", - "data-encoding-macro-internal", -] - -[[package]] -name = "data-encoding-macro-internal" -version = "0.1.15" +name = "crunchy" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18e4fdb82bd54a12e42fb58a800dcae6b9e13982238ce2296dc3570b92148e1f" -dependencies = [ - "data-encoding", - "syn", -] +checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" [[package]] name = "derive_arbitrary" @@ -442,7 +458,7 @@ checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.100", ] [[package]] @@ -521,7 +537,7 @@ checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" name = "fauntlet" version = "0.1.0" dependencies = [ - "clap 4.5.31", + "clap", "freetype-rs", "memmap2", "rayon", @@ -530,24 +546,13 @@ dependencies = [ "wild", ] -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "foldhash" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0d2fde1f7b3d48b8395d5f2de76c18a528bd6a9cdde438df747bfcba3e05d6f" - [[package]] name = "font-codegen" version = "0.0.0" dependencies = [ "env_logger", "font-types", + "home", "indexmap", "log", "miette", @@ -557,34 +562,40 @@ dependencies = [ "regex", "rustfmt-wrapper", "serde", - "syn", + "syn 2.0.100", "toml", "xflags", ] [[package]] name = "font-test-data" -version = "0.6.0" +version = "0.8.0" dependencies = [ "font-types", ] [[package]] name = "font-types" -version = "0.10.0" +version = "0.12.2" dependencies = [ "bytemuck", "serde", "serde_json", ] +[[package]] +name = "four-cc" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "795cbfc56d419a7ce47ccbb7504dd9a5b7c484c083c356e797de08bd988d9629" + [[package]] name = "freetype-rs" version = "0.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d228d6de56c90dd7585341f341849441b3490180c62d27133e525eb726809b4" dependencies = [ - "bitflags 2.9.0", + "bitflags", "freetype-sys", "libc", ] @@ -601,35 +612,10 @@ dependencies = [ ] [[package]] -name = "fuchsia-cprng" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" - -[[package]] -name = "futures" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" -dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-channel" -version = "0.3.31" +name = "funty" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" -dependencies = [ - "futures-core", - "futures-sink", -] +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures-core" @@ -637,23 +623,6 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" -[[package]] -name = "futures-executor" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-io" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" - [[package]] name = "futures-macro" version = "0.3.31" @@ -662,15 +631,9 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.100", ] -[[package]] -name = "futures-sink" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" - [[package]] name = "futures-task" version = "0.3.31" @@ -689,13 +652,9 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ - "futures-channel", "futures-core", - "futures-io", "futures-macro", - "futures-sink", "futures-task", - "memchr", "pin-project-lite", "pin-utils", "slab", @@ -716,25 +675,26 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.15" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +checksum = "43a49c392881ce6d5c3b8cb70f98717b7c07aabbdff06687b9030dbfbe2725f8" dependencies = [ "cfg-if", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", + "windows-targets", ] [[package]] name = "getrandom" -version = "0.3.1" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a49c392881ce6d5c3b8cb70f98717b7c07aabbdff06687b9030dbfbe2725f8" +checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" dependencies = [ "cfg-if", "libc", - "wasi 0.13.3+wasi-0.2.2", - "windows-targets", + "r-efi", + "rand_core", ] [[package]] @@ -751,20 +711,20 @@ checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" [[package]] name = "half" -version = "1.8.3" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b43ede17f21864e81be2fa654110bf1e793774238d86ef8555c37e6519c0403" +checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b" +dependencies = [ + "cfg-if", + "crunchy", + "zerocopy", +] [[package]] name = "hashbrown" -version = "0.15.2" +version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" -dependencies = [ - "allocator-api2", - "equivalent", - "foldhash", -] +checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" [[package]] name = "heck" @@ -772,15 +732,6 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - [[package]] name = "hermit-abi" version = "0.5.0" @@ -798,27 +749,27 @@ dependencies = [ [[package]] name = "incremental-font-transfer" -version = "0.1.0" +version = "0.6.0" dependencies = [ "brotlic", - "clap 4.5.31", - "data-encoding", - "data-encoding-macro", + "clap", + "criterion", "font-test-data", "font-types", - "klippa", "read-fonts", "regex", "shared-brotli-patch-decoder", + "skera", "skrifa", + "woff2-patched", "write-fonts", ] [[package]] name = "indexmap" -version = "2.7.1" +version = "2.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c9c992b02b5b4c94ea26e32fe5bccb7aa7d9f390ab5c1221ff895bc7ea8b652" +checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" dependencies = [ "equivalent", "hashbrown", @@ -830,7 +781,7 @@ version = "0.4.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e04d7f318608d35d4b61ddd75cbdaee86b023ebe2bd5a66ee0915f0bf93095a9" dependencies = [ - "hermit-abi 0.5.0", + "hermit-abi", "libc", "windows-sys 0.59.0", ] @@ -849,9 +800,9 @@ checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] name = "itertools" -version = "0.10.5" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" dependencies = [ "either", ] @@ -883,7 +834,7 @@ checksum = "dbc3e0019b0f5f43038cf46471b1312136f29e36f54436c6042c8f155fec8789" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.100", ] [[package]] @@ -905,39 +856,18 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "klippa" -version = "0.1.0" -dependencies = [ - "clap 4.5.31", - "diff", - "fnv", - "font-test-data", - "hashbrown", - "regex", - "skrifa", - "tempdir", - "thiserror", - "write-fonts", -] - [[package]] name = "kurbo" -version = "0.12.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce9729cc38c18d86123ab736fd2e7151763ba226ac2490ec092d1dd148825e32" +checksum = "4b60dfc32f652b926df6192e55525b16d186c69d47876c3ead4da5cc9f8450e2" dependencies = [ "arrayvec", "euclid", + "polycool", "smallvec", ] -[[package]] -name = "lazy_static" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" - [[package]] name = "libc" version = "0.2.170" @@ -1010,13 +940,13 @@ dependencies = [ "is-terminal", "miette-derive", "once_cell", - "owo-colors", + "owo-colors 3.5.0", "supports-color", "supports-hyperlinks", "supports-unicode", "terminal_size", - "textwrap 0.15.2", - "thiserror", + "textwrap", + "thiserror 1.0.69", "unicode-width", ] @@ -1028,7 +958,7 @@ checksum = "49e7bc1560b95a3c4a25d03de42fe76ca718ab92d1a22a55b9b4cf67b3ae635c" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.100", ] [[package]] @@ -1069,9 +999,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.21.0" +version = "1.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde51589ab56b20a6f686b2c68f7a0bd6add753d697abf720d63f8db3ab7b1ad" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" [[package]] name = "oorandom" @@ -1083,9 +1013,8 @@ checksum = "d6790f58c7ff633d8771f42965289203411a5e5c68388703c06e14f24770b41e" name = "otexplorer" version = "0.1.0" dependencies = [ - "ansi_term", - "atty", "font-types", + "owo-colors 4.3.0", "read-fonts", "xflags", ] @@ -1096,6 +1025,18 @@ version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" +[[package]] +name = "owo-colors" +version = "4.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d211803b9b6b570f68772237e415a029d5a50c65d382910b879fb19d3271f94d" + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + [[package]] name = "pin-project-lite" version = "0.2.16" @@ -1142,6 +1083,15 @@ dependencies = [ "plotters-backend", ] +[[package]] +name = "polycool" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50596ddc09eb5ad5f75cacd40209568e66df71baf86e1499a0e99c4cff12a5a6" +dependencies = [ + "arrayvec", +] + [[package]] name = "portable-atomic" version = "1.11.0" @@ -1157,15 +1107,6 @@ dependencies = [ "portable-atomic", ] -[[package]] -name = "ppv-lite86" -version = "0.2.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" -dependencies = [ - "zerocopy", -] - [[package]] name = "pretty_assertions" version = "1.4.1" @@ -1176,6 +1117,15 @@ dependencies = [ "yansi", ] +[[package]] +name = "proc-macro-crate" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f" +dependencies = [ + "toml_edit 0.25.13+spec-1.1.0", +] + [[package]] name = "proc-macro2" version = "1.0.94" @@ -1195,68 +1145,39 @@ dependencies = [ ] [[package]] -name = "rand" -version = "0.4.6" +name = "r-efi" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293" -dependencies = [ - "fuchsia-cprng", - "libc", - "rand_core 0.3.1", - "rdrand", - "winapi", -] +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" [[package]] -name = "rand" -version = "0.8.5" +name = "radium" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha", - "rand_core 0.6.4", -] +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" [[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core 0.6.4", -] - -[[package]] -name = "rand_core" -version = "0.3.1" +name = "rand" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" +checksum = "c7f5fa3a058cd35567ef9bfa5e75732bee0f9e4c55fa90477bef2dfcdbc4be80" dependencies = [ - "rand_core 0.4.2", + "chacha20", + "getrandom 0.4.3", + "rand_core", ] [[package]] name = "rand_core" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" - -[[package]] -name = "rand_core" -version = "0.6.4" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom 0.2.15", -] +checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69" [[package]] name = "rayon" -version = "1.10.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" +checksum = "fb39b166781f92d482534ef4b4b1b2568f42613b53e5b6c160e24cfbfa30926d" dependencies = [ "either", "rayon-core", @@ -1264,33 +1185,26 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.12.1" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91" dependencies = [ "crossbeam-deque", "crossbeam-utils", ] -[[package]] -name = "rdrand" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" -dependencies = [ - "rand_core 0.3.1", -] - [[package]] name = "read-fonts" -version = "0.35.0" +version = "0.42.1" dependencies = [ "bytemuck", "core_maths", "criterion", "font-test-data", "font-types", - "rand 0.8.5", + "once_cell", + "rand", + "read-fonts", "serde", "serde_json", ] @@ -1330,41 +1244,32 @@ version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba39f3699c378cd8970968dcbff9c43159ea4cfbd88d43c00b22f2ef10a435d2" -[[package]] -name = "remove_dir_all" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" -dependencies = [ - "winapi", -] - [[package]] name = "rstest" -version = "0.18.2" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97eeab2f3c0a199bc4be135c36c924b6590b88c377d416494288c14f2db30199" +checksum = "f5a3193c063baaa2a95a33f03035c8a72b83d97a54916055ba22d35ed3839d49" dependencies = [ - "futures", "futures-timer", + "futures-util", "rstest_macros", - "rustc_version", ] [[package]] name = "rstest_macros" -version = "0.18.2" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d428f8247852f894ee1be110b375111b586d4fa431f6c46e64ba5a0dcccbe605" +checksum = "9c845311f0ff7951c5506121a9ad75aec44d083c31583b2ea5a30bcb0b0abba0" dependencies = [ "cfg-if", "glob", + "proc-macro-crate", "proc-macro2", "quote", "regex", "relative-path", "rustc_version", - "syn", + "syn 2.0.100", "unicode-ident", ] @@ -1391,7 +1296,7 @@ checksum = "f1adc9dfed5cc999077978cc7163b9282c5751c8d39827c4ea8c8c220ca5a440" dependencies = [ "serde", "tempfile", - "thiserror", + "thiserror 1.0.69", "toml", "toolchain_find", ] @@ -1402,7 +1307,7 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7178faa4b75a30e269c71e61c353ce2748cf3d76f0c44c393f4e60abf49b825" dependencies = [ - "bitflags 2.9.0", + "bitflags", "errno", "libc", "linux-raw-sys", @@ -1421,6 +1326,17 @@ version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" +[[package]] +name = "safer-bytes" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9814c78d534f27a438fcb57091d6deed0634b60e4e500fee28fe5990adf5ea54" +dependencies = [ + "bytes", + "paste", + "thiserror 1.0.69", +] + [[package]] name = "same-file" version = "1.0.6" @@ -1438,32 +1354,32 @@ checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0" [[package]] name = "serde" -version = "1.0.219" +version = "1.0.229" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" +checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba" dependencies = [ + "serde_core", "serde_derive", ] [[package]] -name = "serde_cbor" -version = "0.11.2" +name = "serde_core" +version = "1.0.229" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5" +checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48" dependencies = [ - "half", - "serde", + "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.219" +version = "1.0.229" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" +checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 3.0.3", ] [[package]] @@ -1489,10 +1405,10 @@ dependencies = [ [[package]] name = "shared-brotli-patch-decoder" -version = "0.1.0" +version = "0.1.4" dependencies = [ - "brotli-decompressor", - "brotlic-sys", + "brotli-decompressor 5.0.0", + "cc", "cfg-if", ] @@ -1508,9 +1424,26 @@ version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbbb5d9659141646ae647b42fe094daf6c6192d1620870b449d9557f748b2daa" +[[package]] +name = "skera" +version = "0.5.1" +dependencies = [ + "clap", + "criterion", + "diff", + "font-test-data", + "hashbrown", + "rayon", + "rstest", + "skrifa", + "tempfile", + "thiserror 2.0.19", + "write-fonts", +] + [[package]] name = "skrifa" -version = "0.37.0" +version = "0.45.1" dependencies = [ "bytemuck", "core_maths", @@ -1589,15 +1522,22 @@ dependencies = [ ] [[package]] -name = "tempdir" -version = "0.3.7" +name = "syn" +version = "3.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" +checksum = "53e9bae58849f64dfa4f5d5ae372c8341f7305f82a3868709269343628b659a3" dependencies = [ - "rand 0.4.6", - "remove_dir_all", + "proc-macro2", + "quote", + "unicode-ident", ] +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + [[package]] name = "tempfile" version = "3.18.0" @@ -1622,15 +1562,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "textwrap" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" -dependencies = [ - "unicode-width", -] - [[package]] name = "textwrap" version = "0.15.2" @@ -1648,7 +1579,16 @@ version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ - "thiserror-impl", + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09a43598840e33d5b0331f38c5e30d13bb11c11210a4b58f0d9b18a5a5eefcd9" +dependencies = [ + "thiserror-impl 2.0.19", ] [[package]] @@ -1659,7 +1599,18 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.100", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43cbfe0cf76104d42a574802844187e84a305e531ed54455f11fbde0f10541cd" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", ] [[package]] @@ -1680,8 +1631,8 @@ checksum = "cd87a5cdd6ffab733b2f74bc4fd7ee5fff6634124999ac278c35fc78c6120148" dependencies = [ "serde", "serde_spanned", - "toml_datetime", - "toml_edit", + "toml_datetime 0.6.8", + "toml_edit 0.22.24", ] [[package]] @@ -1693,6 +1644,15 @@ dependencies = [ "serde", ] +[[package]] +name = "toml_datetime" +version = "1.1.1+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3165f65f62e28e0115a00b2ebdd37eb6f3b641855f9d636d3cd4103767159ad7" +dependencies = [ + "serde_core", +] + [[package]] name = "toml_edit" version = "0.22.24" @@ -1702,8 +1662,29 @@ dependencies = [ "indexmap", "serde", "serde_spanned", - "toml_datetime", - "winnow", + "toml_datetime 0.6.8", + "winnow 0.7.3", +] + +[[package]] +name = "toml_edit" +version = "0.25.13+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6975367e4d2ef766d86af01ffad14b622fecc8d4357a998fbc4deb6e9bacaf9b" +dependencies = [ + "indexmap", + "toml_datetime 1.1.1+spec-1.1.0", + "toml_parser", + "winnow 1.0.4", +] + +[[package]] +name = "toml_parser" +version = "1.1.3+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d38ac1cf9b95face32296c0a3ede1fdc270627c9d9c02a7274dd6d960dc4d56" +dependencies = [ + "winnow 1.0.4", ] [[package]] @@ -1737,6 +1718,12 @@ version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" +[[package]] +name = "unty" +version = "0.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d49784317cd0d1ee7ec5c716dd598ec5b4483ea832a2dced265471cc0f690ae" + [[package]] name = "utf8parse" version = "0.2.2" @@ -1749,6 +1736,12 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" +[[package]] +name = "virtue" +version = "0.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "051eb1abcf10076295e815102942cc58f9d5e3b4560e46e53c21e8ff6f3af7b1" + [[package]] name = "walkdir" version = "2.5.0" @@ -1759,12 +1752,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - [[package]] name = "wasi" version = "0.13.3+wasi-0.2.2" @@ -1796,7 +1783,7 @@ dependencies = [ "log", "proc-macro2", "quote", - "syn", + "syn 2.0.100", "wasm-bindgen-shared", ] @@ -1818,7 +1805,7 @@ checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.100", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -1973,18 +1960,41 @@ dependencies = [ "memchr", ] +[[package]] +name = "winnow" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b97319f7b8343df12cc98938e5c3eb436064524c8d2b4e30a1d3a36eecdf81" +dependencies = [ + "memchr", +] + [[package]] name = "wit-bindgen-rt" version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c" dependencies = [ - "bitflags 2.9.0", + "bitflags", +] + +[[package]] +name = "woff2-patched" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb9e0d17aedee2afac15749407e107edce8485f57b7ad9fb929f0bbdf2c28f24" +dependencies = [ + "bitvec", + "brotli", + "bytes", + "four-cc", + "safer-bytes", + "thiserror 1.0.69", ] [[package]] name = "write-fonts" -version = "0.43.0" +version = "0.51.0" dependencies = [ "bincode", "diff", @@ -1997,12 +2007,21 @@ dependencies = [ "log", "nu-ansi-term", "pretty_assertions", - "rand 0.8.5", + "rand", "read-fonts", "rstest", "serde", ] +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + [[package]] name = "xflags" version = "0.3.2" @@ -2026,20 +2045,20 @@ checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" [[package]] name = "zerocopy" -version = "0.8.23" +version = "0.8.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd97444d05a4328b90e75e503a34bad781f14e28a823ad3557f0750df1ebcbc6" +checksum = "0894878a5fa3edfd6da3f88c4805f4c8558e2b996227a3d864f47fe11e38282c" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.23" +version = "0.8.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6352c01d0edd5db859a63e2605f4ea3183ddbd15e2c4a9e7d32184df75e4f154" +checksum = "88d2b8d9c68ad2b9e4340d7832716a4d21a22a1154777ad56ea55c51a9cf3831" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.100", ] diff --git a/third_party/fontations.BUILD b/third_party/fontations.BUILD index 2fdb264a..21db3f98 100644 --- a/third_party/fontations.BUILD +++ b/third_party/fontations.BUILD @@ -21,6 +21,7 @@ rust_binary( ":shared_brotli_patch_decoder", ":skrifa", "@fontations_deps//:clap", + "@fontations_deps//:woff2-patched", ], ) @@ -41,11 +42,13 @@ rust_binary( deps = [ ":font_types", ":incremental_font_transfer", - ":klippa", + ":shared_brotli_patch_decoder", + ":skera", ":read_fonts", ":skrifa", "@fontations_deps//:clap", "@fontations_deps//:regex", + "@fontations_deps//:woff2-patched", ], ) @@ -57,13 +60,13 @@ rust_library( ), deps = [ ":font_types", - ":klippa", + ":skera", ":read_fonts", ":shared_brotli_patch_decoder", ":skrifa", ":write_fonts", - "@fontations_deps//:data-encoding", - "@fontations_deps//:data-encoding-macro", + #"@fontations_deps//:data-encoding", + #"@fontations_deps//:data-encoding-macro", ], ) @@ -84,17 +87,15 @@ rust_library( ) rust_library( - name = "klippa", - srcs = glob(include = ["klippa/src/**/*.rs"]), + name = "skera", + srcs = glob(include = ["skera/src/**/*.rs"]), deps = [ ":skrifa", ":write_fonts", - "@fontations_deps//:fnv", "@fontations_deps//:hashbrown", "@fontations_deps//:regex", "@fontations_deps//:thiserror", ], - # crate_features = ["std", "bytemuck"], ) rust_library( @@ -152,8 +153,8 @@ rust_library( "c-brotli", ], deps = [ - "@fontations_deps//:brotlic", - "@fontations_deps//:brotlic-sys", "@fontations_deps//:cfg-if", + "@fontations_deps//:cc", + "@brotli//:brotlidec", ], ) From d943cb26fb226a8419173e946476dbc2b1460783 Mon Sep 17 00:00:00 2001 From: Garret Rieger Date: Wed, 5 Aug 2026 20:12:35 +0000 Subject: [PATCH 2/3] Remove references to format 1 patch maps which are dropped from the spec. --- README.md | 1 - docs/experimental/compiler.md | 33 +++++++++++++++------------------ ift/proto/ift_table.h | 7 ------- 3 files changed, 15 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index a5f4dafd..e5d2fa69 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,6 @@ found [here](https://w3c.github.io/IFT/Overview.html). The current implementation is capable of producing a spec-compliant encoding, but does not yet fully support all aspects of the specification. Notably: -* Format 1 patch maps are not generated. * Not all encoder config options are supported yet. These are marked as unimplemented in the schema. Additionally, the produced encodings may not be fully optimized for minimal size yet. diff --git a/docs/experimental/compiler.md b/docs/experimental/compiler.md index 0eae4126..4830d376 100644 --- a/docs/experimental/compiler.md +++ b/docs/experimental/compiler.md @@ -137,33 +137,33 @@ Process: glyph ids each one contains. Patch sets are cached using design space as a key. The patches are formed by first instancing the original font to the patch set's design space and then collecting the specified per glyph data into each patch. Lastly, each patch set is assigned a unique compatibility ID. - + 2. Generate a unique compatibility id for this node. Will be included in all table keyed patches that apply to this node. - + 3. Generate the list of outgoing edges and jumps. Find the set of segments that are not included in the current node and generate an edge for each. Additionally generate any multi segment edges required by the encoder config jump ahead and use prefetch list settings. Each edge is described by a subset definition that it adds plus one or more jumps as described in the concepts section. - + 4. If in mixed mode, then generate the glyph keyed patch map using the list of patches from step 1. The encoder config specifies the specific conditions for each mapping entry. - + 5. Using the list of edges from step 3 generate the table keyed patch map with one mapping entry per edge. 6. Construct the font binary for this node. First subset the original font to the base subset definition and then add the mapping tables from steps 4 and 5. - + 7. Cache the node font binary using the base subset definition as the key. 8. For each jump in each edge generate the font binary that would result in following that jump by recursively invoking this process where the new base subset definition is the union of this base subset definition and the jumps target subset definition. Once we have the jumps font binary, diff the new font binary against the previous one to produce the table keyed patch for that jump. - + Note: each patch is assigned a unique ID and as an optimization we cache the patch binary by patch id to prevent recreating the same patch multiple times. ID's are assigned sequentially as new patches are encountered during recursion. - + With this recursive process the complete encoding can then be generated by invoking the algorithm on the initial font subset definition. From there the complete graph will be traversed and all required patches will be generated. @@ -192,10 +192,10 @@ To keep the shared tuples correct we subset gvar in two steps (note: this is spe 1. Run instancing only, keeping everything else, this matches the processing done while populating glyph keyed patches and will result in the same shared tuples. - + 2. Subset to the initial subset, with no instancing specified. If there is no specified instancing then harfbuzz will not modify shared tuples. - + #### CFF/CFF2 special casing A similar issue exists with CFF/CFF2, which also contains common outline data that can't be modified by @@ -239,10 +239,10 @@ extension various properties of the extension and extended font are tested to en * cmap, glyph data presence, and equality is used to ensure the encoded font adds the appropriate glyphs after extension. * Number of round trips and total patch loads are checked to ensure the encodings are working efficiently (number of round trips being the most important). - + These tests are designed to prove that the encoder can produce IFT encodings which can be correctly interpreted and extended by a client and result in the desired outcomes in terms of extension and network transfer behaviour. - + For future improvements it would be a good idea to also incorporate rendering and/or shaping tests into the integration test suite. A properly encoded IFT font should have the same shaping and rendering behaviour as the original font. It should be possible to test for this. @@ -257,17 +257,14 @@ non-exhaustive list of some possibilities: * Finish implementing support for all options in the encoder config schema. There's several options which we do not yet have support for. -* Improved patch map compilation to reduce encoded size. The format2 patch map has several tools at it's disposal to - produce compact encodings which we are not yet fully leveraging. - * Additionally, some smaller size reductions could be realized by smartly picking entry ids that reduce the total number of entry deltas needed in the encoding. - + * Correct ordering of table keyed patch map entries. For selecting invalidating patches the spec expects that table keyed entries are ordered by the size of the referenced patch. We do not currently do this in produced encodings. Following the spec expectation will result in better client behaviour when selecting between multiple invalidating patches. - + * For patch map entries that represent multiple segments we construct a disjunctive condition (eg. match if A or B is needed); however, these entries are guaranteed to always be a super set of the single segment entries so it would be better to use conjunctive matching as the multi segment entries should only ever be selected when all included @@ -277,9 +274,9 @@ non-exhaustive list of some possibilities: (for example caching expensive operations). However, there are likely some remaining performance improvement opportunities. Some time should be taken to profile the current execution and identify if there are any easy performance wins. - + * At a higher level, we currently have a two step process for getting an IFT font. 1. Generate segmentation plan, 2. Compile the plan into a font. Ultimately, we would like to have a single tool that would automatically execute these two steps to produce an IFT font given nothing more than an input font. This would include automatically configuring the segmenter so that little to no configuration needs to be provided. - + diff --git a/ift/proto/ift_table.h b/ift/proto/ift_table.h index 74a6c693..455a7b3f 100644 --- a/ift/proto/ift_table.h +++ b/ift/proto/ift_table.h @@ -59,13 +59,6 @@ class IFTTable { hb_face_t* face, absl::string_view ift_table, std::optional iftx_table); - /* - * Converts this abstract representation to the a serialized format. - * Either format 1 or 2: - * https://w3c.github.io/IFT/Overview.html#patch-map-table - */ - absl::StatusOr Serialize() const; - std::vector url_template_; ift::common::CompatId id_; PatchMap patch_map_; From 3080375d12bdf58cf8405d719590a9ab4e09c3ae Mon Sep 17 00:00:00 2001 From: Garret Rieger Date: Wed, 5 Aug 2026 20:14:38 +0000 Subject: [PATCH 3/3] fontations.BUILD Cleanup --- third_party/fontations.BUILD | 2 -- 1 file changed, 2 deletions(-) diff --git a/third_party/fontations.BUILD b/third_party/fontations.BUILD index 21db3f98..ade23812 100644 --- a/third_party/fontations.BUILD +++ b/third_party/fontations.BUILD @@ -65,8 +65,6 @@ rust_library( ":shared_brotli_patch_decoder", ":skrifa", ":write_fonts", - #"@fontations_deps//:data-encoding", - #"@fontations_deps//:data-encoding-macro", ], )