From fafe331a9e4c349cbe8038ec2a6edc18f611fd8d Mon Sep 17 00:00:00 2001 From: Joshua Thijssen Date: Tue, 7 Jan 2025 20:09:53 +0100 Subject: [PATCH] initial vello and other test binaries --- Cargo.lock | 3489 +++++++++++++++-- Cargo.toml | 20 + .../icons/hicolor/scalable/apps/gosub.svg | 1 + .../icons/hicolor/symbolic/apps/gosub.svg | 25 + src/bin/fm.rs | 60 + src/bin/gtk-test.rs | 81 +- src/bin/gtk2-test.rs | 264 ++ src/bin/parley.rs | 274 ++ src/bin/vello-test.rs | 168 + src/flatland.rs | 69 + src/font_manager.rs | 190 +- src/font_manager/font_info.rs | 39 + src/font_manager/manager.rs | 109 + src/font_manager/sources.rs | 20 + src/font_manager/sources/fontique.rs | 100 + src/font_manager/sources/fontkit.rs | 119 + src/font_manager/sources/pango.rs | 101 + src/font_manager/sources/parley.rs | 103 + src/layouter.rs | 17 + src/lib.rs | 4 +- 20 files changed, 4688 insertions(+), 565 deletions(-) create mode 100644 resources/icons/hicolor/scalable/apps/gosub.svg create mode 100644 resources/icons/hicolor/symbolic/apps/gosub.svg create mode 100644 src/bin/fm.rs create mode 100644 src/bin/gtk2-test.rs create mode 100644 src/bin/parley.rs create mode 100644 src/bin/vello-test.rs create mode 100644 src/flatland.rs create mode 100644 src/font_manager/font_info.rs create mode 100644 src/font_manager/manager.rs create mode 100644 src/font_manager/sources.rs create mode 100644 src/font_manager/sources/fontique.rs create mode 100644 src/font_manager/sources/fontkit.rs create mode 100644 src/font_manager/sources/pango.rs create mode 100644 src/font_manager/sources/parley.rs create mode 100644 src/layouter.rs diff --git a/Cargo.lock b/Cargo.lock index 9dc44fa..5dc9a39 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,41 @@ # It is not intended for manual editing. version = 4 +[[package]] +name = "ab_glyph" +version = "0.2.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec3672c180e71eeaaac3a541fbbc5f5ad4def8b747c595ad30d674e43049f7b0" +dependencies = [ + "ab_glyph_rasterizer", + "owned_ttf_parser", +] + +[[package]] +name = "ab_glyph_rasterizer" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c71b1793ee61086797f5c80b6efa2b8ffa6d5dd703f118545808a7f2e27f7046" + +[[package]] +name = "adler2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" + +[[package]] +name = "ahash" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +dependencies = [ + "cfg-if", + "getrandom", + "once_cell", + "version_check", + "zerocopy", +] + [[package]] name = "aho-corasick" version = "1.1.3" @@ -11,6 +46,54 @@ dependencies = [ "memchr", ] +[[package]] +name = "aligned-vec" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4aa90d7ce82d4be67b64039a3d588d38dbcc6736577de4a847025ce5b0c468d1" + +[[package]] +name = "allocator-api2" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" + +[[package]] +name = "android-activity" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef6978589202a00cd7e118380c448a08b6ed394c3a8df3a430d0898e3a42d046" +dependencies = [ + "android-properties", + "bitflags 2.6.0", + "cc", + "cesu8", + "jni", + "jni-sys", + "libc", + "log", + "ndk", + "ndk-context", + "ndk-sys 0.6.0+11769913", + "num_enum", + "thiserror", +] + +[[package]] +name = "android-properties" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7eb209b1518d6bb87b283c20095f5228ecda460da70b44f0802523dea6da04" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + [[package]] name = "anstream" version = "0.6.18" @@ -66,12 +149,106 @@ version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34ac096ce696dc2fcabef30516bb13c0a68a11d30131d3df6f04711467681b04" +[[package]] +name = "arbitrary" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dde20b3d026af13f561bdd0f15edf01fc734f0dafcedbaf42bba506a9517f223" + +[[package]] +name = "arg_enum_proc_macro" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ae92a5119aa49cdbcf6b9f893fe4e1d98b04ccbf82ee0584ad948a44a734dea" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "arrayref" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" + +[[package]] +name = "arrayvec" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" + +[[package]] +name = "as-raw-xcb-connection" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b" + +[[package]] +name = "ash" +version = "0.38.0+1.3.281" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bb44936d800fea8f016d7f2311c6a4f97aebd5dc86f09906139ec848cf3a46f" +dependencies = [ + "libloading", +] + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + [[package]] name = "autocfg" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" +[[package]] +name = "av1-grain" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6678909d8c5d46a42abcf571271e15fdbc0a225e3646cf23762cd415046c78bf" +dependencies = [ + "anyhow", + "arrayvec", + "log", + "nom", + "num-rational", + "v_frame", +] + +[[package]] +name = "avif-serialize" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e335041290c43101ca215eed6f43ec437eb5a42125573f600fc3fa42b9bddd62" +dependencies = [ + "arrayvec", +] + +[[package]] +name = "bit-set" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0481a0e032742109b1133a095184ee93d88f3dc9e0d28a5d033dc77a073f44f" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2c54ff287cfc0a34f38a6b832ea1bd8e448a330b3e40a50859e6488bee07f22" + +[[package]] +name = "bit_field" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc827186963e592360843fb5ba4b973e145841266c1357f7180c43526f2e5b61" + [[package]] name = "bitflags" version = "1.3.2" @@ -84,12 +261,77 @@ version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +[[package]] +name = "bitstream-io" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6099cdc01846bc367c4e7dd630dc5966dccf36b652fae7a74e17b640411a91b2" + +[[package]] +name = "block" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" + +[[package]] +name = "block2" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f" +dependencies = [ + "objc2", +] + +[[package]] +name = "built" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c360505aed52b7ec96a3636c3f039d99103c37d1d9b4f7a8c743d3ea9ffcd03b" + +[[package]] +name = "bumpalo" +version = "3.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" + +[[package]] +name = "bytemuck" +version = "1.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef657dfab802224e671f5818e9a4935f9b1957ed18e58292690cc39e7a4092a3" +dependencies = [ + "bytemuck_derive", +] + +[[package]] +name = "bytemuck_derive" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fa76293b4f7bb636ab88fd78228235b5248b4d05cc589aed610f954af5d7c7a" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] + [[package]] name = "byteorder" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" +[[package]] +name = "byteorder-lite" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" + +[[package]] +name = "bytes" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" + [[package]] name = "cairo-rs" version = "0.19.4" @@ -138,15 +380,49 @@ dependencies = [ "system-deps 7.0.3", ] +[[package]] +name = "calloop" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b99da2f8558ca23c71f4fd15dc57c906239752dd27ff3c00a1d56b685b7cbfec" +dependencies = [ + "bitflags 2.6.0", + "log", + "polling", + "rustix", + "slab", + "thiserror", +] + +[[package]] +name = "calloop-wayland-source" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95a66a987056935f7efce4ab5668920b5d0dac4a7c99991a67395f13702ddd20" +dependencies = [ + "calloop", + "rustix", + "wayland-backend", + "wayland-client", +] + [[package]] name = "cc" version = "1.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a012a0df96dd6d06ba9a1b29d6402d1a5d77c6befd2566afdc26e10603dc93d7" dependencies = [ + "jobserver", + "libc", "shlex", ] +[[package]] +name = "cesu8" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" + [[package]] name = "cfg-expr" version = "0.15.8" @@ -173,6 +449,28 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "cfg_aliases" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" + +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + +[[package]] +name = "codespan-reporting" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" +dependencies = [ + "termcolor", + "unicode-width", +] + [[package]] name = "colog" version = "1.3.0" @@ -184,6 +482,12 @@ dependencies = [ "log", ] +[[package]] +name = "color_quant" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" + [[package]] name = "colorchoice" version = "1.0.3" @@ -200,6 +504,56 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "com" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e17887fd17353b65b1b2ef1c526c83e26cd72e74f598a8dc1bee13a48f3d9f6" +dependencies = [ + "com_macros", +] + +[[package]] +name = "com_macros" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d375883580a668c7481ea6631fc1a8863e33cc335bf56bfad8d7e6d4b04b13a5" +dependencies = [ + "com_macros_support", + "proc-macro2", + "syn 1.0.109", +] + +[[package]] +name = "com_macros_support" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad899a1087a9296d5644792d7cb72b8e34c1bec8e7d4fbc002230169a6e8710c" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "combine" +version = "4.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" +dependencies = [ + "bytes", + "memchr", +] + +[[package]] +name = "concurrent-queue" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" +dependencies = [ + "crossbeam-utils", +] + [[package]] name = "core-foundation" version = "0.9.4" @@ -252,6 +606,46 @@ dependencies = [ "libc", ] +[[package]] +name = "crc32fast" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" + +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + [[package]] name = "csv" version = "1.3.1" @@ -273,6 +667,23 @@ dependencies = [ "memchr", ] +[[package]] +name = "cursor-icon" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96a6ac251f4a2aca6b3f91340350eab87ae57c3f127ffeb585e92bd336717991" + +[[package]] +name = "d3d12" +version = "22.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdbd1f579714e3c809ebd822c81ef148b1ceaeb3d535352afc73fd0c4c6a0017" +dependencies = [ + "bitflags 2.6.0", + "libloading", + "winapi", +] + [[package]] name = "dirs" version = "5.0.1" @@ -315,6 +726,23 @@ dependencies = [ "winapi", ] +[[package]] +name = "dispatch" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" + +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] + [[package]] name = "dlib" version = "0.5.2" @@ -325,17 +753,46 @@ dependencies = [ ] [[package]] -name = "dwrote" -version = "0.11.2" +name = "document-features" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70182709525a3632b2ba96b6569225467b18ecb4a77f46d255f713a6bebf05fd" +checksum = "cb6969eaabd2421f8a2775cfd2471a2b634372b4a25d41e3bd647b79912850a0" dependencies = [ - "lazy_static", - "libc", - "winapi", + "litrs", +] + +[[package]] +name = "downcast-rs" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" + +[[package]] +name = "dpi" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f25c0e292a7ca6d6498557ff1df68f32c99850012b6ea401cf8daf771f22ff53" + +[[package]] +name = "dwrote" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70182709525a3632b2ba96b6569225467b18ecb4a77f46d255f713a6bebf05fd" +dependencies = [ + "lazy_static", + "libc", + "serde", + "serde_derive", + "winapi", "wio", ] +[[package]] +name = "either" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" + [[package]] name = "encode_unicode" version = "1.0.0" @@ -371,6 +828,49 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +[[package]] +name = "errno" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] + +[[package]] +name = "euclid" +version = "0.22.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad9cdb4b747e485a12abb0e6566612956c7a1bafa3bdb8d682c5b6d403589e48" +dependencies = [ + "num-traits", +] + +[[package]] +name = "exr" +version = "1.73.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f83197f59927b46c04a183a619b7c29df34e63e63c7869320862268c0ef687e0" +dependencies = [ + "bit_field", + "half", + "lebe", + "miniz_oxide", + "rayon-core", + "smallvec", + "zune-inflate", +] + +[[package]] +name = "fdeflate" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c" +dependencies = [ + "simd-adler32", +] + [[package]] name = "field-offset" version = "0.3.6" @@ -381,12 +881,28 @@ dependencies = [ "rustc_version", ] +[[package]] +name = "flate2" +version = "1.0.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + [[package]] name = "float-ord" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ce81f49ae8a0482e4c55ea62ebbd7e5a686af544c00b9d090bba3ff9be97b3d" +[[package]] +name = "foldhash" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0d2fde1f7b3d48b8395d5f2de76c18a528bd6a9cdde438df747bfcba3e05d6f" + [[package]] name = "font-kit" version = "0.14.2" @@ -412,6 +928,78 @@ dependencies = [ "yeslogic-fontconfig-sys", ] +[[package]] +name = "font-types" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34fd7136aca682873d859ef34494ab1a7d3f57ecd485ed40eb6437ee8c85aa29" +dependencies = [ + "bytemuck", +] + +[[package]] +name = "font-types" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3971f9a5ca983419cdc386941ba3b9e1feba01a0ab888adf78739feb2798492" +dependencies = [ + "bytemuck", +] + +[[package]] +name = "fontconfig-cache-parser" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7f8afb20c8069fd676d27b214559a337cc619a605d25a87baa90b49a06f3b18" +dependencies = [ + "bytemuck", + "thiserror", +] + +[[package]] +name = "fontique" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00db74e5e46a808cfa00b871c1dc526e33e7e151f205c6011defd9ba6df17d8a" +dependencies = [ + "core-foundation", + "core-text", + "dwrote", + "fontconfig-cache-parser", + "hashbrown 0.14.5", + "icu_locid", + "icu_properties", + "memmap2", + "peniko 0.1.1", + "roxmltree", + "skrifa 0.19.3", + "smallvec", + "winapi", + "wio", +] + +[[package]] +name = "fontique" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b008f3607a8e8935b2607eef514164b8223020614c8ad684434a0cd668d280c" +dependencies = [ + "core-foundation", + "core-text", + "fontconfig-cache-parser", + "hashbrown 0.14.5", + "icu_locid", + "memmap2", + "objc2", + "objc2-foundation", + "peniko 0.2.0", + "roxmltree", + "skrifa 0.22.3", + "smallvec", + "windows 0.58.0", + "windows-core 0.58.0", +] + [[package]] name = "fontmanager" version = "0.1.0" @@ -420,11 +1008,18 @@ dependencies = [ "cairo-rs 0.19.4", "colog", "font-kit", + "fontique 0.1.0", "freetype-rs 0.36.0", "gtk4", + "image", "log", "pangocairo", + "parley", + "pollster", "prettytable", + "swash", + "vello", + "winit", ] [[package]] @@ -445,7 +1040,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.95", ] [[package]] @@ -513,6 +1108,17 @@ dependencies = [ "futures-util", ] +[[package]] +name = "futures-intrusive" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d930c203dd0b6ff06e0201a4a2fe9149b43c684fd4420555b26d21b1a02956f" +dependencies = [ + "futures-core", + "lock_api", + "parking_lot", +] + [[package]] name = "futures-io" version = "0.3.31" @@ -527,7 +1133,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.95", ] [[package]] @@ -607,6 +1213,16 @@ dependencies = [ "system-deps 7.0.3", ] +[[package]] +name = "gethostname" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0176e0459c2e4a1fe232f984bca6890e681076abb9934f6cea7c326f3fc47818" +dependencies = [ + "libc", + "windows-targets 0.48.5", +] + [[package]] name = "getrandom" version = "0.2.15" @@ -618,6 +1234,16 @@ dependencies = [ "wasi", ] +[[package]] +name = "gif" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fb2d69b19215e18bb912fa30f7ce15846e301408695e44e0ef719f1da9e19f2" +dependencies = [ + "color_quant", + "weezl", +] + [[package]] name = "gio" version = "0.20.7" @@ -661,6 +1287,17 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "gl_generator" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a95dfc23a2b4a9a2f5ab41d194f8bfda3cabec42af4e39f08c339eb2a0c124d" +dependencies = [ + "khronos_api", + "log", + "xml-rs", +] + [[package]] name = "glib" version = "0.19.9" @@ -714,7 +1351,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn", + "syn 2.0.95", ] [[package]] @@ -727,7 +1364,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn", + "syn 2.0.95", ] [[package]] @@ -750,6 +1387,27 @@ dependencies = [ "system-deps 7.0.3", ] +[[package]] +name = "glow" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd348e04c43b32574f2de31c8bb397d96c9fcfa1371bd4ca6d8bdc464ab121b1" +dependencies = [ + "js-sys", + "slotmap", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "glutin_wgl_sys" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a4e1951bbd9434a81aa496fe59ccc2235af3820d27b85f9314e279609211e2c" +dependencies = [ + "gl_generator", +] + [[package]] name = "gobject-sys" version = "0.19.8" @@ -772,6 +1430,58 @@ dependencies = [ "system-deps 7.0.3", ] +[[package]] +name = "gpu-alloc" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbcd2dba93594b227a1f57ee09b8b9da8892c34d55aa332e034a228d0fe6a171" +dependencies = [ + "bitflags 2.6.0", + "gpu-alloc-types", +] + +[[package]] +name = "gpu-alloc-types" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98ff03b468aa837d70984d55f5d3f846f6ec31fe34bbb97c4f85219caeee1ca4" +dependencies = [ + "bitflags 2.6.0", +] + +[[package]] +name = "gpu-allocator" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdd4240fc91d3433d5e5b0fc5b67672d771850dc19bbee03c1381e19322803d7" +dependencies = [ + "log", + "presser", + "thiserror", + "winapi", + "windows 0.52.0", +] + +[[package]] +name = "gpu-descriptor" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcf29e94d6d243368b7a56caa16bc213e4f9f8ed38c4d9557069527b5d5281ca" +dependencies = [ + "bitflags 2.6.0", + "gpu-descriptor-types", + "hashbrown 0.15.2", +] + +[[package]] +name = "gpu-descriptor-types" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdf242682df893b86f33a73828fb09ca4b2d3bb6cc95249707fc684d27484b91" +dependencies = [ + "bitflags 2.6.0", +] + [[package]] name = "graphene-rs" version = "0.20.7" @@ -856,7 +1566,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn", + "syn 2.0.95", ] [[package]] @@ -878,11 +1588,59 @@ dependencies = [ "system-deps 7.0.3", ] +[[package]] +name = "guillotiere" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b62d5865c036cb1393e23c50693df631d3f5d7bcca4c04fe4cc0fd592e74a782" +dependencies = [ + "euclid", + "svg_fmt", +] + +[[package]] +name = "half" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888" +dependencies = [ + "cfg-if", + "crunchy", +] + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", + "allocator-api2", +] + [[package]] name = "hashbrown" version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" +dependencies = [ + "foldhash", +] + +[[package]] +name = "hassle-rs" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af2a7e73e1f34c48da31fb668a907f250794837e08faa144fd24f0b8b741e890" +dependencies = [ + "bitflags 2.6.0", + "com", + "libc", + "libloading", + "thiserror", + "widestring", + "winapi", +] [[package]] name = "heck" @@ -896,6 +1654,12 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" +[[package]] +name = "hexf-parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df" + [[package]] name = "humantime" version = "2.1.0" @@ -903,535 +1667,2350 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] -name = "indexmap" -version = "2.7.0" +name = "icu_collections" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" dependencies = [ - "equivalent", - "hashbrown", + "displaydoc", + "yoke", + "zerofrom", + "zerovec", ] [[package]] -name = "is-terminal" -version = "0.4.13" +name = "icu_locid" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" dependencies = [ - "hermit-abi", - "libc", - "windows-sys 0.52.0", + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", ] [[package]] -name = "is_terminal_polyfill" -version = "1.70.1" +name = "icu_locid_transform" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] [[package]] -name = "itoa" -version = "1.0.14" +name = "icu_locid_transform_data" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" [[package]] -name = "lazy_static" -version = "1.5.0" +name = "icu_properties" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] [[package]] -name = "libc" -version = "0.2.169" +name = "icu_properties_data" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" [[package]] -name = "libloading" -version = "0.8.6" +name = "icu_provider" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" dependencies = [ - "cfg-if", - "windows-targets 0.52.6", + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", ] [[package]] -name = "libredox" -version = "0.1.3" +name = "icu_provider_macros" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" dependencies = [ - "bitflags 2.6.0", - "libc", + "proc-macro2", + "quote", + "syn 2.0.95", ] [[package]] -name = "log" -version = "0.4.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" - -[[package]] -name = "memchr" -version = "2.7.4" +name = "image" +version = "0.25.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" +checksum = "cd6f44aed642f18953a158afeb30206f4d50da59fbc66ecb53c66488de73563b" +dependencies = [ + "bytemuck", + "byteorder-lite", + "color_quant", + "exr", + "gif", + "image-webp", + "num-traits", + "png", + "qoi", + "ravif", + "rayon", + "rgb", + "tiff", + "zune-core", + "zune-jpeg", +] [[package]] -name = "memoffset" -version = "0.9.1" +name = "image-webp" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +checksum = "e031e8e3d94711a9ccb5d6ea357439ef3dcbed361798bd4071dc4d9793fbe22f" dependencies = [ - "autocfg", + "byteorder-lite", + "quick-error", ] [[package]] -name = "once_cell" -version = "1.20.2" +name = "imgref" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" +checksum = "d0263a3d970d5c054ed9312c0057b4f3bde9c0b33836d3637361d4a9e6e7a408" + +[[package]] +name = "indexmap" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" +dependencies = [ + "equivalent", + "hashbrown 0.15.2", +] + +[[package]] +name = "interpolate_name" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c34819042dc3d3971c46c2190835914dfbe0c3c13f61449b2997f4e9722dfa60" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "is-terminal" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b" +dependencies = [ + "hermit-abi", + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" + +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" + +[[package]] +name = "jni" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" +dependencies = [ + "cesu8", + "cfg-if", + "combine", + "jni-sys", + "log", + "thiserror", + "walkdir", + "windows-sys 0.45.0", +] + +[[package]] +name = "jni-sys" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" + +[[package]] +name = "jobserver" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" +dependencies = [ + "libc", +] + +[[package]] +name = "jpeg-decoder" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5d4a7da358eff58addd2877a45865158f0d78c911d43a5784ceb7bbf52833b0" + +[[package]] +name = "js-sys" +version = "0.3.76" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6717b6b5b077764fb5966237269cb3c64edddde4b14ce42647430a78ced9e7b7" +dependencies = [ + "once_cell", + "wasm-bindgen", +] + +[[package]] +name = "khronos-egl" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6aae1df220ece3c0ada96b8153459b67eebe9ae9212258bb0134ae60416fdf76" +dependencies = [ + "libc", + "libloading", + "pkg-config", +] + +[[package]] +name = "khronos_api" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" + +[[package]] +name = "kurbo" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89234b2cc610a7dd927ebde6b41dd1a5d4214cffaef4cf1fb2195d592f92518f" +dependencies = [ + "arrayvec", + "smallvec", +] + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + +[[package]] +name = "lebe" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8" + +[[package]] +name = "libc" +version = "0.2.169" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" + +[[package]] +name = "libfuzzer-sys" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b9569d2f74e257076d8c6bfa73fb505b46b851e51ddaecc825944aa3bed17fa" +dependencies = [ + "arbitrary", + "cc", +] + +[[package]] +name = "libloading" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" +dependencies = [ + "cfg-if", + "windows-targets 0.52.6", +] + +[[package]] +name = "libredox" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" +dependencies = [ + "bitflags 2.6.0", + "libc", + "redox_syscall 0.5.8", +] + +[[package]] +name = "linux-raw-sys" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" + +[[package]] +name = "litemap" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" + +[[package]] +name = "litrs" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4ce301924b7887e9d637144fdade93f9dfff9b60981d4ac161db09720d39aa5" + +[[package]] +name = "lock_api" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" + +[[package]] +name = "loop9" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fae87c125b03c1d2c0150c90365d7d6bcc53fb73a9acaef207d2d065860f062" +dependencies = [ + "imgref", +] + +[[package]] +name = "malloc_buf" +version = "0.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" +dependencies = [ + "libc", +] + +[[package]] +name = "maybe-rayon" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ea1f30cedd69f0a2954655f7188c6a834246d2bcf1e315e2ac40c4b24dc9519" +dependencies = [ + "cfg-if", + "rayon", +] + +[[package]] +name = "memchr" +version = "2.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" + +[[package]] +name = "memmap2" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd3f7eed9d3848f8b98834af67102b720745c4ec028fcd0aa0239277e7de374f" +dependencies = [ + "libc", +] + +[[package]] +name = "memoffset" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +dependencies = [ + "autocfg", +] + +[[package]] +name = "metal" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ecfd3296f8c56b7c1f6fbac3c71cefa9d78ce009850c45000015f206dc7fa21" +dependencies = [ + "bitflags 2.6.0", + "block", + "core-graphics-types", + "foreign-types", + "log", + "objc", + "paste", +] + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "miniz_oxide" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ffbe83022cedc1d264172192511ae958937694cd57ce297164951b8b3568394" +dependencies = [ + "adler2", + "simd-adler32", +] + +[[package]] +name = "naga" +version = "22.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bd5a652b6faf21496f2cfd88fc49989c8db0825d1f6746b1a71a6ede24a63ad" +dependencies = [ + "arrayvec", + "bit-set", + "bitflags 2.6.0", + "cfg_aliases 0.1.1", + "codespan-reporting", + "hexf-parse", + "indexmap", + "log", + "rustc-hash", + "spirv", + "termcolor", + "thiserror", + "unicode-xid", +] + +[[package]] +name = "ndk" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" +dependencies = [ + "bitflags 2.6.0", + "jni-sys", + "log", + "ndk-sys 0.6.0+11769913", + "num_enum", + "raw-window-handle", + "thiserror", +] + +[[package]] +name = "ndk-context" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" + +[[package]] +name = "ndk-sys" +version = "0.5.0+25.2.9519653" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c196769dd60fd4f363e11d948139556a344e79d451aeb2fa2fd040738ef7691" +dependencies = [ + "jni-sys", +] + +[[package]] +name = "ndk-sys" +version = "0.6.0+11769913" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873" +dependencies = [ + "jni-sys", +] + +[[package]] +name = "new_debug_unreachable" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "noop_proc_macro" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0676bb32a98c1a483ce53e500a81ad9c3d5b3f7c920c28c24e9cb0980d0b5bc8" + +[[package]] +name = "num-bigint" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" +dependencies = [ + "num-bigint", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_enum" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179" +dependencies = [ + "num_enum_derive", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "objc" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" +dependencies = [ + "malloc_buf", +] + +[[package]] +name = "objc-sys" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310" + +[[package]] +name = "objc2" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46a785d4eeff09c14c487497c162e92766fbb3e4059a71840cecc03d9a50b804" +dependencies = [ + "objc-sys", + "objc2-encode", +] + +[[package]] +name = "objc2-app-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" +dependencies = [ + "bitflags 2.6.0", + "block2", + "libc", + "objc2", + "objc2-core-data", + "objc2-core-image", + "objc2-foundation", + "objc2-quartz-core", +] + +[[package]] +name = "objc2-cloud-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009" +dependencies = [ + "bitflags 2.6.0", + "block2", + "objc2", + "objc2-core-location", + "objc2-foundation", +] + +[[package]] +name = "objc2-contacts" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5ff520e9c33812fd374d8deecef01d4a840e7b41862d849513de77e44aa4889" +dependencies = [ + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-data" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" +dependencies = [ + "bitflags 2.6.0", + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-image" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80" +dependencies = [ + "block2", + "objc2", + "objc2-foundation", + "objc2-metal", +] + +[[package]] +name = "objc2-core-location" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "000cfee34e683244f284252ee206a27953279d370e309649dc3ee317b37e5781" +dependencies = [ + "block2", + "objc2", + "objc2-contacts", + "objc2-foundation", +] + +[[package]] +name = "objc2-encode" +version = "4.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7891e71393cd1f227313c9379a26a584ff3d7e6e7159e988851f0934c993f0f8" + +[[package]] +name = "objc2-foundation" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" +dependencies = [ + "bitflags 2.6.0", + "block2", + "dispatch", + "libc", + "objc2", +] + +[[package]] +name = "objc2-link-presentation" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1a1ae721c5e35be65f01a03b6d2ac13a54cb4fa70d8a5da293d7b0020261398" +dependencies = [ + "block2", + "objc2", + "objc2-app-kit", + "objc2-foundation", +] + +[[package]] +name = "objc2-metal" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" +dependencies = [ + "bitflags 2.6.0", + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-quartz-core" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" +dependencies = [ + "bitflags 2.6.0", + "block2", + "objc2", + "objc2-foundation", + "objc2-metal", +] + +[[package]] +name = "objc2-symbols" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a684efe3dec1b305badae1a28f6555f6ddd3bb2c2267896782858d5a78404dc" +dependencies = [ + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-ui-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f" +dependencies = [ + "bitflags 2.6.0", + "block2", + "objc2", + "objc2-cloud-kit", + "objc2-core-data", + "objc2-core-image", + "objc2-core-location", + "objc2-foundation", + "objc2-link-presentation", + "objc2-quartz-core", + "objc2-symbols", + "objc2-uniform-type-identifiers", + "objc2-user-notifications", +] + +[[package]] +name = "objc2-uniform-type-identifiers" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44fa5f9748dbfe1ca6c0b79ad20725a11eca7c2218bceb4b005cb1be26273bfe" +dependencies = [ + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-user-notifications" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3" +dependencies = [ + "bitflags 2.6.0", + "block2", + "objc2", + "objc2-core-location", + "objc2-foundation", +] + +[[package]] +name = "once_cell" +version = "1.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "option-ext" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + +[[package]] +name = "orbclient" +version = "0.3.48" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba0b26cec2e24f08ed8bb31519a9333140a6599b867dac464bb150bdb796fd43" +dependencies = [ + "libredox", +] + +[[package]] +name = "owned_ttf_parser" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22ec719bbf3b2a81c109a4e20b1f129b5566b7dce654bc3872f6a05abf82b2c4" +dependencies = [ + "ttf-parser", +] + +[[package]] +name = "pango" +version = "0.20.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e89bd74250a03a05cec047b43465469102af803be2bf5e5a1088f8b8455e087" +dependencies = [ + "gio", + "glib 0.20.7", + "libc", + "pango-sys", +] + +[[package]] +name = "pango-sys" +version = "0.20.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71787e0019b499a5eda889279e4adb455a4f3fdd6870cd5ab7f4a5aa25df6699" +dependencies = [ + "glib-sys 0.20.7", + "gobject-sys 0.20.7", + "libc", + "system-deps 7.0.3", +] + +[[package]] +name = "pangocairo" +version = "0.20.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4690509a2fea2a6552a0ef8aa3e5f790c1365365ee0712afa1aedb39af3997b6" +dependencies = [ + "cairo-rs 0.20.7", + "glib 0.20.7", + "libc", + "pango", + "pangocairo-sys", +] + +[[package]] +name = "pangocairo-sys" +version = "0.20.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5be6ac24147911a6a46783922fc288cf02f67570bc0d360e563b5b26aead6767" +dependencies = [ + "cairo-sys-rs 0.20.7", + "glib-sys 0.20.7", + "libc", + "pango-sys", + "system-deps 7.0.3", +] + +[[package]] +name = "parking_lot" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall 0.5.8", + "smallvec", + "windows-targets 0.52.6", +] + +[[package]] +name = "parley" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a67bad26b7aca3f1046305d0d7edba9a77b14e74a9ff9136968178c8e6c8e61" +dependencies = [ + "fontique 0.2.0", + "peniko 0.2.0", + "skrifa 0.22.3", + "swash", +] + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "pathfinder_geometry" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b7e7b4ea703700ce73ebf128e1450eb69c3a8329199ffbfb9b2a0418e5ad3" +dependencies = [ + "log", + "pathfinder_simd", +] + +[[package]] +name = "pathfinder_simd" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cf07ef4804cfa9aea3b04a7bbdd5a40031dbb6b4f2cbaf2b011666c80c5b4f2" +dependencies = [ + "rustc_version", +] + +[[package]] +name = "peniko" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c28d7294093837856bb80ad191cc46a2fcec8a30b43b7a3b0285325f0a917a9" +dependencies = [ + "kurbo", + "smallvec", +] + +[[package]] +name = "peniko" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a648c93f502a0bef0a9cb47fa1335994958a2744667d3f82defe513f276741a" +dependencies = [ + "kurbo", + "smallvec", +] + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "pin-project" +version = "1.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e2ec53ad785f4d35dac0adea7f7dc6f1bb277ad84a680c7afefeae05d1f5916" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d56a66c0c55993aa927429d0f8a0abfd74f084e4d9c192cffed01e418d83eefb" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkg-config" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" + +[[package]] +name = "png" +version = "0.17.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82151a2fc869e011c153adc57cf2789ccb8d9906ce52c0b39a6b5697749d7526" +dependencies = [ + "bitflags 1.3.2", + "crc32fast", + "fdeflate", + "flate2", + "miniz_oxide", +] + +[[package]] +name = "polling" +version = "3.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a604568c3202727d1507653cb121dbd627a58684eb09a820fd746bee38b4442f" +dependencies = [ + "cfg-if", + "concurrent-queue", + "hermit-abi", + "pin-project-lite", + "rustix", + "tracing", + "windows-sys 0.59.0", +] + +[[package]] +name = "pollster" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f3a9f18d041e6d0e102a0a46750538147e5e8992d3b4873aaafee2520b00ce3" + +[[package]] +name = "ppv-lite86" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "presser" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8cf8e6a8aa66ce33f63993ffc4ea4271eb5b0530a9002db8455ea6050c77bfa" + +[[package]] +name = "prettytable" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46480520d1b77c9a3482d39939fcf96831537a250ec62d4fd8fbdf8e0302e781" +dependencies = [ + "csv", + "encode_unicode", + "is-terminal", + "lazy_static", + "term", + "unicode-width", +] + +[[package]] +name = "proc-macro-crate" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" +dependencies = [ + "toml_edit", +] + +[[package]] +name = "proc-macro2" +version = "1.0.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "profiling" +version = "1.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afbdc74edc00b6f6a218ca6a5364d6226a259d4b8ea1af4a0ea063f27e179f4d" +dependencies = [ + "profiling-procmacros", +] + +[[package]] +name = "profiling-procmacros" +version = "1.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a65f2e60fbf1063868558d69c6beacf412dc755f9fc020f514b7955fc914fe30" +dependencies = [ + "quote", + "syn 2.0.95", +] + +[[package]] +name = "qoi" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f6d64c71eb498fe9eae14ce4ec935c555749aef511cca85b5568910d6e48001" +dependencies = [ + "bytemuck", +] + +[[package]] +name = "quick-error" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" + +[[package]] +name = "quick-xml" +version = "0.36.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7649a7b4df05aed9ea7ec6f628c67c9953a43869b8bc50929569b2999d443fe" +dependencies = [ + "memchr", +] + +[[package]] +name = "quote" +version = "1.0.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[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", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "range-alloc" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8a99fddc9f0ba0a85884b8d14e3592853e787d581ca1816c91349b10e4eeab" + +[[package]] +name = "rav1e" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd87ce80a7665b1cce111f8a16c1f3929f6547ce91ade6addf4ec86a8dda5ce9" +dependencies = [ + "arbitrary", + "arg_enum_proc_macro", + "arrayvec", + "av1-grain", + "bitstream-io", + "built", + "cfg-if", + "interpolate_name", + "itertools", + "libc", + "libfuzzer-sys", + "log", + "maybe-rayon", + "new_debug_unreachable", + "noop_proc_macro", + "num-derive", + "num-traits", + "once_cell", + "paste", + "profiling", + "rand", + "rand_chacha", + "simd_helpers", + "system-deps 6.2.2", + "thiserror", + "v_frame", + "wasm-bindgen", +] + +[[package]] +name = "ravif" +version = "0.11.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2413fd96bd0ea5cdeeb37eaf446a22e6ed7b981d792828721e74ded1980a45c6" +dependencies = [ + "avif-serialize", + "imgref", + "loop9", + "quick-error", + "rav1e", + "rayon", + "rgb", +] + +[[package]] +name = "raw-window-handle" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" + +[[package]] +name = "rayon" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "read-fonts" +version = "0.19.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8b8af39d1f23869711ad4cea5e7835a20daa987f80232f7f2a2374d648ca64d" +dependencies = [ + "bytemuck", + "font-types 0.5.5", +] + +[[package]] +name = "read-fonts" +version = "0.22.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69aacb76b5c29acfb7f90155d39759a29496aebb49395830e928a9703d2eec2f" +dependencies = [ + "bytemuck", + "font-types 0.7.3", +] + +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "redox_syscall" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" +dependencies = [ + "bitflags 2.6.0", +] + +[[package]] +name = "redox_users" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" +dependencies = [ + "getrandom", + "libredox", + "thiserror", +] + +[[package]] +name = "regex" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" + +[[package]] +name = "renderdoc-sys" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19b30a45b0cd0bcca8037f3d0dc3421eaf95327a17cad11964fb8179b4fc4832" + +[[package]] +name = "rgb" +version = "0.8.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57397d16646700483b67d2dd6511d79318f9d057fdbd21a4066aeac8b41d310a" + +[[package]] +name = "roxmltree" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3cd14fd5e3b777a7422cca79358c57a8f6e3a703d9ac187448d0daf220c2407f" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "0.38.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f93dc38ecbab2eb790ff964bb77fa94faf256fd3e73285fd7ba0903b76bedb85" +dependencies = [ + "bitflags 2.6.0", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.59.0", +] + +[[package]] +name = "rustversion" +version = "1.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4" + +[[package]] +name = "ryu" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "scoped-tls" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "sctk-adwaita" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6277f0217056f77f1d8f49f2950ac6c278c0d607c45f5ee99328d792ede24ec" +dependencies = [ + "ab_glyph", + "log", + "memmap2", + "smithay-client-toolkit", + "tiny-skia", +] + +[[package]] +name = "semver" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3cb6eb87a131f756572d7fb904f6e7b68633f09cca868c5df1c4b8d1a694bbba" + +[[package]] +name = "serde" +version = "1.0.217" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.217" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "serde_spanned" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" +dependencies = [ + "serde", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "simd-adler32" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" + +[[package]] +name = "simd_helpers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95890f873bec569a0362c235787f3aca6e1e887302ba4840839bcc6459c42da6" +dependencies = [ + "quote", +] + +[[package]] +name = "skrifa" +version = "0.19.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ab45fb68b53576a43d4fc0e9ec8ea64e29a4d2cc7f44506964cb75f288222e9" +dependencies = [ + "bytemuck", + "read-fonts 0.19.3", +] + +[[package]] +name = "skrifa" +version = "0.22.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e1c44ad1f6c5bdd4eefed8326711b7dbda9ea45dfd36068c427d332aa382cbe" +dependencies = [ + "bytemuck", + "read-fonts 0.22.7", +] + +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] + +[[package]] +name = "slotmap" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbff4acf519f630b3a3ddcfaea6c06b42174d9a44bc70c620e9ed1649d58b82a" +dependencies = [ + "version_check", +] + +[[package]] +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[package]] +name = "smithay-client-toolkit" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3457dea1f0eb631b4034d61d4d8c32074caa6cd1ab2d59f2327bd8461e2c0016" +dependencies = [ + "bitflags 2.6.0", + "calloop", + "calloop-wayland-source", + "cursor-icon", + "libc", + "log", + "memmap2", + "rustix", + "thiserror", + "wayland-backend", + "wayland-client", + "wayland-csd-frame", + "wayland-cursor", + "wayland-protocols", + "wayland-protocols-wlr", + "wayland-scanner", + "xkeysym", +] + +[[package]] +name = "smol_str" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd538fb6910ac1099850255cf94a94df6551fbdd602454387d0adb2d1ca6dead" +dependencies = [ + "serde", +] + +[[package]] +name = "spirv" +version = "0.3.0+sdk-1.3.268.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eda41003dc44290527a59b13432d4a0379379fa074b70174882adfbdfd917844" +dependencies = [ + "bitflags 2.6.0", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "strict-num" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6637bab7722d379c8b41ba849228d680cc12d0a45ba1fa2b48f2a30577a06731" + +[[package]] +name = "svg_fmt" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce5d813d71d82c4cbc1742135004e4a79fd870214c155443451c139c9470a0aa" + +[[package]] +name = "swash" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbd59f3f359ddd2c95af4758c18270eddd9c730dde98598023cdabff472c2ca2" +dependencies = [ + "skrifa 0.22.3", + "yazi", + "zeno", +] + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.95" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46f71c0377baf4ef1cc3e3402ded576dccc315800fbc62dfc7fe04b009773b4a" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "system-deps" +version = "6.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3e535eb8dded36d55ec13eddacd30dec501792ff23a0b1682c38601b8cf2349" +dependencies = [ + "cfg-expr 0.15.8", + "heck", + "pkg-config", + "toml", + "version-compare", +] + +[[package]] +name = "system-deps" +version = "7.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66d23aaf9f331227789a99e8de4c91bf46703add012bdfd45fdecdfb2975a005" +dependencies = [ + "cfg-expr 0.17.2", + "heck", + "pkg-config", + "toml", + "version-compare", +] + +[[package]] +name = "target-lexicon" +version = "0.12.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" + +[[package]] +name = "term" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f" +dependencies = [ + "dirs-next", + "rustversion", + "winapi", +] + +[[package]] +name = "termcolor" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "tiff" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba1310fcea54c6a9a4fd1aad794ecc02c31682f6bfbecdf460bf19533eed1e3e" +dependencies = [ + "flate2", + "jpeg-decoder", + "weezl", +] + +[[package]] +name = "tiny-skia" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83d13394d44dae3207b52a326c0c85a8bf87f1541f23b0d143811088497b09ab" +dependencies = [ + "arrayref", + "arrayvec", + "bytemuck", + "cfg-if", + "log", + "tiny-skia-path", +] + +[[package]] +name = "tiny-skia-path" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c9e7fc0c2e86a30b117d0462aa261b72b7a99b7ebd7deb3a14ceda95c5bdc93" +dependencies = [ + "arrayref", + "bytemuck", + "strict-num", +] + +[[package]] +name = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "toml" +version = "0.8.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + +[[package]] +name = "toml_datetime" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.22.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" +dependencies = [ + "indexmap", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", +] + +[[package]] +name = "tracing" +version = "0.1.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" +dependencies = [ + "pin-project-lite", + "tracing-core", +] + +[[package]] +name = "tracing-core" +version = "0.1.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" + +[[package]] +name = "ttf-parser" +version = "0.25.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2df906b07856748fa3f6e0ad0cbaa047052d4a7dd609e231c4f72cee8c36f31" + +[[package]] +name = "unicode-ident" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" + +[[package]] +name = "unicode-segmentation" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] -name = "pango" -version = "0.20.7" +name = "unicode-width" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e89bd74250a03a05cec047b43465469102af803be2bf5e5a1088f8b8455e087" -dependencies = [ - "gio", - "glib 0.20.7", - "libc", - "pango-sys", -] +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" [[package]] -name = "pango-sys" -version = "0.20.7" +name = "unicode-xid" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71787e0019b499a5eda889279e4adb455a4f3fdd6870cd5ab7f4a5aa25df6699" -dependencies = [ - "glib-sys 0.20.7", - "gobject-sys 0.20.7", - "libc", - "system-deps 7.0.3", -] +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] -name = "pangocairo" -version = "0.20.7" +name = "utf8parse" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4690509a2fea2a6552a0ef8aa3e5f790c1365365ee0712afa1aedb39af3997b6" -dependencies = [ - "cairo-rs 0.20.7", - "glib 0.20.7", - "libc", - "pango", - "pangocairo-sys", -] +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] -name = "pangocairo-sys" -version = "0.20.7" +name = "v_frame" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5be6ac24147911a6a46783922fc288cf02f67570bc0d360e563b5b26aead6767" +checksum = "d6f32aaa24bacd11e488aa9ba66369c7cd514885742c9fe08cfe85884db3e92b" dependencies = [ - "cairo-sys-rs 0.20.7", - "glib-sys 0.20.7", - "libc", - "pango-sys", - "system-deps 7.0.3", + "aligned-vec", + "num-traits", + "wasm-bindgen", ] [[package]] -name = "pathfinder_geometry" -version = "0.5.1" +name = "vello" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b7e7b4ea703700ce73ebf128e1450eb69c3a8329199ffbfb9b2a0418e5ad3" +checksum = "fc44dd4eb9af6a41551b9a82c93d068bd832693d6f78ab118ad19780d8e1202e" dependencies = [ + "bytemuck", + "futures-intrusive", "log", - "pathfinder_simd", + "peniko 0.2.0", + "png", + "raw-window-handle", + "skrifa 0.22.3", + "static_assertions", + "thiserror", + "vello_encoding", + "vello_shaders", + "wgpu", ] [[package]] -name = "pathfinder_simd" -version = "0.5.4" +name = "vello_encoding" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cf07ef4804cfa9aea3b04a7bbdd5a40031dbb6b4f2cbaf2b011666c80c5b4f2" +checksum = "8110c14702a4e17f9200f6e3c4fe05dda5a22bf031ae4feafed4a61429f66fb2" dependencies = [ - "rustc_version", + "bytemuck", + "guillotiere", + "peniko 0.2.0", + "skrifa 0.22.3", + "smallvec", ] [[package]] -name = "pin-project-lite" -version = "0.2.16" +name = "vello_shaders" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" +checksum = "07cad02d6f29f2212a6ee382a8fec6f9977d0cceefacf07f8e361607ffe3988d" +dependencies = [ + "bytemuck", + "naga", + "thiserror", + "vello_encoding", +] [[package]] -name = "pin-utils" -version = "0.1.0" +name = "version-compare" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +checksum = "852e951cb7832cb45cb1169900d19760cfa39b82bc0ea9c0e5a14ae88411c98b" [[package]] -name = "pkg-config" -version = "0.3.31" +name = "version_check" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] -name = "prettytable" -version = "0.10.0" +name = "walkdir" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46480520d1b77c9a3482d39939fcf96831537a250ec62d4fd8fbdf8e0302e781" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" dependencies = [ - "csv", - "encode_unicode", - "is-terminal", - "lazy_static", - "term", - "unicode-width", + "same-file", + "winapi-util", ] [[package]] -name = "proc-macro-crate" -version = "3.2.0" +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" -dependencies = [ - "toml_edit", -] +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] -name = "proc-macro2" -version = "1.0.92" +name = "wasm-bindgen" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" +checksum = "a474f6281d1d70c17ae7aa6a613c87fce69a127e2624002df63dcb39d6cf6396" dependencies = [ - "unicode-ident", + "cfg-if", + "once_cell", + "wasm-bindgen-macro", ] [[package]] -name = "quote" -version = "1.0.38" +name = "wasm-bindgen-backend" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" +checksum = "5f89bb38646b4f81674e8f5c3fb81b562be1fd936d84320f3264486418519c79" dependencies = [ + "bumpalo", + "log", "proc-macro2", + "quote", + "syn 2.0.95", + "wasm-bindgen-shared", ] [[package]] -name = "redox_users" -version = "0.4.6" +name = "wasm-bindgen-futures" +version = "0.4.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" +checksum = "38176d9b44ea84e9184eff0bc34cc167ed044f816accfe5922e54d84cf48eca2" dependencies = [ - "getrandom", - "libredox", - "thiserror", + "cfg-if", + "js-sys", + "once_cell", + "wasm-bindgen", + "web-sys", ] [[package]] -name = "regex" -version = "1.11.1" +name = "wasm-bindgen-macro" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" +checksum = "2cc6181fd9a7492eef6fef1f33961e3695e4579b9872a6f7c83aee556666d4fe" dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", + "quote", + "wasm-bindgen-macro-support", ] [[package]] -name = "regex-automata" -version = "0.4.9" +name = "wasm-bindgen-macro-support" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" +checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2" dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", + "proc-macro2", + "quote", + "syn 2.0.95", + "wasm-bindgen-backend", + "wasm-bindgen-shared", ] [[package]] -name = "regex-syntax" -version = "0.8.5" +name = "wasm-bindgen-shared" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" +checksum = "943aab3fdaaa029a6e0271b35ea10b72b943135afe9bffca82384098ad0e06a6" [[package]] -name = "rustc_version" -version = "0.4.1" +name = "wayland-backend" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +checksum = "056535ced7a150d45159d3a8dc30f91a2e2d588ca0b23f70e56033622b8016f6" dependencies = [ - "semver", + "cc", + "downcast-rs", + "rustix", + "scoped-tls", + "smallvec", + "wayland-sys", ] [[package]] -name = "rustversion" -version = "1.0.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4" - -[[package]] -name = "ryu" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" - -[[package]] -name = "same-file" -version = "1.0.6" +name = "wayland-client" +version = "0.31.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +checksum = "b66249d3fc69f76fd74c82cc319300faa554e9d865dab1f7cd66cc20db10b280" dependencies = [ - "winapi-util", + "bitflags 2.6.0", + "rustix", + "wayland-backend", + "wayland-scanner", ] [[package]] -name = "semver" -version = "1.0.24" +name = "wayland-csd-frame" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cb6eb87a131f756572d7fb904f6e7b68633f09cca868c5df1c4b8d1a694bbba" +checksum = "625c5029dbd43d25e6aa9615e88b829a5cad13b2819c4ae129fdbb7c31ab4c7e" +dependencies = [ + "bitflags 2.6.0", + "cursor-icon", + "wayland-backend", +] [[package]] -name = "serde" -version = "1.0.217" +name = "wayland-cursor" +version = "0.31.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70" +checksum = "32b08bc3aafdb0035e7fe0fdf17ba0c09c268732707dca4ae098f60cb28c9e4c" dependencies = [ - "serde_derive", + "rustix", + "wayland-client", + "xcursor", ] [[package]] -name = "serde_derive" -version = "1.0.217" +name = "wayland-protocols" +version = "0.32.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" +checksum = "7cd0ade57c4e6e9a8952741325c30bf82f4246885dca8bf561898b86d0c1f58e" dependencies = [ - "proc-macro2", - "quote", - "syn", + "bitflags 2.6.0", + "wayland-backend", + "wayland-client", + "wayland-scanner", ] [[package]] -name = "serde_spanned" -version = "0.6.8" +name = "wayland-protocols-plasma" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" +checksum = "9b31cab548ee68c7eb155517f2212049dc151f7cd7910c2b66abfd31c3ee12bd" dependencies = [ - "serde", + "bitflags 2.6.0", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-scanner", ] [[package]] -name = "shlex" -version = "1.3.0" +name = "wayland-protocols-wlr" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" +checksum = "782e12f6cd923c3c316130d56205ebab53f55d6666b7faddfad36cecaeeb4022" +dependencies = [ + "bitflags 2.6.0", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-scanner", +] [[package]] -name = "slab" -version = "0.4.9" +name = "wayland-scanner" +version = "0.31.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +checksum = "597f2001b2e5fc1121e3d5b9791d3e78f05ba6bfa4641053846248e3a13661c3" dependencies = [ - "autocfg", + "proc-macro2", + "quick-xml", + "quote", ] [[package]] -name = "smallvec" -version = "1.13.2" +name = "wayland-sys" +version = "0.31.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +checksum = "efa8ac0d8e8ed3e3b5c9fc92c7881406a268e11555abe36493efabe649a29e09" +dependencies = [ + "dlib", + "log", + "once_cell", + "pkg-config", +] [[package]] -name = "syn" -version = "2.0.95" +name = "web-sys" +version = "0.3.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46f71c0377baf4ef1cc3e3402ded576dccc315800fbc62dfc7fe04b009773b4a" +checksum = "04dd7223427d52553d3702c004d3b2fe07c148165faa56313cb00211e31c12bc" dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", + "js-sys", + "wasm-bindgen", ] [[package]] -name = "system-deps" -version = "6.2.2" +name = "web-time" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e535eb8dded36d55ec13eddacd30dec501792ff23a0b1682c38601b8cf2349" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" dependencies = [ - "cfg-expr 0.15.8", - "heck", - "pkg-config", - "toml", - "version-compare", + "js-sys", + "wasm-bindgen", ] [[package]] -name = "system-deps" -version = "7.0.3" +name = "weezl" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66d23aaf9f331227789a99e8de4c91bf46703add012bdfd45fdecdfb2975a005" -dependencies = [ - "cfg-expr 0.17.2", - "heck", - "pkg-config", - "toml", - "version-compare", -] +checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082" [[package]] -name = "target-lexicon" -version = "0.12.16" +name = "wgpu" +version = "22.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" +checksum = "e1d1c4ba43f80542cf63a0a6ed3134629ae73e8ab51e4b765a67f3aa062eb433" +dependencies = [ + "arrayvec", + "cfg_aliases 0.1.1", + "document-features", + "js-sys", + "log", + "naga", + "parking_lot", + "profiling", + "raw-window-handle", + "smallvec", + "static_assertions", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "wgpu-core", + "wgpu-hal", + "wgpu-types", +] [[package]] -name = "term" -version = "0.7.0" +name = "wgpu-core" +version = "22.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f" +checksum = "0348c840d1051b8e86c3bcd31206080c5e71e5933dabd79be1ce732b0b2f089a" dependencies = [ - "dirs-next", - "rustversion", - "winapi", + "arrayvec", + "bit-vec", + "bitflags 2.6.0", + "cfg_aliases 0.1.1", + "document-features", + "indexmap", + "log", + "naga", + "once_cell", + "parking_lot", + "profiling", + "raw-window-handle", + "rustc-hash", + "smallvec", + "thiserror", + "wgpu-hal", + "wgpu-types", ] [[package]] -name = "thiserror" -version = "1.0.69" +name = "wgpu-hal" +version = "22.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +checksum = "f6bbf4b4de8b2a83c0401d9e5ae0080a2792055f25859a02bf9be97952bbed4f" dependencies = [ - "thiserror-impl", + "android_system_properties", + "arrayvec", + "ash", + "bit-set", + "bitflags 2.6.0", + "block", + "cfg_aliases 0.1.1", + "core-graphics-types", + "d3d12", + "glow", + "glutin_wgl_sys", + "gpu-alloc", + "gpu-allocator", + "gpu-descriptor", + "hassle-rs", + "js-sys", + "khronos-egl", + "libc", + "libloading", + "log", + "metal", + "naga", + "ndk-sys 0.5.0+25.2.9519653", + "objc", + "once_cell", + "parking_lot", + "profiling", + "range-alloc", + "raw-window-handle", + "renderdoc-sys", + "rustc-hash", + "smallvec", + "thiserror", + "wasm-bindgen", + "web-sys", + "wgpu-types", + "winapi", ] [[package]] -name = "thiserror-impl" -version = "1.0.69" +name = "wgpu-types" +version = "22.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +checksum = "bc9d91f0e2c4b51434dfa6db77846f2793149d8e73f800fa2e41f52b8eac3c5d" dependencies = [ - "proc-macro2", - "quote", - "syn", + "bitflags 2.6.0", + "js-sys", + "web-sys", ] [[package]] -name = "toml" -version = "0.8.19" +name = "widestring" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit", -] +checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311" [[package]] -name = "toml_datetime" -version = "0.6.8" +name = "winapi" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" dependencies = [ - "serde", + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", ] [[package]] -name = "toml_edit" -version = "0.22.22" +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "indexmap", - "serde", - "serde_spanned", - "toml_datetime", - "winnow", + "windows-sys 0.59.0", ] [[package]] -name = "unicode-ident" -version = "1.0.14" +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] -name = "unicode-width" -version = "0.1.14" +name = "windows" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" +checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" +dependencies = [ + "windows-core 0.52.0", + "windows-targets 0.52.6", +] [[package]] -name = "utf8parse" -version = "0.2.2" +name = "windows" +version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" +checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" +dependencies = [ + "windows-core 0.58.0", + "windows-targets 0.52.6", +] [[package]] -name = "version-compare" -version = "0.2.0" +name = "windows-core" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852e951cb7832cb45cb1169900d19760cfa39b82bc0ea9c0e5a14ae88411c98b" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets 0.52.6", +] [[package]] -name = "walkdir" -version = "2.5.0" +name = "windows-core" +version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" dependencies = [ - "same-file", - "winapi-util", + "windows-implement", + "windows-interface", + "windows-result", + "windows-strings", + "windows-targets 0.52.6", ] [[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" +name = "windows-implement" +version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] [[package]] -name = "winapi" -version = "0.3.9" +name = "windows-interface" +version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", + "proc-macro2", + "quote", + "syn 2.0.95", ] [[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" +name = "windows-result" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets 0.52.6", +] [[package]] -name = "winapi-util" -version = "0.1.9" +name = "windows-strings" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" dependencies = [ - "windows-sys 0.59.0", + "windows-result", + "windows-targets 0.52.6", ] [[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" +name = "windows-sys" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.2", +] [[package]] name = "windows-sys" @@ -1460,6 +4039,21 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + [[package]] name = "windows-targets" version = "0.48.5" @@ -1491,6 +4085,12 @@ dependencies = [ "windows_x86_64_msvc 0.52.6", ] +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + [[package]] name = "windows_aarch64_gnullvm" version = "0.48.5" @@ -1503,6 +4103,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + [[package]] name = "windows_aarch64_msvc" version = "0.48.5" @@ -1515,6 +4121,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + [[package]] name = "windows_i686_gnu" version = "0.48.5" @@ -1533,6 +4145,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" +[[package]] +name = "windows_i686_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + [[package]] name = "windows_i686_msvc" version = "0.48.5" @@ -1545,6 +4163,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + [[package]] name = "windows_x86_64_gnu" version = "0.48.5" @@ -1557,6 +4181,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + [[package]] name = "windows_x86_64_gnullvm" version = "0.48.5" @@ -1569,6 +4199,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + [[package]] name = "windows_x86_64_msvc" version = "0.48.5" @@ -1581,6 +4217,58 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +[[package]] +name = "winit" +version = "0.30.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5d74280aabb958072864bff6cfbcf9025cf8bfacdde5e32b5e12920ef703b0f" +dependencies = [ + "ahash", + "android-activity", + "atomic-waker", + "bitflags 2.6.0", + "block2", + "bytemuck", + "calloop", + "cfg_aliases 0.2.1", + "concurrent-queue", + "core-foundation", + "core-graphics", + "cursor-icon", + "dpi", + "js-sys", + "libc", + "memmap2", + "ndk", + "objc2", + "objc2-app-kit", + "objc2-foundation", + "objc2-ui-kit", + "orbclient", + "percent-encoding", + "pin-project", + "raw-window-handle", + "redox_syscall 0.4.1", + "rustix", + "sctk-adwaita", + "smithay-client-toolkit", + "smol_str", + "tracing", + "unicode-segmentation", + "wasm-bindgen", + "wasm-bindgen-futures", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-protocols-plasma", + "web-sys", + "web-time", + "windows-sys 0.52.0", + "x11-dl", + "x11rb", + "xkbcommon-dl", +] + [[package]] name = "winnow" version = "0.6.22" @@ -1599,6 +4287,81 @@ dependencies = [ "winapi", ] +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + +[[package]] +name = "x11-dl" +version = "2.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38735924fedd5314a6e548792904ed8c6de6636285cb9fec04d5b1db85c1516f" +dependencies = [ + "libc", + "once_cell", + "pkg-config", +] + +[[package]] +name = "x11rb" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d91ffca73ee7f68ce055750bf9f6eca0780b8c85eff9bc046a3b0da41755e12" +dependencies = [ + "as-raw-xcb-connection", + "gethostname", + "libc", + "libloading", + "once_cell", + "rustix", + "x11rb-protocol", +] + +[[package]] +name = "x11rb-protocol" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec107c4503ea0b4a98ef47356329af139c0a4f7750e621cf2973cd3385ebcb3d" + +[[package]] +name = "xcursor" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ef33da6b1660b4ddbfb3aef0ade110c8b8a781a3b6382fa5f2b5b040fd55f61" + +[[package]] +name = "xkbcommon-dl" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d039de8032a9a8856a6be89cea3e5d12fdd82306ab7c94d74e6deab2460651c5" +dependencies = [ + "bitflags 2.6.0", + "dlib", + "log", + "once_cell", + "xkeysym", +] + +[[package]] +name = "xkeysym" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9cc00251562a284751c9973bace760d86c0276c471b4be569fe6b068ee97a56" + +[[package]] +name = "xml-rs" +version = "0.8.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea8b391c9a790b496184c29f7f93b9ed5b16abb306c05415b68bcc16e4d06432" + +[[package]] +name = "yazi" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c94451ac9513335b5e23d7a8a2b61a7102398b8cca5160829d313e84c9d98be1" + [[package]] name = "yeslogic-fontconfig-sys" version = "6.0.0" @@ -1609,3 +4372,121 @@ dependencies = [ "once_cell", "pkg-config", ] + +[[package]] +name = "yoke" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", + "synstructure", +] + +[[package]] +name = "zeno" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd15f8e0dbb966fd9245e7498c7e9e5055d9e5c8b676b95bd67091cd11a1e697" + +[[package]] +name = "zerocopy" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +dependencies = [ + "byteorder", + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "zerofrom" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", + "synstructure", +] + +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "zune-core" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f423a2c17029964870cfaabb1f13dfab7d092a62a29a89264f4d36990ca414a" + +[[package]] +name = "zune-inflate" +version = "0.2.54" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73ab332fe2f6680068f3582b16a24f90ad7096d5d39b974d1c0aff0125116f02" +dependencies = [ + "simd-adler32", +] + +[[package]] +name = "zune-jpeg" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99a5bab8d7dedf81405c4bb1f2b83ea057643d9cb28778cea9eecddeedd2e028" +dependencies = [ + "zune-core", +] diff --git a/Cargo.toml b/Cargo.toml index ed11436..42af2b2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,6 +15,19 @@ path = "src/bin/generate-svg.rs" name = "gtk-test" path = "src/bin/gtk-test.rs" +[[bin]] +name = "gtk2-test" +path = "src/bin/gtk2-test.rs" + +[[bin]] +name = "vello-test" +path = "src/bin/vello-test.rs" + +[[bin]] +name = "fm" +path = "src/bin/fm.rs" + + [dependencies] colog = "^1.3" log = "0.4.22" @@ -25,3 +38,10 @@ font-kit = "0.14.2" cairo-rs = { version = "0.19.4", features = ["use_glib", "freetype"] } pangocairo = "0.20.7" freetype-rs = "0.36.0" +vello = "0.3.0" +winit = "0.30.7" +pollster = "0.4.0" +image = "0.25.5" +parley = "0.2.0" +swash = "0.1.19" +fontique = "0.1.0" \ No newline at end of file diff --git a/resources/icons/hicolor/scalable/apps/gosub.svg b/resources/icons/hicolor/scalable/apps/gosub.svg new file mode 100644 index 0000000..399eb24 --- /dev/null +++ b/resources/icons/hicolor/scalable/apps/gosub.svg @@ -0,0 +1 @@ +Gosub Logo diff --git a/resources/icons/hicolor/symbolic/apps/gosub.svg b/resources/icons/hicolor/symbolic/apps/gosub.svg new file mode 100644 index 0000000..ed778f7 --- /dev/null +++ b/resources/icons/hicolor/symbolic/apps/gosub.svg @@ -0,0 +1,25 @@ + + + Gosub Logo + + diff --git a/src/bin/fm.rs b/src/bin/fm.rs new file mode 100644 index 0000000..0c83d4d --- /dev/null +++ b/src/bin/fm.rs @@ -0,0 +1,60 @@ +use prettytable::{Attr, Cell, Row, Table}; +use fontmanager::font_manager::manager::FontManager; +use fontmanager::font_manager::sources::FontSourceType; + +fn main() { + colog::init(); + + let arg = std::env::args().nth(1); + let binding = arg.unwrap_or("".into()); + let pattern = binding.as_str(); + + let manager = FontManager::new(); + + render_table(FontSourceType::Fontkit, &manager, pattern); + render_table(FontSourceType::Pango, &manager, pattern); + render_table(FontSourceType::Fontique, &manager, pattern); + render_table(FontSourceType::Parley, &manager, pattern); +} + +#[allow(unused)] +fn render_table(source_type: FontSourceType, manager: &FontManager, family: &str) { + println!("source_type: {:?}", source_type); + + let mut table = Table::new(); + table.set_format(*prettytable::format::consts::FORMAT_NO_BORDER_LINE_SEPARATOR); + table.set_titles(Row::new(vec![ + Cell::new("Family").with_style(Attr::Bold), + Cell::new("Style").with_style(Attr::Bold), + Cell::new("Weight").with_style(Attr::Bold), + Cell::new("Stretch").with_style(Attr::Bold), + Cell::new("Monospaced").with_style(Attr::Bold), + Cell::new("Path").with_style(Attr::Bold), + Cell::new("Index").with_style(Attr::Bold), + ])); + + for info in manager.available_fonts(source_type) { + if !family.is_empty() { + let fam = info.family.to_ascii_lowercase(); + if !fam.contains(&family.to_ascii_lowercase()) { + continue; + } + } + table.add_row(Row::new(vec![ + Cell::new(&info.family), + Cell::new(&format!("{}", &info.style)), + Cell::new(&info.weight.to_string()), + Cell::new(&info.stretch.to_string()), + Cell::new(&info.monospaced.to_string()), + if info.path.is_some() { + Cell::new(&info.path.unwrap().to_str().unwrap()) + } else { + Cell::new("N/A") + }, + Cell::new(&info.index.unwrap_or(0).to_string()), + ])); + } + + table.printstd(); + println!("\n\n\n"); +} \ No newline at end of file diff --git a/src/bin/gtk-test.rs b/src/bin/gtk-test.rs index 01d96d1..852f6b3 100644 --- a/src/bin/gtk-test.rs +++ b/src/bin/gtk-test.rs @@ -6,77 +6,6 @@ use pangocairo::pango; const APP_ID: &str = "io.gosub.font-manager.gtk-test"; - -const TEXT: &str = r"§ 1 Of the Nature of Flatland - -I call our world Flatland, not because we call it so, but to make its nature clearer to you, my happy readers, who are privileged to live in Space. - -Imagine a vast sheet of paper on which straight Lines, Triangles, Squares, Pentagons, Hexagons, and other figures, instead of remaining fixed in their places, move freely about, on or in the surface, but without the power of rising above or sinking below it, very much like shadows—only hard with luminous edges—and you will then have a pretty correct notion of my country and countrymen. Alas, a few years ago, I should have said “my universe:” but now my mind has been opened to higher views of things. - -In such a country, you will perceive at once that it is impossible that there should be anything of what you call a “solid” kind; but I dare say you will suppose that we could at least distinguish by sight the Triangles, Squares, and other figures, moving about as I have described them. On the contrary, we could see nothing of the kind, not at least so as to distinguish one figure from another. Nothing was visible, nor could be visible, to us, except Straight Lines; and the necessity of this I will speedily demonstrate. - -Place a penny on the middle of one of your tables in Space; and leaning over it, look down upon it. It will appear a circle. - -But now, drawing back to the edge of the table, gradually lower your eye (thus bringing yourself more and more into the condition of the inhabitants of Flatland), and you will find the penny becoming more and more oval to your view, and at last when you have placed your eye exactly on the edge of the table (so that you are, as it were, actually a Flatlander) the penny will then have ceased to appear oval at all, and will have become, so far as you can see, a straight line. - -The same thing would happen if you were to treat in the same way a Triangle, or a Square, or any other figure cut out from pasteboard. As soon as you look at it with your eye on the edge of the table, you will find that it ceases to appear to you as a figure, and that it becomes in appearance a straight line. Take for example an equilateral Triangle—who represents with us a Tradesman of the respectable class. Figure 1 represents the Tradesman as you would see him while you were bending over him from above; figures 2 and 3 represent the Tradesman, as you would see him if your eye were close to the level, or all but on the level of the table; and if your eye were quite on the level of the table (and that is how we see him in Flatland) you would see nothing but a straight line. - - When I was in Spaceland I heard that your sailors have very similar experiences while they traverse your seas and discern some distant island or coast lying on the horizon. The far-off land may have bays, forelands, angles in and out to any number and extent; yet at a distance you see none of these (unless indeed your sun shines bright upon them revealing the projections and retirements by means of light and shade), nothing but a grey unbroken line upon the water. - -Well, that is just what we see when one of our triangular or other acquaintances comes towards us in Flatland. As there is neither sun with us, nor any light of such a kind as to make shadows, we have none of the helps to the sight that you have in Spaceland. If our friend comes closer to us we see his line becomes larger; if he leaves us it becomes smaller; but still he looks like a straight line; be he a Triangle, Square, Pentagon, Hexagon, Circle, what you will—a straight Line he looks and nothing else. - -You may perhaps ask how under these disadvantagous circumstances we are able to distinguish our friends from one another: but the answer to this very natural question will be more fitly and easily given when I come to describe the inhabitants of Flatland. For the present let me defer this subject, and say a word or two about the climate and houses in our country. - -§ 2 Of the Climate and Houses in Flatland - -As with you, so also with us, there are four points of the compass North, South, East, and West. - -There being no sun nor other heavenly bodies, it is impossible for us to determine the North in the usual way; but we have a method of our own. By a Law of Nature with us, there is a constant attraction to the South; and, although in temperate climates this is very slight—so that even a Woman in reasonable health can journey several furlongs northward without much difficulty—yet the hampering effort of the southward attraction is quite sufficient to serve as a compass in most parts of our earth. Moreover, the rain (which falls at stated intervals) coming always from the North, is an additional assistance; and in the towns we have the guidance of the houses, which of course have their side-walls running for the most part North and South, so that the roofs may keep off the rain from the North. In the country, where there are no houses, the trunks of the trees serve as some sort of guide. Altogether, we have not so much difficulty as might be expected in determining our bearings. - -Yet in our more temperate regions, in which the southward attraction is hardly felt, walking sometimes in a perfectly desolate plain where there have been no houses nor trees to guide me, I have been occasionally compelled to remain stationary for hours together, waiting till the rain came before continuing my journey. On the weak and aged, and especially on delicate Females, the force of attraction tells much more heavily than on the robust of the Male Sex, so that it is a point of breeding, if you meet a Lady on the street, always to give her the North side of the way—by no means an easy thing to do always at short notice when you are in rude health and in a climate where it is difficult to tell your North from your South. - -Windows there are none in our houses: for the light comes to us alike in our homes and out of them, by day and by night, equally at all times and in all places, whence we know not. It was in old days, with our learned men, an interesting and oft-investigate question, “What is the origin of light?” and the solution of it has been repeatedly attempted, with no other result than to crowd our lunatic asylums with the would-be solvers. Hence, after fruitless attempts to suppress such investigations indirectly by making them liable to a heavy tax, the Legislature, in comparatively recent times, absolutely prohibited them. I—alas, I alone in Flatland—know now only too well the true solution of this mysterious problem; but my knowledge cannot be made intelligible to a single one of my countrymen; and I am mocked at—I, the sole possessor of the truths of Space and of the theory of the introduction of Light from the world of three Dimensions—as if I were the maddest of the mad! But a truce to these painful digressions: let me return to our homes. - -The most common form for the construction of a house is five-sided or pentagonal, as in the annexed figure. The two Northern sides RO, OF, constitute the roof, and for the most part have no doors; on the East is a small door for the Women; on the West a much larger one for the Men; the South side or floor is usually doorless. - - Square and triangular houses are not allowed, and for this reason. The angles of a Square (and still more those of an equilateral Triangle,) being much more pointed than those of a Pentagon, and the lines of inanimate objects (such as houses) being dimmer than the lines of Men and Women, it follows that there is no little danger lest the points of a square or triangular house residence might do serious injury to an inconsiderate or perhaps absentminded traveller suddenly running against them: and therefore, as early as the eleventh century of our era, triangular houses were universally forbidden by Law, the only exceptions being fortifications, powder-magazines, barracks, and other state buildings, which is not desirable that the general public should approach without circumspection. - -At this period, square houses were still everywhere permitted, though discouraged by a special tax. But, about three centuries afterwards, the Law decided that in all towns containing a population above ten thousand, the angle of a Pentagon was the smallest house-angle that could be allowed consistently with the public safety. The good sense of the community has seconded the efforts of the Legislature; and now, even in the country, the pentagonal construction has superseded every other. It is only now and then in some very remote and backward agricultural district that an antiquarian may still discover a square house. - -§ 3 Concerning the Inhabitants of Flatland - -The greatest length or breadth of a full grown inhabitant of Flatland may be estimated at about eleven of your inches. Twelve inches may be regarded as a maximum. - -Our Women are Straight Lines. - -Our Soldiers and Lowest Class of Workmen are Triangles with two equal sides, each about eleven inches long, and a base or third side so short (often not exceeding half an inch) that they form at their vertices a very sharp and formidable angle. Indeed when their bases are of the most degraded type (not more than the eighth part of an inch in size), they can hardly be distinguished from Straight lines or Women; so extremely pointed are their vertices. With us, as with you, these Triangles are distinguished from others by being called Isosceles; and by this name I shall refer to them in the following pages. - -Our Middle Class consists of Equilateral or Equal-Sided Triangles. - -Our Professional Men and Gentlemen are Squares (to which class I myself belong) and Five-Sided Figures or Pentagons. - -Next above these come the Nobility, of whom there are several degrees, beginning at Six-Sided Figures, or Hexagons, and from thence rising in the number of their sides till they receive the honourable title of Polygonal, or many-Sided. Finally when the number of the sides becomes so numerous, and the sides themselves so small, that the figure cannot be distinguished from a circle, he is included in the Circular or Priestly order; and this is the highest class of all. - -It is a Law of Nature with us that a male child shall have one more side than his father, so that each generation shall rise (as a rule) one step in the scale of development and nobility. Thus the son of a Square is a Pentagon; the son of a Pentagon, a Hexagon; and so on. - -But this rule applies not always to the Tradesman, and still less often to the Soldiers, and to the Workmen; who indeed can hardly be said to deserve the name of human Figures, since they have not all their sides equal. With them therefore the Law of Nature does not hold; and the son of an Isosceles (i.e. a Triangle with two sides equal) remains Isosceles still. Nevertheless, all hope is not such out, even from the Isosceles, that his posterity may ultimately rise above his degraded condition. For, after a long series of military successes, or diligent and skillful labours, it is generally found that the more intelligent among the Artisan and Soldier classes manifest a slight increase of their third side or base, and a shrinkage of the two other sides. Intermarriages (arranged by the Priests) between the sons and daughters of these more intellectual members of the lower classes generally result in an offspring approximating still more to the type of the Equal-Sided Triangle. - -Rarely—in proportion to the vast numbers of Isosceles births—is a genuine and certifiable Equal-Sided Triangle produced from Isosceles parents.[1] Such a birth requires, as its antecedents, not only a series of carefully arranged intermarriages, but also a long-continued exercise of frugality and self-control on the part of the would-be ancestors of the coming Equilateral, and a patient, systematic, and continuous development of the Isosceles intellect through many generations. - -[1] “What need of a certificate?” a Spaceland critic may ask: “Is not the procreation of a Square Son a certificate from Nature herself, proving the Equal-sidedness of the Father?” I reply that no Lady of any position will mary an uncertified Triangle. Square offspring has sometimes resulted from a slightly Irregular Triangle; but in almost every such case the Irregularity of the first generation is visited on the third; which either fails to attain the Pentagonal rank, or relapses to the Triangular. - -The birth of a True Equilateral Triangle from Isosceles parents is the subject of rejoicing in our country for many furlongs round. After a strict examination conducted by the Sanitary and Social Board, the infant, if certified as Regular, is with solemn ceremonial admitted into the class of Equilaterals. He is then immediately taken from his proud yet sorrowing parents and adopted by some childless Equilateral, who is bound by oath never to permit the child henceforth to enter his former home or so much as to look upon his relations again, for fear lest the freshly developed organism may, by force of unconscious imitation, fall back again into his hereditary level. - -The occasional emergence of an Equilateral from the ranks of his serf-born ancestors is welcomed, not only by the poor serfs themselves, as a gleam of light and hope shed upon the monotonous squalor of their existence, but also by the Aristocracy at large; for all the higher classes are well aware that these rare phenomena, while they do little or nothing to vulgarize their own privileges, serve as almost useful barrier against revolution from below. - -Had the acute-angled rabble been all, without exception, absolutely destitute of hope and of ambition, they might have found leaders in some of their many seditious outbreaks, so able as to render their superior numbers and strength too much even for the wisdom of the Circles. But a wise ordinance of Nature has decreed that in proportion as the working-classes increase in intelligence, knowledge, and all virtue, in that same proportion their acute angle (which makes them physically terrible) shall increase also and approximate to their comparatively harmless angle of the Equilateral Triangle. Thus, in the most brutal and formidable off the soldier class—creatures almost on a level with women in their lack of intelligence—it is found that, as they wax in the mental ability necessary to employ their tremendous penetrating power to advantage, so do they wane in the power of penetration itself. - -How admirable is the Law of Compensation! And how perfect a proof of the natural fitness and, I may almost say, the divine origin of the aristocratic constitution of the States of Flatland! By a judicious use of this Law of Nature, the Polygons and Circles are almost always able to stifle sedition in its very cradle, taking advantage of the irrepressible and boundless hopefulness of the human mind. Art also comes to the aid of Law and Order. It is generally found possible—by a little artificial compression or expansion on the part of the State physicians—to make some of the more intelligent leaders of a rebellion perfectly Regular, and to admit them at once into the privileged classes; a much larger number, who are still below the standard, allured by the prospect of being ultimately ennobled, are induced to enter the State Hospitals, where they are kept in honourable confinement for life; one or two alone of the most obstinate, foolish, and hopelessly irregular are led to execution. - -Then the wretched rabble of the Isosceles, planless and leaderless, are either transfixed without resistance by the small body of their brethren whom the Chief Circle keeps in pay for emergencies of this kind; or else more often, by means of jealousies and suspicious skillfully fomented among them by the Circular party, they are stirred to mutual warfare, and perish by one another’s angles. No less than one hundred and twenty rebellions are recorded in our annals, besides minor outbreaks numbered at two hundred and thirty-five; and they have all ended thus. - --= The End =-"; - fn main() -> glib::ExitCode { colog::init(); @@ -85,12 +14,18 @@ fn main() -> glib::ExitCode { .build(); app.connect_activate(build_ui); + app.connect_startup(|_app| { + println!("Setting default icon"); + gtk4::Window::set_default_icon_name(APP_ID); + }); + app.run() } fn build_ui(app: &Application) { - let font_manager = FontManager::new(); + let _ = font_manager.find(vec!["comic sans ms"], FontStyle::Normal).expect("Failed to find font Comic Sans MS"); + let _ = font_manager.find(vec!["Arial"], FontStyle::Normal).expect("Failed to find font Arial"); // Create a window and set the title let window = ApplicationWindow::builder() @@ -116,7 +51,7 @@ fn build_ui(app: &Application) { let desc = create_font_description(&info, 14.0); layout.set_font_description(Some(&desc)); - layout.set_text(TEXT); + layout.set_text(fontmanager::flatland::TEXT); layout.set_width(width * pango::SCALE); layout.set_alignment(pango::Alignment::Center); diff --git a/src/bin/gtk2-test.rs b/src/bin/gtk2-test.rs new file mode 100644 index 0000000..9c300fa --- /dev/null +++ b/src/bin/gtk2-test.rs @@ -0,0 +1,264 @@ +use gtk4::{glib, pango, Application, ApplicationWindow, DrawingArea}; +use gtk4::prelude::{ApplicationExt, ApplicationExtManual, DrawingAreaExt, DrawingAreaExtManual, GtkWindowExt, WidgetExt}; +use image::Rgba; +use parley::layout::{Alignment, Layout, PositionedLayoutItem}; +use parley::style::{FontWeight, StyleProperty}; +use parley::{InlineBox, LayoutContext}; +use fontmanager::font_manager::font_info::FontInfo; +use fontmanager::font_manager::manager::FontManager; +use fontmanager::font_manager::sources::FontSourceType; + +const RENDER_GLYPHS_PER_RUN : bool = false; + +#[derive(Clone, Copy, Debug, PartialEq)] +struct ColorBrush { + color: Rgba, +} + +impl Default for ColorBrush { + fn default() -> Self { + Self { + color: Rgba([0, 0, 0, 255]), + } + } +} + +const APP_ID: &str = "io.gosub.font-manager.gtk-test"; + +fn main() -> glib::ExitCode { + colog::init(); + + let app = Application::builder() + .application_id(APP_ID) + .build(); + app.connect_activate(build_ui); + + app.connect_startup(|_app| { + println!("Setting default icon"); + gtk4::Window::set_default_icon_name(APP_ID); + }); + + app.run() +} + +// struct FontRenderData<'a> { +// font_map: pango::FontMap, +// context: pango::Context, +// font_desc: Option, +// pango_font: Option>, +// +// parley_font_context: FontContext, +// parley_font_stack: Option>, +// } + +fn build_ui(app: &Application) { + // Create a window and set the title + let window = ApplicationWindow::builder() + .application(app) + .title("GTK Font Renderer") + .build(); + + // let font_map = pangocairo::FontMap::new(); + // let context = font_map.create_context(); + // + // let mut render_data = FontRenderData { + // // Pango + // font_map: font_map.clone(), + // context: context.clone(), + // font_desc: None, + // pango_font: None, + // parley_font_context: FontContext::new(), + // parley_font_stack: None, + // }; + + let manager = FontManager::new(); + let font_info = manager.find(FontSourceType::Fontkit, &["comic sans ms"], fontmanager::font_manager::font_info::FontStyle::Normal).unwrap(); + + // let text = "Some text here. Let's make it a bit longer so that line wrapping kicks in 😊. And also some Ű§Ù„Ù„ŰșŰ© Ű§Ù„ŰčŰ±ŰšÙŠŰ© arabic text.\nThis is underline and strikethrough text"; + // let text = "hello world. This is a test to see if it works! abcdefghhijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456790"; + let text = fontmanager::flatland::TEXT; + + let area = DrawingArea::default(); + area.set_hexpand(true); + area.set_vexpand(true); + area.set_draw_func(move |area, cr, width, _height| { + // Red square to indicate stuff is being drawn on screen + cr.set_source_rgba(1.0, 0.0, 0.0, 1.0); + cr.rectangle(0.0, 0.0, 100.0, 100.0); + let _ = cr.fill(); + + let mut height = 100.0; + + for fs in [32.0, 16.0, 8.0, 4.0] { + // Set font and size to use + // let fk_font = manager.fontkit_load_font(&fontinfo).unwrap(); + // let p_font = manager.parley_load_font(&fontinfo).unwrap(); + + // Create layout with parley + let layout = create_layout(&manager, &font_info, text, width as f64, fs); + let h = layout.height(); + + // Draw the layout with pango + draw(&manager, &font_info, &cr, layout, 100.0, height); + height += h + 50.0; + } + + // Get current position and add the layout height. This is the new height of the canvas in this drawing area so + // we can scroll. + area.set_content_height(height as i32 + 50); + }); + + // Of course, scrolling doesn't work... need to figure out why it doesn't work. + let scroll = gtk4::ScrolledWindow::builder() + .hscrollbar_policy(gtk4::PolicyType::Automatic) + .vscrollbar_policy(gtk4::PolicyType::Automatic) + .child(&area) + .build(); + window.set_child(Some(&scroll)); + + window.set_default_width(800); + window.set_default_height(600); + window.present(); +} + +fn draw(manager: &FontManager, font: &FontInfo, cr: >k4::cairo::Context, layout: Layout, offset_x: f32, offset_y: f32) { + for line in layout.lines() { + for item in line.items() { + match item { + PositionedLayoutItem::GlyphRun(glyph_run) => { + let run_x = offset_x + glyph_run.offset(); + let run_y = offset_y + glyph_run.baseline(); + + // @Todo: how do we find the height of the font. We need this because the baseline + // does only tell us the start of the bottom (the actual baseline). But we do not + // have any (easy) way to find the height of the font. We need this to draw the + // rectangle around the text. + + // let font_height = 48.0; // completely arbitrary value + // cr.rectangle( + // run_x as f64, + // run_y as f64 - font_height, + // glyph_run.advance() as f64, + // font_height, + // ); + // cr.set_source_rgba(rng.random(), rng.random(), rng.random(), 0.5); + // let _ = cr.fill(); + + + let font = manager.pango_load_font(&font).unwrap(); + + if RENDER_GLYPHS_PER_RUN { + // Render a whole glyph run at once. This does not work correctly + + // convert glyph_run.glyphs() to a vector of GlyphInfo + let mut glyphs = Vec::new(); + for g in glyph_run.positioned_glyphs() { + glyphs.push(g); + } + dbg!(&glyphs); + + let mut gs = pango::GlyphString::new(); + gs.set_size(glyphs.len() as i32); + for (i, glyph) in glyphs.iter().enumerate() { + let m = gs.glyph_info_mut(); + m[i].set_glyph(glyph.id as u32); + m[i].geometry_mut().set_x_offset(glyph.x as i32); + m[i].geometry_mut().set_y_offset(glyph.y as i32); + } + + cr.set_source_rgba(0.0, 0.0, 0.0, 1.0); + cr.move_to(run_x as f64, run_y as f64); + pangocairo::functions::show_glyph_string( + cr, + &font, + &mut gs, + ); + } else { + // Render per glyph + let mut c_x = run_x; + for g in glyph_run.glyphs() { + let g_x = c_x + g.x; + let g_y = run_y + g.y; + c_x += g.advance; + + let mut gs = pango::GlyphString::new(); + gs.set_size(1); + let m = gs.glyph_info_mut(); + m[0].set_glyph(g.id as u32); + + cr.set_source_rgba(0.0, 0.0, 0.0, 1.0); + cr.move_to(g_x as f64, g_y as f64); + pangocairo::functions::show_glyph_string( + cr, + &font, + &mut gs, + ); + } + } + } + PositionedLayoutItem::InlineBox(inline_box) => { + cr.rectangle( + (offset_x + inline_box.x) as f64, + (offset_y + inline_box.y) as f64, + inline_box.width as f64, + inline_box.height as f64, + ); + cr.set_source_rgba(0.0, 0.0, 0.0, 1.0); + let _ = cr.stroke(); + cr.set_source_rgba(0.0, 0.0, 1.0, 1.0); + let _ = cr.fill(); + } + }; + } + } +} + +fn create_layout(manager: &FontManager, font: &FontInfo, text: &str, width: f64, font_size: f64) -> Layout { + let display_scale = 1.0_f32; + let max_advance = Some(width as f32 * display_scale); + + let text_color = Rgba([0, 0, 0, 255]); + + let mut layout_cx = LayoutContext::new(); + + let text_brush = ColorBrush { color: text_color }; + let brush_style = StyleProperty::Brush(text_brush); + let bold_style = StyleProperty::FontWeight(FontWeight::EXTRA_BLACK); + // let underline_style = StyleProperty::Underline(true); + // let strikethrough_style = StyleProperty::Strikethrough(true); + + let mut font_context = manager.parley_context(); + let font = manager.parley_load_font(&font).unwrap(); + + let mut builder = layout_cx.ranged_builder(&mut font_context, &text, display_scale); + builder.push_default(brush_style); + builder.push_default(font); + builder.push_default(StyleProperty::LineHeight(1.3)); + builder.push_default(StyleProperty::FontSize(font_size as f32)); + builder.push_default(StyleProperty::LetterSpacing(5.0)); + + builder.push(bold_style, 6..11); + // builder.push(underline_style, 141..150); + // builder.push(strikethrough_style, 155..168); + + builder.push_inline_box(InlineBox { + id: 0, + index: 5, + width: 100.0, + height: 100.0, + }); + + builder.push_inline_box(InlineBox { + id: 1, + index: 50, + width: 100.0, + height: 30.0, + }); + + let mut layout: Layout = builder.build(text); + + layout.break_all_lines(max_advance); + layout.align(max_advance, Alignment::Start); + + layout +} diff --git a/src/bin/parley.rs b/src/bin/parley.rs new file mode 100644 index 0000000..8085742 --- /dev/null +++ b/src/bin/parley.rs @@ -0,0 +1,274 @@ +use image::codecs::png::PngEncoder; +use image::{self, Pixel, Rgba, RgbaImage}; +use parley::layout::{Alignment, Glyph, GlyphRun, Layout, PositionedLayoutItem}; +use parley::style::{FontStack, FontWeight, StyleProperty}; +use parley::{FontContext, InlineBox, LayoutContext}; +use std::fs::File; +use swash::scale::image::Content; +use swash::scale::{Render, ScaleContext, Scaler, Source, StrikeWith}; +use swash::zeno; +use swash::FontRef; +use zeno::{Format, Vector}; +use fontmanager::font_manager::FontStyle; + +#[derive(Clone, Copy, Debug, PartialEq)] +struct ColorBrush { + color: Rgba, +} + +impl Default for ColorBrush { + fn default() -> Self { + Self { + color: Rgba([0, 0, 0, 255]), + } + } +} + +fn main() { + colog::init(); + + let display_scale = 1.0; + let max_advance = Some(400.0 * display_scale); + + let text_color = Rgba([0,0,0,255]); + let bg_color = Rgba([255,255,255,255]); + + let padding = 20; + + let mut font_cx = FontContext::new(); + + font_cx.collection.family_names().for_each(|name| { + println!("Family: {}", name); + }); + let font_stack = FontStack::from("comic sans ms"); + + let fontmanager = fontmanager::font_manager::FontManager::new(); + let Some(font_info) = fontmanager.find(vec!["arial"], FontStyle::Normal) else { + panic!("Font not found"); + }; + let font = fontmanager.load(&font_info).expect("Error loading font"); + + + + + let mut layout_cx = LayoutContext::new(); + let mut scale_cx = ScaleContext::new(); + + let text_brush = ColorBrush { color: text_color }; + let brush_style = StyleProperty::Brush(text_brush); + let bold_style = StyleProperty::FontWeight(FontWeight::EXTRA_BLACK); + let underline_style = StyleProperty::Underline(true); + let strikethrough_style = StyleProperty::Strikethrough(true); + + let text = "Some text here. Let's make it a bit longer so that line wrapping kicks in 😊. And also some Ű§Ù„Ù„ŰșŰ© Ű§Ù„ŰčŰ±ŰšÙŠŰ© arabic text.\nThis is underline and strikethrough text"; + // let text = fontmanager::flatland::TEXT; + + let mut builder = layout_cx.ranged_builder(&mut font_cx, &text, display_scale); + builder.push_default(brush_style); + builder.push_default(font_stack); + builder.push_default(StyleProperty::LineHeight(1.3)); + builder.push_default(StyleProperty::FontSize(16.0)); + + builder.push(bold_style, 4..8); + builder.push(underline_style, 141..150); + builder.push(strikethrough_style, 155..168); + + builder.push_inline_box(InlineBox { + id: 0, + index: 0, + width: 50.0, + height: 50.0, + }); + + builder.push_inline_box(InlineBox { + id: 1, + index: 50, + width: 50.0, + height: 30.0, + }); + + let mut layout: Layout = builder.build(text); + + layout.break_all_lines(max_advance); + layout.align(max_advance, Alignment::Start); + + let width = layout.width().ceil() as u32 + (padding * 2); + let height = layout.height().ceil() as u32 + (padding * 2); + let mut img = RgbaImage::from_pixel(width, height, bg_color); + + for line in layout.lines() { + for item in line.items() { + match item { + PositionedLayoutItem::GlyphRun(glyph_run) => { + render_glyph_run(&mut scale_cx, &glyph_run, &mut img, padding); + } + PositionedLayoutItem::InlineBox(inline_box) => { + for x_off in 0..(inline_box.width.floor() as u32) { + for y_off in 0..(inline_box.height.floor() as u32) { + let x = inline_box.x as u32 + x_off + padding; + let y = inline_box.y as u32 + y_off + padding; + img.put_pixel(x, y, Rgba([0, 0, 0, 64])); + } + } + } + }; + } + } + + // Write image to PNG file in examples/_output dir + let output_path = { + let path = std::path::PathBuf::from(file!()); + let mut path = std::fs::canonicalize(path).unwrap(); + path.pop(); + path.pop(); + path.pop(); + path.push("_output"); + drop(std::fs::create_dir(path.clone())); + path.push("swash_render.png"); + path + }; + let output_file = File::create(output_path).unwrap(); + let png_encoder = PngEncoder::new(output_file); + img.write_with_encoder(png_encoder).unwrap(); +} + + +fn render_glyph_run( + context: &mut ScaleContext, + glyph_run: &GlyphRun<'_, ColorBrush>, + img: &mut RgbaImage, + padding: u32, +) { + // Resolve properties of the GlyphRun + let mut run_x = glyph_run.offset(); + let run_y = glyph_run.baseline(); + let style = glyph_run.style(); + let color = style.brush; + + // Get the "Run" from the "GlyphRun" + let run = glyph_run.run(); + + // Resolve properties of the Run + let font = run.font(); + let font_size = run.font_size(); + let normalized_coords = run.normalized_coords(); + + // Convert from parley::Font to swash::FontRef + let font_ref = FontRef::from_index(font.data.as_ref(), font.index as usize).unwrap(); + + // Build a scaler. As the font properties are constant across an entire run of glyphs + // we can build one scaler for the run and reuse it for each glyph. + let mut scaler = context + .builder(font_ref) + .size(font_size) + .hint(true) + .normalized_coords(normalized_coords) + .build(); + + // Iterates over the glyphs in the GlyphRun + for glyph in glyph_run.glyphs() { + let glyph_x = run_x + glyph.x + (padding as f32); + let glyph_y = run_y - glyph.y + (padding as f32); + run_x += glyph.advance; + + render_glyph(img, &mut scaler, color, glyph, glyph_x, glyph_y); + } + + // Draw decorations: underline & strikethrough + let style = glyph_run.style(); + let run_metrics = run.metrics(); + if let Some(decoration) = &style.underline { + let offset = decoration.offset.unwrap_or(run_metrics.underline_offset); + let size = decoration.size.unwrap_or(run_metrics.underline_size); + render_decoration(img, glyph_run, decoration.brush, offset, size, padding); + } + if let Some(decoration) = &style.strikethrough { + let offset = decoration + .offset + .unwrap_or(run_metrics.strikethrough_offset); + let size = decoration.size.unwrap_or(run_metrics.strikethrough_size); + render_decoration(img, glyph_run, decoration.brush, offset, size, padding); + } +} + +fn render_decoration( + img: &mut RgbaImage, + glyph_run: &GlyphRun<'_, ColorBrush>, + brush: ColorBrush, + offset: f32, + width: f32, + padding: u32, +) { + let y = glyph_run.baseline() - offset; + for pixel_y in y as u32..(y + width) as u32 { + for pixel_x in glyph_run.offset() as u32..(glyph_run.offset() + glyph_run.advance()) as u32 + { + img.get_pixel_mut(pixel_x + padding, pixel_y + padding) + .blend(&brush.color); + } + } +} + +fn render_glyph( + img: &mut RgbaImage, + scaler: &mut Scaler<'_>, + brush: ColorBrush, + glyph: Glyph, + glyph_x: f32, + glyph_y: f32, +) { + // Compute the fractional offset + // You'll likely want to quantize this in a real renderer + let offset = Vector::new(glyph_x.fract(), glyph_y.fract()); + + // Render the glyph using swash + let rendered_glyph = Render::new( + // Select our source order + &[ + Source::ColorOutline(0), + Source::ColorBitmap(StrikeWith::BestFit), + Source::Outline, + ], + ) + // Select the simple alpha (non-subpixel) format + .format(Format::Alpha) + // Apply the fractional offset + .offset(offset) + // Render the image + .render(scaler, glyph.id) + .unwrap(); + + let glyph_width = rendered_glyph.placement.width; + let glyph_height = rendered_glyph.placement.height; + let glyph_x = (glyph_x.floor() as i32 + rendered_glyph.placement.left) as u32; + let glyph_y = (glyph_y.floor() as i32 - rendered_glyph.placement.top) as u32; + + match rendered_glyph.content { + Content::Mask => { + let mut i = 0; + let bc = brush.color; + for pixel_y in 0..glyph_height { + for pixel_x in 0..glyph_width { + let x = glyph_x + pixel_x; + let y = glyph_y + pixel_y; + let alpha = rendered_glyph.data[i]; + let color = Rgba([bc[0], bc[1], bc[2], alpha]); + img.get_pixel_mut(x, y).blend(&color); + i += 1; + } + } + } + Content::SubpixelMask => unimplemented!(), + Content::Color => { + let row_size = glyph_width as usize * 4; + for (pixel_y, row) in rendered_glyph.data.chunks_exact(row_size).enumerate() { + for (pixel_x, pixel) in row.chunks_exact(4).enumerate() { + let x = glyph_x + pixel_x as u32; + let y = glyph_y + pixel_y as u32; + let color = Rgba(pixel.try_into().expect("Not RGBA")); + img.get_pixel_mut(x, y).blend(&color); + } + } + } + }; +} \ No newline at end of file diff --git a/src/bin/vello-test.rs b/src/bin/vello-test.rs new file mode 100644 index 0000000..94fbbd5 --- /dev/null +++ b/src/bin/vello-test.rs @@ -0,0 +1,168 @@ +use std::num::NonZeroUsize; +use std::sync::Arc; +use vello::{wgpu, AaConfig, RenderParams, Renderer, RendererOptions, Scene}; +use vello::util::{DeviceHandle, RenderContext, RenderSurface}; +use winit::application::ApplicationHandler; +use winit::event::WindowEvent; +use winit::event_loop::{ActiveEventLoop, ControlFlow, EventLoop}; +use winit::window::{Window, WindowId}; +use vello::kurbo::{Affine, Circle, Ellipse, Line, RoundedRect, Stroke}; +use vello::peniko::Color; + +const AA_CONFIGS: [AaConfig; 3] = [AaConfig::Area, AaConfig::Msaa8, AaConfig::Msaa16]; + +fn main() { + colog::init(); + + let event_loop = EventLoop::new().unwrap(); + event_loop.set_control_flow(ControlFlow::Poll); + // event_loop.set_control_flow(ControlFlow::Wait); + + let mut app = App::new(); + let _ = event_loop.run_app(&mut app); +} + + +struct App<'s> { + render_ctx: RenderContext, + renderer: Option, + surface: Option>, // Surface must be before window for safety during cleanup + window: Option>, +} + +impl App<'_> { + fn new() -> Self { + App { + window: None, + render_ctx: RenderContext::new(), + renderer: None, + surface: None, + } + } +} + +impl ApplicationHandler for App<'_> { + + fn resumed(&mut self, event_loop: &ActiveEventLoop) { + if self.window.is_some() { + return + } + + let mut attribs = Window::default_attributes(); + attribs.title = "Vello Font Test".to_string(); + let window = Arc::new(event_loop.create_window(attribs).unwrap()); + + let size = window.inner_size(); + let surface_future = self.render_ctx.create_surface(window.clone(), size.width, size.height, wgpu::PresentMode::AutoVsync); + let surface = pollster::block_on(surface_future).expect("Failed to create surface"); + + let dev_handle = &self.render_ctx.devices[surface.dev_id]; + + let renderer = Renderer::new(&dev_handle.device, RendererOptions { + surface_format: Some(surface.format), + use_cpu: false, + antialiasing_support: AA_CONFIGS.iter().copied().collect(), + num_init_threads: NonZeroUsize::new(0), + }); + + // let size = window.inner_size(); + // let config = wgpu::SurfaceConfiguration { + // usage: wgpu::TextureUsages::RENDER_ATTACHMENT, + // format: surface.get_supported_formats(&adapter)[0], + // width: size.width, + // height: size.height, + // present_mode: wgpu::PresentMode::Fifo, + // alpha_mode: wgpu::CompositeAlphaMode::Auto, + // view_formats: vec![], + // }; + // surface.configure(&device, &config); + + +// STEP 2: Create a scene + + // let mut scene = Scene::default(); + // scene.append(&Draw::Fill(Fill::new( + // FillStyle::default(), + // Transform::identity(), + // Rect::new(100.0, 100.0, 300.0, 300.0).into_path(), + // None, + // ))); + + self.window = Some(window); + self.surface = Some(surface); + self.renderer = Some(renderer.unwrap()); + } + + fn window_event(&mut self, event_loop: &ActiveEventLoop, _id: WindowId, event: WindowEvent) { + match event { + WindowEvent::CloseRequested => { + event_loop.exit(); + }, + WindowEvent::Resized(size) => { + self.render_ctx.resize_surface(self.surface.as_mut().unwrap(), size.width, size.height); + }, + WindowEvent::RedrawRequested => { + let surface = self.surface.as_ref().unwrap(); + + let dev_id = surface.dev_id; + let DeviceHandle { device, queue, .. } = &self.render_ctx.devices[dev_id]; + + let width = surface.config.width; + let height = surface.config.height; + + let surface_texture = surface.surface.get_current_texture().expect("Failed to get current texture"); + let render_params = RenderParams { + base_color: Color::YELLOW_GREEN, + width, + height, + antialiasing_method: AaConfig::Area, + }; + + let mut scene = Scene::new(); + // Draw an outlined rectangle + let stroke = Stroke::new(6.0); + let rect = RoundedRect::new(10.0, 10.0, 240.0, 240.0, 20.0); + let rect_stroke_color = Color::YELLOW_GREEN; + scene.stroke(&stroke, Affine::IDENTITY, rect_stroke_color, None, &rect); + + // Draw a filled circle + let circle = Circle::new((420.0, 200.0), 120.0); + let circle_fill_color = Color::REBECCA_PURPLE; + scene.fill( + vello::peniko::Fill::NonZero, + Affine::IDENTITY, + circle_fill_color, + None, + &circle, + ); + + // Draw a filled ellipse + let ellipse = Ellipse::new((250.0, 420.0), (100.0, 160.0), -90.0); + let ellipse_fill_color = Color::BLUE_VIOLET; + scene.fill( + vello::peniko::Fill::NonZero, + Affine::IDENTITY, + ellipse_fill_color, + None, + &ellipse, + ); + + // Draw a straight line + let line = Line::new((260.0, 20.0), (620.0, 100.0)); + let line_stroke_color = Color::FIREBRICK; + scene.stroke(&stroke, Affine::IDENTITY, line_stroke_color, None, &line); + + let _ = self.renderer.as_mut().unwrap().render_to_surface( + &device, + &queue, + &scene, + &surface_texture, + &render_params + ); + + surface_texture.present(); + }, + _ => () + } + } +} diff --git a/src/flatland.rs b/src/flatland.rs new file mode 100644 index 0000000..f84f9b9 --- /dev/null +++ b/src/flatland.rs @@ -0,0 +1,69 @@ +pub const TEXT: &str = r"§ 1 Of the Nature of Flatland + +I call our world Flatland, not because we call it so, but to make its nature clearer to you, my happy readers, who are privileged to live in Space. + +Imagine a vast sheet of paper on which straight Lines, Triangles, Squares, Pentagons, Hexagons, and other figures, instead of remaining fixed in their places, move freely about, on or in the surface, but without the power of rising above or sinking below it, very much like shadows—only hard with luminous edges—and you will then have a pretty correct notion of my country and countrymen. Alas, a few years ago, I should have said “my universe:” but now my mind has been opened to higher views of things. + +In such a country, you will perceive at once that it is impossible that there should be anything of what you call a “solid” kind; but I dare say you will suppose that we could at least distinguish by sight the Triangles, Squares, and other figures, moving about as I have described them. On the contrary, we could see nothing of the kind, not at least so as to distinguish one figure from another. Nothing was visible, nor could be visible, to us, except Straight Lines; and the necessity of this I will speedily demonstrate. + +Place a penny on the middle of one of your tables in Space; and leaning over it, look down upon it. It will appear a circle. + +But now, drawing back to the edge of the table, gradually lower your eye (thus bringing yourself more and more into the condition of the inhabitants of Flatland), and you will find the penny becoming more and more oval to your view, and at last when you have placed your eye exactly on the edge of the table (so that you are, as it were, actually a Flatlander) the penny will then have ceased to appear oval at all, and will have become, so far as you can see, a straight line. + +The same thing would happen if you were to treat in the same way a Triangle, or a Square, or any other figure cut out from pasteboard. As soon as you look at it with your eye on the edge of the table, you will find that it ceases to appear to you as a figure, and that it becomes in appearance a straight line. Take for example an equilateral Triangle—who represents with us a Tradesman of the respectable class. Figure 1 represents the Tradesman as you would see him while you were bending over him from above; figures 2 and 3 represent the Tradesman, as you would see him if your eye were close to the level, or all but on the level of the table; and if your eye were quite on the level of the table (and that is how we see him in Flatland) you would see nothing but a straight line. + + When I was in Spaceland I heard that your sailors have very similar experiences while they traverse your seas and discern some distant island or coast lying on the horizon. The far-off land may have bays, forelands, angles in and out to any number and extent; yet at a distance you see none of these (unless indeed your sun shines bright upon them revealing the projections and retirements by means of light and shade), nothing but a grey unbroken line upon the water. + +Well, that is just what we see when one of our triangular or other acquaintances comes towards us in Flatland. As there is neither sun with us, nor any light of such a kind as to make shadows, we have none of the helps to the sight that you have in Spaceland. If our friend comes closer to us we see his line becomes larger; if he leaves us it becomes smaller; but still he looks like a straight line; be he a Triangle, Square, Pentagon, Hexagon, Circle, what you will—a straight Line he looks and nothing else. + +You may perhaps ask how under these disadvantagous circumstances we are able to distinguish our friends from one another: but the answer to this very natural question will be more fitly and easily given when I come to describe the inhabitants of Flatland. For the present let me defer this subject, and say a word or two about the climate and houses in our country. + +§ 2 Of the Climate and Houses in Flatland + +As with you, so also with us, there are four points of the compass North, South, East, and West. + +There being no sun nor other heavenly bodies, it is impossible for us to determine the North in the usual way; but we have a method of our own. By a Law of Nature with us, there is a constant attraction to the South; and, although in temperate climates this is very slight—so that even a Woman in reasonable health can journey several furlongs northward without much difficulty—yet the hampering effort of the southward attraction is quite sufficient to serve as a compass in most parts of our earth. Moreover, the rain (which falls at stated intervals) coming always from the North, is an additional assistance; and in the towns we have the guidance of the houses, which of course have their side-walls running for the most part North and South, so that the roofs may keep off the rain from the North. In the country, where there are no houses, the trunks of the trees serve as some sort of guide. Altogether, we have not so much difficulty as might be expected in determining our bearings. + +Yet in our more temperate regions, in which the southward attraction is hardly felt, walking sometimes in a perfectly desolate plain where there have been no houses nor trees to guide me, I have been occasionally compelled to remain stationary for hours together, waiting till the rain came before continuing my journey. On the weak and aged, and especially on delicate Females, the force of attraction tells much more heavily than on the robust of the Male Sex, so that it is a point of breeding, if you meet a Lady on the street, always to give her the North side of the way—by no means an easy thing to do always at short notice when you are in rude health and in a climate where it is difficult to tell your North from your South. + +Windows there are none in our houses: for the light comes to us alike in our homes and out of them, by day and by night, equally at all times and in all places, whence we know not. It was in old days, with our learned men, an interesting and oft-investigate question, “What is the origin of light?” and the solution of it has been repeatedly attempted, with no other result than to crowd our lunatic asylums with the would-be solvers. Hence, after fruitless attempts to suppress such investigations indirectly by making them liable to a heavy tax, the Legislature, in comparatively recent times, absolutely prohibited them. I—alas, I alone in Flatland—know now only too well the true solution of this mysterious problem; but my knowledge cannot be made intelligible to a single one of my countrymen; and I am mocked at—I, the sole possessor of the truths of Space and of the theory of the introduction of Light from the world of three Dimensions—as if I were the maddest of the mad! But a truce to these painful digressions: let me return to our homes. + +The most common form for the construction of a house is five-sided or pentagonal, as in the annexed figure. The two Northern sides RO, OF, constitute the roof, and for the most part have no doors; on the East is a small door for the Women; on the West a much larger one for the Men; the South side or floor is usually doorless. + + Square and triangular houses are not allowed, and for this reason. The angles of a Square (and still more those of an equilateral Triangle,) being much more pointed than those of a Pentagon, and the lines of inanimate objects (such as houses) being dimmer than the lines of Men and Women, it follows that there is no little danger lest the points of a square or triangular house residence might do serious injury to an inconsiderate or perhaps absentminded traveller suddenly running against them: and therefore, as early as the eleventh century of our era, triangular houses were universally forbidden by Law, the only exceptions being fortifications, powder-magazines, barracks, and other state buildings, which is not desirable that the general public should approach without circumspection. + +At this period, square houses were still everywhere permitted, though discouraged by a special tax. But, about three centuries afterwards, the Law decided that in all towns containing a population above ten thousand, the angle of a Pentagon was the smallest house-angle that could be allowed consistently with the public safety. The good sense of the community has seconded the efforts of the Legislature; and now, even in the country, the pentagonal construction has superseded every other. It is only now and then in some very remote and backward agricultural district that an antiquarian may still discover a square house. + +§ 3 Concerning the Inhabitants of Flatland + +The greatest length or breadth of a full grown inhabitant of Flatland may be estimated at about eleven of your inches. Twelve inches may be regarded as a maximum. + +Our Women are Straight Lines. + +Our Soldiers and Lowest Class of Workmen are Triangles with two equal sides, each about eleven inches long, and a base or third side so short (often not exceeding half an inch) that they form at their vertices a very sharp and formidable angle. Indeed when their bases are of the most degraded type (not more than the eighth part of an inch in size), they can hardly be distinguished from Straight lines or Women; so extremely pointed are their vertices. With us, as with you, these Triangles are distinguished from others by being called Isosceles; and by this name I shall refer to them in the following pages. + +Our Middle Class consists of Equilateral or Equal-Sided Triangles. + +Our Professional Men and Gentlemen are Squares (to which class I myself belong) and Five-Sided Figures or Pentagons. + +Next above these come the Nobility, of whom there are several degrees, beginning at Six-Sided Figures, or Hexagons, and from thence rising in the number of their sides till they receive the honourable title of Polygonal, or many-Sided. Finally when the number of the sides becomes so numerous, and the sides themselves so small, that the figure cannot be distinguished from a circle, he is included in the Circular or Priestly order; and this is the highest class of all. + +It is a Law of Nature with us that a male child shall have one more side than his father, so that each generation shall rise (as a rule) one step in the scale of development and nobility. Thus the son of a Square is a Pentagon; the son of a Pentagon, a Hexagon; and so on. + +But this rule applies not always to the Tradesman, and still less often to the Soldiers, and to the Workmen; who indeed can hardly be said to deserve the name of human Figures, since they have not all their sides equal. With them therefore the Law of Nature does not hold; and the son of an Isosceles (i.e. a Triangle with two sides equal) remains Isosceles still. Nevertheless, all hope is not such out, even from the Isosceles, that his posterity may ultimately rise above his degraded condition. For, after a long series of military successes, or diligent and skillful labours, it is generally found that the more intelligent among the Artisan and Soldier classes manifest a slight increase of their third side or base, and a shrinkage of the two other sides. Intermarriages (arranged by the Priests) between the sons and daughters of these more intellectual members of the lower classes generally result in an offspring approximating still more to the type of the Equal-Sided Triangle. + +Rarely—in proportion to the vast numbers of Isosceles births—is a genuine and certifiable Equal-Sided Triangle produced from Isosceles parents.[1] Such a birth requires, as its antecedents, not only a series of carefully arranged intermarriages, but also a long-continued exercise of frugality and self-control on the part of the would-be ancestors of the coming Equilateral, and a patient, systematic, and continuous development of the Isosceles intellect through many generations. + +[1] “What need of a certificate?” a Spaceland critic may ask: “Is not the procreation of a Square Son a certificate from Nature herself, proving the Equal-sidedness of the Father?” I reply that no Lady of any position will mary an uncertified Triangle. Square offspring has sometimes resulted from a slightly Irregular Triangle; but in almost every such case the Irregularity of the first generation is visited on the third; which either fails to attain the Pentagonal rank, or relapses to the Triangular. + +The birth of a True Equilateral Triangle from Isosceles parents is the subject of rejoicing in our country for many furlongs round. After a strict examination conducted by the Sanitary and Social Board, the infant, if certified as Regular, is with solemn ceremonial admitted into the class of Equilaterals. He is then immediately taken from his proud yet sorrowing parents and adopted by some childless Equilateral, who is bound by oath never to permit the child henceforth to enter his former home or so much as to look upon his relations again, for fear lest the freshly developed organism may, by force of unconscious imitation, fall back again into his hereditary level. + +The occasional emergence of an Equilateral from the ranks of his serf-born ancestors is welcomed, not only by the poor serfs themselves, as a gleam of light and hope shed upon the monotonous squalor of their existence, but also by the Aristocracy at large; for all the higher classes are well aware that these rare phenomena, while they do little or nothing to vulgarize their own privileges, serve as almost useful barrier against revolution from below. + +Had the acute-angled rabble been all, without exception, absolutely destitute of hope and of ambition, they might have found leaders in some of their many seditious outbreaks, so able as to render their superior numbers and strength too much even for the wisdom of the Circles. But a wise ordinance of Nature has decreed that in proportion as the working-classes increase in intelligence, knowledge, and all virtue, in that same proportion their acute angle (which makes them physically terrible) shall increase also and approximate to their comparatively harmless angle of the Equilateral Triangle. Thus, in the most brutal and formidable off the soldier class—creatures almost on a level with women in their lack of intelligence—it is found that, as they wax in the mental ability necessary to employ their tremendous penetrating power to advantage, so do they wane in the power of penetration itself. + +How admirable is the Law of Compensation! And how perfect a proof of the natural fitness and, I may almost say, the divine origin of the aristocratic constitution of the States of Flatland! By a judicious use of this Law of Nature, the Polygons and Circles are almost always able to stifle sedition in its very cradle, taking advantage of the irrepressible and boundless hopefulness of the human mind. Art also comes to the aid of Law and Order. It is generally found possible—by a little artificial compression or expansion on the part of the State physicians—to make some of the more intelligent leaders of a rebellion perfectly Regular, and to admit them at once into the privileged classes; a much larger number, who are still below the standard, allured by the prospect of being ultimately ennobled, are induced to enter the State Hospitals, where they are kept in honourable confinement for life; one or two alone of the most obstinate, foolish, and hopelessly irregular are led to execution. + +Then the wretched rabble of the Isosceles, planless and leaderless, are either transfixed without resistance by the small body of their brethren whom the Chief Circle keeps in pay for emergencies of this kind; or else more often, by means of jealousies and suspicious skillfully fomented among them by the Circular party, they are stirred to mutual warfare, and perish by one another’s angles. No less than one hundred and twenty rebellions are recorded in our annals, besides minor outbreaks numbered at two hundred and thirty-five; and they have all ended thus. + +-= The End =-"; diff --git a/src/font_manager.rs b/src/font_manager.rs index 0bc80ae..60a5a9b 100644 --- a/src/font_manager.rs +++ b/src/font_manager.rs @@ -1,187 +1,3 @@ -use std::collections::HashMap; -use std::fmt::{Display, Formatter}; -use std::path::PathBuf; -use std::sync::{Arc, Mutex}; -use anyhow::anyhow; -use font_kit::family_name::FamilyName; -use font_kit::handle::Handle; -use font_kit::properties::Properties; -use font_kit::source::SystemSource; -use cairo::freetype::{Face, Library}; -use log::{error, info}; - -#[allow(dead_code)] -const LOG_TARGET: &str = "font-manager"; - -#[derive(Clone, Debug)] -pub enum FontStyle { - Normal, - Italic, - Oblique, -} - -impl Display for FontStyle { - fn fmt(&self, f: &mut Formatter) -> std::fmt::Result { - match self { - FontStyle::Normal => write!(f, "Normal"), - FontStyle::Italic => write!(f, "Italic"), - FontStyle::Oblique => write!(f, "Oblique"), - } - } -} - -#[derive(Clone, Debug)] -pub struct FontInfo { - /// Family name of the font (e.g. "Arial") - pub family: String, - /// Style of the font - pub style: FontStyle, - /// Weight (400 normal, 700 bold) - pub weight: f32, - /// Stretch (1.0 normal, < 1.0 condensed) - pub stretch: f32, - /// Font is monospaced - pub monospaced: bool, - /// Path to the font file - pub path: PathBuf, - /// Index of the face in the font-file - pub index: Option, -} - -#[allow(unused)] -pub struct FontManager { - source: SystemSource, - ft_library: Library, - /// Vec of all font-info structures found - font_info: Vec, - /// List of all font handles - handles: Vec, - /// Cache of font faces that are loaded through freetype - face_cache: Arc>>, -} - -impl FontManager { - pub fn new() -> Self { - let library = Library::init().expect("unable to init freetype library"); - - let source = SystemSource::new(); - let handles = source.all_fonts().unwrap(); - - let mut font_info = Vec::new(); - for handle in &handles { - match Self::handle_to_info(handle) { - Ok(info) => font_info.push(info), - Err(e) => { - error!(target: LOG_TARGET, "unable to load font: {}", e); - } - } - } - - FontManager { - source, - ft_library: library, - font_info: font_info, - handles, - face_cache: Arc::new(Mutex::new(HashMap::new())), - } - } - - /// Returns all available fonts - pub fn available_fonts(&self) -> Vec { - let mut fonts = self.font_info.clone(); - fonts.sort_by_key(|fi| fi.family.clone()); - - fonts - } - - /// Returns the first font that matches the given family and style - pub fn find(&self, families: Vec<&str>, style: FontStyle) -> Option { - let mut f = Vec::new(); - for family in families { - let family = family.replace('\'', ""); - let family = family.trim(); - f.push(match family { - "serif" => FamilyName::Serif, - "sans-serif" => FamilyName::SansSerif, - "monospace" => FamilyName::Monospace, - "cursive" => FamilyName::Cursive, - "fantasy" => FamilyName::Fantasy, - _ => FamilyName::Title(family.to_string()), - }); - } - - let mut properties = Properties::default(); - match style { - FontStyle::Italic => properties.style(font_kit::properties::Style::Italic), - FontStyle::Oblique => properties.style(font_kit::properties::Style::Oblique), - FontStyle::Normal => properties.style(font_kit::properties::Style::Normal), - }; - - match self.source.select_best_match(&f, &properties) { - Ok(handle) => match Self::handle_to_info(&handle) { - Ok(info) => Some(info), - Err(_) => None, - } - Err(_) => None, - } - } - - /// Load the font face for the given font info - pub fn load(&self, font_info: &FontInfo) -> Result { - let cache_key = format!("{}:{}", font_info.family, font_info.style); - if let Some(font_face) = self.face_cache.lock().unwrap().get(&cache_key) { - info!(target: LOG_TARGET, "Font loaded from cache: {}", cache_key); - return Ok(font_face.clone()); - } - - let face = match self.ft_library.new_face(&font_info.path, font_info.index.unwrap_or(0) as isize) { - Ok(face) => face, - Err(e) => { - error!(target: LOG_TARGET, "unable to load font: {}", e); - return Err(anyhow!("unable to load font")) - } - }; - - info!(target: LOG_TARGET, - "Font loaded: {} (number of glyphs: {})", - face.family_name().unwrap_or("Unknown".parse()?), - face.num_glyphs() - ); - - info!(target: LOG_TARGET, "Caching font face: {}", cache_key); - self.face_cache.lock().unwrap().insert(cache_key.clone(), face.clone()); - Ok(face) - } - - /// Converts a font handle to a gosub font info structure - fn handle_to_info(handle: &Handle) -> Result { - let font = handle.load().unwrap(); - - let family = font.family_name(); - let props = font.properties(); - - let style = match props.style { - font_kit::properties::Style::Normal => FontStyle::Normal, - font_kit::properties::Style::Italic => FontStyle::Italic, - font_kit::properties::Style::Oblique => FontStyle::Oblique, - }; - - let Handle::Path { - ref path, - font_index, - } = handle else { - error!(target: LOG_TARGET, "Expected a path handle. Got: {:?}", handle); - return Err(anyhow!("Expected a path handle")); - }; - - Ok(FontInfo { - family, - style, - weight: props.weight.0, - stretch: props.stretch.0, - monospaced: font.is_monospace(), - path: path.clone(), - index: Some(*font_index as i32), - }) - } -} +pub mod manager; +pub mod font_info; +pub mod sources; diff --git a/src/font_manager/font_info.rs b/src/font_manager/font_info.rs new file mode 100644 index 0000000..9bef8df --- /dev/null +++ b/src/font_manager/font_info.rs @@ -0,0 +1,39 @@ +use std::path::PathBuf; +use crate::font_manager::sources::FontSourceType; + +#[derive(Clone, Debug)] +pub enum FontStyle { + Normal, + Italic, + Oblique, +} + +impl std::fmt::Display for FontStyle { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + FontStyle::Normal => write!(f, "Normal"), + FontStyle::Italic => write!(f, "Italic"), + FontStyle::Oblique => write!(f, "Oblique"), + } + } +} + +#[derive(Clone, Debug)] +pub struct FontInfo { + /// Family name of the font (e.g. "Arial") + pub family: String, + /// Style of the font + pub style: FontStyle, + /// Weight (400 normal, 700 bold) + pub weight: f32, + /// Stretch (1.0 normal, < 1.0 condensed) + pub stretch: f32, + /// Font is monospaced + pub monospaced: bool, + /// Path to the font file + pub path: Option, + /// Index of the face in the font-file + pub index: Option, + /// Source type of the font + pub source_type: FontSourceType, +} \ No newline at end of file diff --git a/src/font_manager/manager.rs b/src/font_manager/manager.rs new file mode 100644 index 0000000..f1b4ed0 --- /dev/null +++ b/src/font_manager/manager.rs @@ -0,0 +1,109 @@ +use std::collections::HashMap; +use anyhow::anyhow; +use log::error; +use crate::font_manager::font_info::{FontInfo, FontStyle}; +use crate::font_manager::sources::{FontSource, FontSourceType}; +use crate::font_manager::sources::fontique::FontiqueSource; +use crate::font_manager::sources::fontkit::FontKitSource; +use crate::font_manager::sources::pango::PangoSource; +use crate::font_manager::sources::parley::ParleySource; + +#[allow(dead_code)] +pub const LOG_TARGET: &str = "font-manager"; + +pub struct FontManager { + sources: HashMap>, +} + +impl FontManager { + pub fn new() -> Self { + let mut sources : HashMap> = HashMap::new(); + + sources.insert(FontSourceType::Fontkit, Box::new(FontKitSource::new())); + sources.insert(FontSourceType::Fontique, Box::new(FontiqueSource::new())); + sources.insert(FontSourceType::Parley, Box::new(ParleySource::new())); + sources.insert(FontSourceType::Pango, Box::new(PangoSource::new())); + + Self { + sources, + } + } + + /// Returns all available fonts for given source-type + pub fn available_fonts(&self, source_type: FontSourceType) -> Vec { + match self.sources.get(&source_type) { + Some(source) => { + let mut fonts = source.available_fonts().to_vec(); + fonts.sort_by_key(|fi| fi.family.clone()); + fonts + }, + None => { + error!(target: LOG_TARGET, "Unknown font source: {:?}", source_type); + vec![] + } + } + } + + pub fn find(&self, source_type: FontSourceType, families: &[&str], style: FontStyle) -> Option { + match self.sources.get(&source_type) { + Some(source) => source.find(families, style).ok(), + None => { + error!(target: LOG_TARGET, "Unknown font source: {:?}", source_type); + None + } + } + } +} + +impl FontManager { + pub fn fontique_load_font(&self, _font_info: &FontInfo) -> Result { + let Some(_source) = self.sources.get(&FontSourceType::Fontique) else { + return Err(anyhow!("Fontique source not found")) + }; + + let _a = 1; + + Err(anyhow!("Not implemented")) + } + + pub fn fontkit_load_font(&self, _font_info: &FontInfo) -> Result { + let Some(_source) = self.sources.get(&FontSourceType::Fontkit) else { + return Err(anyhow!("Fontique source not found")) + }; + + Err(anyhow!("Not implemented")) + } + + pub fn parley_load_font(&self, _font_info: &FontInfo) -> Result { + let Some(_source) = self.sources.get(&FontSourceType::Parley) else { + return Err(anyhow!("Parley source not found")) + }; + + Err(anyhow!("Not implemented")) + } + + pub fn pango_load_font(&self, _font_info: &FontInfo) -> Result { + let Some(_source) = self.sources.get(&FontSourceType::Pango) else { + return Err(anyhow!("Pango source not found")) + }; + + Err(anyhow!("Not implemented")) + } + + // pub fn pango_context(&self) { + // let Some(_source) = self.sources.get(&FontSourceType::Pango) else { + // return Err(anyhow!("Pango source not found")) + // }; + // + // _source.context(); + // + // } + // + // pub fn pango_stack(&self) { + // let Some(_source) = self.sources.get(&FontSourceType::Pango) else { + // return Err(anyhow!("Pango source not found")) + // }; + // + // _source.context() + // } +} diff --git a/src/font_manager/sources.rs b/src/font_manager/sources.rs new file mode 100644 index 0000000..de729a2 --- /dev/null +++ b/src/font_manager/sources.rs @@ -0,0 +1,20 @@ +use crate::font_manager::font_info::{FontInfo, FontStyle}; + +pub mod fontkit; +pub mod fontique; +pub mod parley; +pub mod pango; + +pub trait FontSource { + fn new() -> Self where Self: Sized; + fn available_fonts(&self) -> &[FontInfo]; + fn find(&self, family: &[&str], style: FontStyle) -> Result; +} + +#[derive(Clone, Copy, Hash, Eq, PartialEq, Debug)] +pub enum FontSourceType { + Fontkit, + Fontique, + Parley, + Pango, +} \ No newline at end of file diff --git a/src/font_manager/sources/fontique.rs b/src/font_manager/sources/fontique.rs new file mode 100644 index 0000000..5add0f5 --- /dev/null +++ b/src/font_manager/sources/fontique.rs @@ -0,0 +1,100 @@ +use std::collections::HashSet; +use std::path::{Path, PathBuf}; +use log::info; +use anyhow::Error; +use fontique::{Collection, CollectionOptions, SourceKind}; +use crate::font_manager::font_info::{FontInfo, FontStyle}; +use crate::font_manager::sources::{FontSource, FontSourceType}; + +#[allow(unused)] +pub struct FontiqueSource { + collection: Collection, + font_info: Vec +} + +impl FontSource for FontiqueSource { + fn new() -> Self { + let mut font_info = Vec::new(); + let mut coll = Collection::new(CollectionOptions::default()); + + let mut seen_paths: HashSet = HashSet::new(); + + let names: Vec = coll.family_names().map(|n| n.to_string()).collect(); + for name in names { + // println!("Family: {}", name); + if let Some(family) = coll.family_by_name(&name) { + // println!(" - Family: {}", name); + for font in family.fonts() { + // println!(" - Font: {:?} {:?}", font.source().kind, font.source().id); + // println!(" Weight: {}", font.weight()); + let style = match font.style() { + fontique::Style::Normal => FontStyle::Normal, + fontique::Style::Oblique(_) => FontStyle::Oblique, + fontique::Style::Italic => FontStyle::Italic, + }; + + let stretch: f32 = font.stretch().ratio(); + let weight: f32 = font.weight().value(); + + let path = match &font.source().kind { + SourceKind::Path(path) => { + // Check if the path is symlinked + let resolved_path = resolve_symlink(path.to_path_buf()); + if seen_paths.contains(&resolved_path) { + continue; + } + seen_paths.insert(resolved_path.clone()); + Some(resolved_path) + }, + _ => None, + }; + + font_info.push(FontInfo { + family: name.to_string(), + style, + weight, + stretch, + monospaced: false, // We just don't know + path, + index: None, + source_type: FontSourceType::Fontique, + }); + } + } + } + + info!("Loaded {} fonts from fontique.", font_info.len()); + + Self { + collection: coll, + font_info, + } + } + + fn available_fonts(&self) -> &[FontInfo] { + &self.font_info + } + + fn find(&self, _family: &[&str], _style: FontStyle) -> Result { + todo!() + } +} + +fn resolve_symlink(path: PathBuf) -> PathBuf { + let mut resolved_path = path.clone(); + + loop { + match std::fs::read_link(&resolved_path) { + Ok(target) => { + resolved_path = if target.is_relative() { + path.parent().unwrap_or(Path::new("/")).join(target) + } else { + target + }; + }, + Err(_) => break, + } + } + + resolved_path +} \ No newline at end of file diff --git a/src/font_manager/sources/fontkit.rs b/src/font_manager/sources/fontkit.rs new file mode 100644 index 0000000..d0b54a0 --- /dev/null +++ b/src/font_manager/sources/fontkit.rs @@ -0,0 +1,119 @@ +use crate::font_manager::manager::LOG_TARGET; +use std::collections::{HashMap, HashSet}; +use std::path::{Path, PathBuf}; +use std::sync::{Arc, Mutex}; +use anyhow::{anyhow, Error}; +use font_kit::handle::Handle; +use font_kit::source::SystemSource; +use freetype::{Face, Library}; +use log::{error, info}; +use crate::font_manager::font_info::{FontInfo, FontStyle}; +use crate::font_manager::sources::{FontSource, FontSourceType}; + +#[allow(unused)] +pub struct FontKitSource { + source: SystemSource, + ft_library: Library, + /// Vec of all font-info structures found + font_info: Vec, + /// List of all font handles + handles: Vec, + /// Cache of font faces that are loaded through freetype + face_cache: Arc>>, +} + +impl FontSource for FontKitSource { + fn new() -> Self { + let library = Library::init().expect("unable to init freetype library"); + + let source = SystemSource::new(); + let handles = source.all_fonts().unwrap(); + + let mut seen_paths: HashSet = HashSet::new(); + + let mut font_info = Vec::new(); + for handle in &handles { + match handle_to_info(&mut seen_paths, handle) { + Ok(info) => font_info.push(info), + Err(_) => {} + } + } + + info!("Loaded {} fonts from fontkit.", font_info.len()); + + Self { + source, + ft_library: library, + font_info, + handles, + face_cache: Arc::new(Mutex::new(HashMap::new())), + } + } + + fn available_fonts(&self) -> &[FontInfo] { + &self.font_info + } + + fn find(&self, _family: &[&str], _style: FontStyle) -> Result { + todo!() + } +} + +/// Converts a font handle to a gosub font info structure +fn handle_to_info(seen_paths: &mut HashSet, handle: &Handle) -> Result { + let font = handle.load().unwrap(); + + let family = font.family_name(); + let props = font.properties(); + + let style = match props.style { + font_kit::properties::Style::Normal => FontStyle::Normal, + font_kit::properties::Style::Italic => FontStyle::Italic, + font_kit::properties::Style::Oblique => FontStyle::Oblique, + }; + + let Handle::Path { + ref path, + font_index, + } = handle else { + error!(target: LOG_TARGET, "Expected a path handle. Got: {:?}", handle); + return Err(anyhow!("Expected a path handle")); + }; + + // Check if the path is symlinked + let resolved_path = resolve_symlink(path.to_path_buf()); + if seen_paths.contains(&resolved_path) { + return Err(anyhow!("Path already seen")); + } + seen_paths.insert(resolved_path.clone()); + + Ok(FontInfo { + source_type: FontSourceType::Fontkit, + family, + style, + weight: props.weight.0, + stretch: props.stretch.0, + monospaced: font.is_monospace(), + path: Some(resolved_path.clone()), + index: Some(*font_index as i32), + }) +} + +fn resolve_symlink(path: PathBuf) -> PathBuf { + let mut resolved_path = path.clone(); + + loop { + match std::fs::read_link(&resolved_path) { + Ok(target) => { + resolved_path = if target.is_relative() { + path.parent().unwrap_or(Path::new("/")).join(target) + } else { + target + }; + }, + Err(_) => break, + } + } + + resolved_path +} \ No newline at end of file diff --git a/src/font_manager/sources/pango.rs b/src/font_manager/sources/pango.rs new file mode 100644 index 0000000..e5cf998 --- /dev/null +++ b/src/font_manager/sources/pango.rs @@ -0,0 +1,101 @@ +use anyhow::Error; +use log::info; +use pangocairo::pango::{Context, FontMap}; +use pangocairo::prelude::{FontFaceExt, FontFamilyExt, FontMapExt}; +use crate::font_manager::font_info::{FontInfo, FontStyle}; +use crate::font_manager::sources::{FontSource, FontSourceType}; + +#[allow(unused)] +pub struct PangoSource { + font_map: FontMap, + context: Context, + font_info: Vec +} + +impl FontSource for PangoSource { + fn new() -> Self { + let font_map = pangocairo::FontMap::new(); + let context = font_map.create_context(); + + let mut font_info = vec![]; + for family in context.list_families() { + + for face in family.list_faces() { + let desc = face.describe(); + + let style = match desc.style() { + pangocairo::pango::Style::Normal => FontStyle::Normal, + pangocairo::pango::Style::Oblique => FontStyle::Oblique, + pangocairo::pango::Style::Italic => FontStyle::Italic, + _ => FontStyle::Normal, + }; + + // Conversion taken from: https://developer.mozilla.org/en-US/docs/Web/CSS/font-stretch + let stretch = match desc.stretch() { + pangocairo::pango::Stretch::UltraCondensed => 0.5, + pangocairo::pango::Stretch::ExtraCondensed => 0.625, + pangocairo::pango::Stretch::Condensed => 0.75, + pangocairo::pango::Stretch::SemiCondensed => 87.5, + pangocairo::pango::Stretch::Normal => 1.0, + pangocairo::pango::Stretch::SemiExpanded => 1.125, + pangocairo::pango::Stretch::Expanded => 1.25, + pangocairo::pango::Stretch::ExtraExpanded => 1.5, + pangocairo::pango::Stretch::UltraExpanded => 2.0, + _ => 1.0, + }; + + let weight = match desc.weight() { + pangocairo::pango::Weight::Thin => 100, + pangocairo::pango::Weight::Ultralight => 200, + pangocairo::pango::Weight::Semilight => 250, + pangocairo::pango::Weight::Light => 300, + pangocairo::pango::Weight::Book => 350, + pangocairo::pango::Weight::Normal => 400, + pangocairo::pango::Weight::Medium => 500, + pangocairo::pango::Weight::Semibold => 600, + pangocairo::pango::Weight::Bold => 700, + pangocairo::pango::Weight::Ultrabold => 800, + pangocairo::pango::Weight::Heavy => 900, + _ => 400, + }; + + font_info.push(FontInfo { + family: family.name().to_string(), + style, + weight: weight as f32, + stretch, + monospaced: family.is_monospace(), + source_type: FontSourceType::Pango, + path: None, + index: None, + }) + } + } + + info!("Loaded {} fonts from pango.", font_info.len()); + + Self { + font_map, + context, + font_info, + } + } + + fn available_fonts(&self) -> &[FontInfo] { + &self.font_info + } + + fn find(&self, _family: &[&str], _style: FontStyle) -> Result { + todo!() + } +} + +// impl PangoSource { +// fn pango_stack(&self) -> &FontMap { +// &self.font_map +// } +// +// fn pango_context(&self) -> &Context { +// &self.context +// } +// } \ No newline at end of file diff --git a/src/font_manager/sources/parley.rs b/src/font_manager/sources/parley.rs new file mode 100644 index 0000000..8575f08 --- /dev/null +++ b/src/font_manager/sources/parley.rs @@ -0,0 +1,103 @@ +use std::collections::HashSet; +use std::path::{Path, PathBuf}; +use log::info; +use anyhow::Error; +use parley::FontContext; +use crate::font_manager::font_info::{FontInfo, FontStyle}; +use crate::font_manager::sources::{FontSource, FontSourceType}; + +#[allow(unused)] +pub struct ParleySource { + context: FontContext, + font_info: Vec +} + +impl FontSource for ParleySource { + fn new() -> Self { + let mut context = FontContext::new(); + let mut font_info = Vec::new(); + let coll = &mut context.collection; + + let mut seen_paths: HashSet = HashSet::new(); + + let names: Vec = coll.family_names().map(|n| n.to_string()).collect(); + for name in names { + // println!("Family: {}", name); + if let Some(family) = coll.family_by_name(&name) { + // println!(" - Family: {}", name); + for font in family.fonts() { + // println!(" - Font: {:?} {:?}", font.source().kind, font.source().id); + // println!(" Weight: {}", font.weight()); + let style = match font.style() { + parley::FontStyle::Normal => FontStyle::Normal, + parley::FontStyle::Oblique(_) => FontStyle::Oblique, + parley::FontStyle::Italic => FontStyle::Italic, + }; + + let stretch: f32 = font.stretch().ratio(); + let weight: f32 = font.weight().value(); + + let path = match &font.source().kind { + parley::fontique::SourceKind::Path(path) => { + // Check if the path is symlinked + let resolved_path = resolve_symlink(path.to_path_buf()); + if seen_paths.contains(&resolved_path) { + continue; + } + seen_paths.insert(resolved_path.clone()); + Some(resolved_path) + }, + _ => None, + }; + + font_info.push(FontInfo { + family: name.to_string(), + style, + weight, + stretch, + monospaced: false, // We just don't know + path, + index: None, + source_type: FontSourceType::Parley, + }); + + + } + } + } + + info!("Loaded {} fonts from parley.", font_info.len()); + + Self { + context, + font_info, + } + } + + fn available_fonts(&self) -> &[FontInfo] { + &self.font_info + } + + fn find(&self, _family: &[&str], _style: FontStyle) -> Result { + todo!() + } +} + +fn resolve_symlink(path: PathBuf) -> PathBuf { + let mut resolved_path = path.clone(); + + loop { + match std::fs::read_link(&resolved_path) { + Ok(target) => { + resolved_path = if target.is_relative() { + path.parent().unwrap_or(Path::new("/")).join(target) + } else { + target + }; + }, + Err(_) => break, + } + } + + resolved_path +} \ No newline at end of file diff --git a/src/layouter.rs b/src/layouter.rs new file mode 100644 index 0000000..bd1e164 --- /dev/null +++ b/src/layouter.rs @@ -0,0 +1,17 @@ +use crate::font_manager::font_info::FontInfo; + +#[allow(dead_code)] +struct Layouter { +} + +impl Layouter { + #[allow(dead_code)] + pub fn new() -> Layouter { + Layouter {} + } + + #[allow(dead_code)] + pub fn generate_layout(&self, _info: &FontInfo, _text: &str, _size: f32, _width: f32) { + println!("Layouting..."); + } +} \ No newline at end of file diff --git a/src/lib.rs b/src/lib.rs index 78c3f4b..7e8c725 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1 +1,3 @@ -pub mod font_manager; \ No newline at end of file +pub mod font_manager; +pub mod flatland; +pub mod layouter; \ No newline at end of file