mirror of
https://github.com/storytold/photocraft.git
synced 2026-10-26 10:57:20 -06:00
The 0.6.0 web build was 26.9 MB, over packaging/web/package.sh's 24 MiB gate (Cloudflare's per-file cap is 25 MiB, #198). The i18n .tsv catalogs (1.85 MB -> 0.64 MB) and the Inter/JetBrains Mono fonts (1.52 MB -> 0.73 MB) are now deflated by build.rs and inflated on first use, so wasm is 25,141,080 bytes. No visible change. A catalog that fails to inflate falls back to English, a font that fails falls back to egui's default font; neither panics. Headroom is only ~25 KB: the next size cut is needed soon (fetching catalogs on demand would save another ~0.64 MB). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
34 lines
1.4 KiB
TOML
34 lines
1.4 KiB
TOML
[package]
|
|
name = "photocraft-text"
|
|
description = "Font database, text shaping/layout (parley) and text-layer rasterization"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
rust-version.workspace = true
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[dependencies]
|
|
photocraft-geom = { workspace = true }
|
|
photocraft-color = { workspace = true }
|
|
photocraft-raster = { workspace = true }
|
|
photocraft-doc = { workspace = true }
|
|
photocraft-psd = { workspace = true }
|
|
# No `system` feature: fontique's system backend links fontconfig on Linux. We scan font
|
|
# directories ourselves (native) and always register the bundled fonts (native + web).
|
|
parley = { version = "0.11", default-features = false, features = ["std"] }
|
|
skrifa = "0.44"
|
|
flate2 = { workspace = true }
|
|
|
|
# ICU dictionary data for Japanese word boundaries and complex-script (Thai, Lao, Khmer, Burmese)
|
|
# line breaking. Native only: the CJK dictionary alone is 3.8 MB of wasm, and the web build must
|
|
# stay under Cloudflare's 25 MiB per-file cap (packaging/web/package.sh). The web build falls back
|
|
# to the generic Unicode rules for those scripts.
|
|
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
|
parley = { version = "0.11", default-features = false, features = ["std", "complex-scripts"] }
|
|
|
|
[build-dependencies]
|
|
# Deflates the bundled fonts (build.rs); `flate2` above inflates them.
|
|
flate2 = { workspace = true }
|