diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 85d0cd2c815..bfdca9e3e93 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -35,3 +35,9 @@ jobs: APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} WINDOWS_CERTIFICATE: ${{ secrets.WINDOWS_CERTIFICATE }} WINDOWS_CERTIFICATE_PASSWORD: ${{ secrets.WINDOWS_CERTIFICATE_PASSWORD }} + AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} + AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} + AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} + AZURE_SIGNING_ENDPOINT: ${{ secrets.AZURE_SIGNING_ENDPOINT }} + AZURE_SIGNING_ACCOUNT: ${{ secrets.AZURE_SIGNING_ACCOUNT }} + AZURE_CERT_PROFILE: ${{ secrets.AZURE_CERT_PROFILE }} diff --git a/ATTRIBUTION.md b/ATTRIBUTION.md index 9fc1fa2625b..c2b9f87854e 100644 --- a/ATTRIBUTION.md +++ b/ATTRIBUTION.md @@ -19,7 +19,9 @@ next to them. | `crates/ui-egui/src/i18n/pt-br.tsv` | Brazilian Portuguese UI translations | PhotoCraft contributors | Original translations of PhotoCraft's English labels | MIT OR Apache-2.0, [`LICENSE-translations.txt`](crates/ui-egui/src/i18n/LICENSE-translations.txt) | | `crates/ui-egui/src/i18n/uk.tsv` | Ukrainian UI translations | PhotoCraft contributors | Original translations of PhotoCraft's English labels | MIT OR Apache-2.0, [`LICENSE-translations.txt`](crates/ui-egui/src/i18n/LICENSE-translations.txt) | | `crates/ui-egui/src/i18n/cs.tsv` | Czech UI translations | PhotoCraft contributors | Original translations of PhotoCraft's English labels | MIT OR Apache-2.0, [`LICENSE-translations.txt`](crates/ui-egui/src/i18n/LICENSE-translations.txt) | +| `crates/ui-egui/src/i18n/hu.tsv` | Hungarian UI translations | PhotoCraft contributors | Original translations of PhotoCraft's English labels | MIT OR Apache-2.0, [`LICENSE-translations.txt`](crates/ui-egui/src/i18n/LICENSE-translations.txt) | | `crates/ui-egui/src/i18n/vi.tsv` | Vietnamese UI translations | PhotoCraft contributors | Original translations of PhotoCraft's English labels | MIT OR Apache-2.0, [`LICENSE-translations.txt`](crates/ui-egui/src/i18n/LICENSE-translations.txt) | +| `crates/ui-egui/src/i18n/tr.tsv` | Turkish UI translations | PhotoCraft contributors | Original translations of PhotoCraft's English labels | MIT OR Apache-2.0, [`LICENSE-translations.txt`](crates/ui-egui/src/i18n/LICENSE-translations.txt) | | `assets/fonts/Inter-Regular.ttf`, `Inter-Medium.ttf`, `Inter-SemiBold.ttf` | Inter 4.001 (UI font) | The Inter Project Authors (Rasmus Andersson) | | SIL OFL 1.1, [`assets/fonts/OFL-Inter.txt`](assets/fonts/OFL-Inter.txt) | | `assets/fonts/JetBrainsMono-Regular.ttf` | JetBrains Mono 2.305 (numeric font) | The JetBrains Mono Project Authors | | SIL OFL 1.1, [`assets/fonts/OFL-JetBrainsMono.txt`](assets/fonts/OFL-JetBrainsMono.txt) | | `assets/icons/*.svg` except `slice-knife.svg`, `sampler.svg`, `artboard.svg`, `perspective-crop.svg`, `frame-placeholder.svg`, `type-mask.svg`, `type-mask-vertical.svg`, `clip-below.svg`, `clip-release.svg`, `layer-mask.svg`, `adjustment-layer.svg`, `brush-replace.svg`, `eraser-background.svg`, `eraser-magic.svg`, `lasso-magnetic.svg`, `direct-select.svg`, `convert-point.svg`, `pen-add-anchor.svg`, `pen-delete-anchor.svg`, `pen-freeform.svg`, `pen-curvature.svg`, `bandage-sparkle.svg`, `painting-symmetry.svg`, `symmetry-*.svg` and `marquee-{row,column}.svg` (113 files; `star-filled.svg` is `star.svg` with a solid fill) | Lucide icons | Lucide Icons and Contributors | (`icons/.svg`; `align-*` are now named `text-align-*` upstream) | ISC, [`assets/icons/LICENSE-lucide.txt`](assets/icons/LICENSE-lucide.txt) | diff --git a/Cargo.lock b/Cargo.lock index 412e6676f8f..b475626f2eb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1121,6 +1121,14 @@ dependencies = [ "libc", ] +[[package]] +name = "craft-print" +version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=d991bf6792f8ade99c51358bf3c1d902c8cd96b5#d991bf6792f8ade99c51358bf3c1d902c8cd96b5" +dependencies = [ + "tempfile", +] + [[package]] name = "craft-ui" version = "0.1.0" @@ -1743,6 +1751,7 @@ dependencies = [ "miniz_oxide 0.8.9", "num-complex", "pulp", + "rayon-core", "smallvec", "zune-inflate", ] @@ -2331,9 +2340,9 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "heic-rs" -version = "0.1.1" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adf9dde634bb6d5b718bacd01bef80192f2334306b2f785519a0136cca7b9618" +checksum = "8883c3bfa6b4ff19a40e52a6dc051c5612cbe21bf408fc6d4875e8dfd777cb66" dependencies = [ "rayon", ] @@ -4182,7 +4191,7 @@ dependencies = [ [[package]] name = "photocraft" -version = "0.8.0" +version = "0.8.2" dependencies = [ "arboard", "async-io", @@ -4224,7 +4233,7 @@ dependencies = [ [[package]] name = "photocraft-affinity" -version = "0.8.0" +version = "0.8.2" dependencies = [ "crc32fast", "flate2", @@ -4234,7 +4243,7 @@ dependencies = [ [[package]] name = "photocraft-algo" -version = "0.8.0" +version = "0.8.2" dependencies = [ "photocraft-color", "photocraft-geom", @@ -4247,7 +4256,7 @@ dependencies = [ [[package]] name = "photocraft-automation" -version = "0.8.0" +version = "0.8.2" dependencies = [ "base64", "cap-std", @@ -4269,7 +4278,7 @@ dependencies = [ [[package]] name = "photocraft-cli" -version = "0.8.0" +version = "0.8.2" dependencies = [ "photocraft-automation", "photocraft-codecs", @@ -4283,7 +4292,7 @@ dependencies = [ [[package]] name = "photocraft-cms" -version = "0.8.0" +version = "0.8.2" dependencies = [ "moxcms", "rayon", @@ -4291,7 +4300,7 @@ dependencies = [ [[package]] name = "photocraft-codecs" -version = "0.8.0" +version = "0.8.2" dependencies = [ "exr", "flate2", @@ -4312,7 +4321,7 @@ dependencies = [ [[package]] name = "photocraft-color" -version = "0.8.0" +version = "0.8.2" dependencies = [ "photocraft-cms", "serde", @@ -4320,7 +4329,7 @@ dependencies = [ [[package]] name = "photocraft-compose" -version = "0.8.0" +version = "0.8.2" dependencies = [ "criterion", "photocraft-color", @@ -4335,7 +4344,7 @@ dependencies = [ [[package]] name = "photocraft-doc" -version = "0.8.0" +version = "0.8.2" dependencies = [ "photocraft-color", "photocraft-geom", @@ -4346,10 +4355,11 @@ dependencies = [ [[package]] name = "photocraft-engine" -version = "0.8.0" +version = "0.8.2" dependencies = [ "blake3", "chrono", + "craft-print", "exr", "flate2", "photocraft-affinity", @@ -4381,7 +4391,7 @@ dependencies = [ [[package]] name = "photocraft-format" -version = "0.8.0" +version = "0.8.2" dependencies = [ "blake3", "crc32fast", @@ -4401,14 +4411,14 @@ dependencies = [ [[package]] name = "photocraft-geom" -version = "0.8.0" +version = "0.8.2" dependencies = [ "serde", ] [[package]] name = "photocraft-gpu" -version = "0.8.0" +version = "0.8.2" dependencies = [ "half", "log", @@ -4425,14 +4435,14 @@ dependencies = [ [[package]] name = "photocraft-heif" -version = "0.8.0" +version = "0.8.2" dependencies = [ "heic-rs", ] [[package]] name = "photocraft-io" -version = "0.8.0" +version = "0.8.2" dependencies = [ "blake3", "crc32fast", @@ -4461,14 +4471,14 @@ dependencies = [ [[package]] name = "photocraft-ops" -version = "0.8.0" +version = "0.8.2" dependencies = [ "photocraft-doc", ] [[package]] name = "photocraft-paint" -version = "0.8.0" +version = "0.8.2" dependencies = [ "photocraft-color", "photocraft-geom", @@ -4479,7 +4489,7 @@ dependencies = [ [[package]] name = "photocraft-plugins" -version = "0.8.0" +version = "0.8.2" dependencies = [ "photocraft-color", "photocraft-geom", @@ -4494,7 +4504,7 @@ dependencies = [ [[package]] name = "photocraft-psd" -version = "0.8.0" +version = "0.8.2" dependencies = [ "flate2", "photocraft-psd", @@ -4505,7 +4515,7 @@ dependencies = [ [[package]] name = "photocraft-raster" -version = "0.8.0" +version = "0.8.2" dependencies = [ "photocraft-color", "photocraft-geom", @@ -4515,7 +4525,7 @@ dependencies = [ [[package]] name = "photocraft-raw" -version = "0.8.0" +version = "0.8.2" dependencies = [ "flate2", "image", @@ -4530,7 +4540,7 @@ dependencies = [ [[package]] name = "photocraft-tablet" -version = "0.8.0" +version = "0.8.2" dependencies = [ "block2 0.6.2", "objc2 0.6.4", @@ -4542,7 +4552,7 @@ dependencies = [ [[package]] name = "photocraft-testkit" -version = "0.8.0" +version = "0.8.2" dependencies = [ "memory-stats", "photocraft-color", @@ -4553,7 +4563,7 @@ dependencies = [ [[package]] name = "photocraft-text" -version = "0.8.0" +version = "0.8.2" dependencies = [ "flate2", "parley", @@ -4567,7 +4577,7 @@ dependencies = [ [[package]] name = "photocraft-ui-egui" -version = "0.8.0" +version = "0.8.2" dependencies = [ "base64", "craft-ui", @@ -4575,6 +4585,7 @@ dependencies = [ "egui", "egui_extras", "egui_kittest", + "epaint_default_fonts", "flate2", "log", "photocraft-algo", @@ -4606,7 +4617,7 @@ dependencies = [ [[package]] name = "photocraft-vector" -version = "0.8.0" +version = "0.8.2" dependencies = [ "photocraft-color", "photocraft-doc", @@ -4617,7 +4628,7 @@ dependencies = [ [[package]] name = "photocraft-web" -version = "0.8.0" +version = "0.8.2" dependencies = [ "eframe", "egui", @@ -7450,7 +7461,7 @@ checksum = "ec7a2a501ed189703dba8b08142f057e887dfc4b2cc4db2d343ac6376ba3e0b9" [[package]] name = "xtask" -version = "0.8.0" +version = "0.8.2" dependencies = [ "serde", "serde_json", diff --git a/Cargo.toml b/Cargo.toml index 87e0a378ce9..f96b5cb468e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ members = ["crates/*", "apps/*", "xtask"] default-members = ["crates/*", "apps/photocraft", "apps/photocraft-cli", "xtask"] [workspace.package] -version = "0.8.0" +version = "0.8.2" edition = "2024" license = "MIT OR Apache-2.0" rust-version = "1.95" @@ -38,6 +38,7 @@ photocraft-testkit = { path = "crates/testkit" } photocraft-tablet = { path = "crates/tablet" } # external +craft-print = { git = "https://github.com/storytold/craft-libs", rev = "d991bf6792f8ade99c51358bf3c1d902c8cd96b5" } thiserror = "2" serde = { version = "1", features = ["derive", "rc"] } serde_json = "1" @@ -50,7 +51,9 @@ zune-core = "0.5" zune-jpeg = "0.5" proptest = "1" eframe = { version = "0.36", default-features = false } -egui = "0.36" +# Without `default_fonts`, which embeds egui's fonts uncompressed: ui-egui ships them deflated +# (egui_fonts.rs; the web build's size gate). +egui = { version = "0.36", default-features = false } egui_kittest = "0.36" rfd = "0.17" log = "0.4" @@ -81,13 +84,14 @@ codegen-units = 1 # The browser build (apps/photocraft-web, `data-cargo-profile` in its index.html). Hosts cap the # size of a single file (Cloudflare Pages/Workers: 25 MiB), and the wasm is downloaded on every -# visit, so this profile optimizes for size: fat LTO, opt-level "z" for the UI, command, and I/O -# shells, and "s" for other crates except pixel processing, which keeps opt-level 3. panic -# stays the target default (wasm32-unknown-unknown aborts; AGENTS.md's `panic = "unwind"` is for -# the native app shell). packaging/web/package.sh fails the build above 24 MiB. +# visit, so this profile optimizes for size: fat LTO, opt-level "z" for PhotoCraft's own crates, +# "s" for dependencies and for the crates that decode files, and 3 for pixel processing (filters +# and compositing). Dependencies stay at "s": at "z" the whole wasm grows (by 0.4 MB, measured). +# panic stays the target default (wasm32-unknown-unknown aborts; AGENTS.md's `panic = "unwind"` +# is for the native app shell). packaging/web/package.sh fails the build above 24 MiB. [profile.wasm-release] inherits = "release" -opt-level = "s" +opt-level = "z" lto = "fat" codegen-units = 1 strip = "debuginfo" @@ -95,20 +99,35 @@ strip = "debuginfo" [profile.wasm-release.package."*"] opt-level = "s" -# Keep the browser shell compact as shared panel controls grow. Pixel-processing crates below -# retain their speed-oriented optimization level. -[profile.wasm-release.package.photocraft-ui-egui] -opt-level = "z" +# Decoding and rasterizing keep their speed. +[profile.wasm-release.package.photocraft-codecs] +opt-level = "s" +[profile.wasm-release.package.photocraft-raw] +opt-level = "s" +[profile.wasm-release.package.photocraft-heif] +opt-level = "s" +[profile.wasm-release.package.photocraft-vector] +opt-level = "s" -# Keep browser command dispatch, import/export glue, and the entry point compact. Native -# builds and the speed-oriented pixel-processing overrides below retain their settings. -[profile.wasm-release.package.photocraft-engine] +# Large crates off the per-frame and per-pixel paths: the document model, file parsers run once +# per open/save, JSON (settings, presets, control channel), SVG parsing, and shader translation +# (runs when a pipeline is created). "z" keeps the wasm well under the size gate. +[profile.wasm-release.package.photocraft-doc] +opt-level = "z" +[profile.wasm-release.package.photocraft-psd] +opt-level = "z" +[profile.wasm-release.package.photocraft-format] +opt-level = "z" +[profile.wasm-release.package.photocraft-affinity] +opt-level = "z" +[profile.wasm-release.package.serde_json] opt-level = "z" -[profile.wasm-release.package.photocraft-io] +[profile.wasm-release.package.usvg] opt-level = "z" -[profile.wasm-release.package.photocraft-web] +[profile.wasm-release.package.naga] opt-level = "z" +# Pixel processing keeps its speed-oriented optimization level. [profile.wasm-release.package.photocraft-raster] opt-level = 3 [profile.wasm-release.package.photocraft-color] @@ -121,3 +140,4 @@ opt-level = 3 opt-level = 3 [profile.wasm-release.package.photocraft-paint] opt-level = 3 + diff --git a/apps/photocraft-cli/src/lib.rs b/apps/photocraft-cli/src/lib.rs index 560eaf71fcc..93090610a55 100644 --- a/apps/photocraft-cli/src/lib.rs +++ b/apps/photocraft-cli/src/lib.rs @@ -292,11 +292,15 @@ fn command_list(a: &Args) -> Result, String> { fn run_cmds(a: &Args, out: &mut dyn Write, err: &mut dyn Write) -> R { let opts = export_opts(a)?; let mut h = Headless::trusted_local(); + // Each missing-font warning is printed once, wherever it is first detected (open, a command or + // the save). + let mut reported_fonts = std::collections::HashSet::::new(); match (a.positional.as_slice(), a.get("--new")) { ([file], None) => { let o = h.open(Path::new(file)).map_err(|e| e.to_string())?; let ws: Vec = serde_json::from_value(o["warnings"].clone()).unwrap_or_default(); warn_all(err, &ws); + reported_fonts.extend(ws); } ([], Some(new)) => { let p: Value = serde_json::from_str(new).map_err(|e| format!("bad --new JSON: {e}"))?; @@ -308,7 +312,6 @@ fn run_cmds(a: &Args, out: &mut dyn Write, err: &mut dyn Write) -> R { if cmds.is_empty() && a.get("--out").is_none() { return Err("run needs at least one --cmd (or --out)".into()); } - let mut reported_fonts = std::collections::HashSet::::new(); for (id, params) in cmds { let r = h.command_run(&id, params).map_err(|e| format!("`{id}`: {e}"))?; if let Some(e) = photocraft_engine::actions_cmds::nested_failure(&id, &r) { @@ -341,7 +344,9 @@ fn run_cmds(a: &Args, out: &mut dyn Write, err: &mut dyn Write) -> R { warn_all(err, &remaining); if let Some(o) = a.get("--out") { let r = h.save(None, Some(Path::new(o)), a.get("--format"), &opts).map_err(|e| e.to_string())?; - let ws: Vec = serde_json::from_value(r["warnings"].clone()).unwrap_or_default(); + // The save repeats the document's missing-font warnings; each was already reported above. + let ws: Vec = + serde_json::from_value::>(r["warnings"].clone()).unwrap_or_default().into_iter().filter(|w| !reported_fonts.contains(w)).collect(); warn_all(err, &ws); } Ok(()) diff --git a/apps/photocraft-web/Cargo.toml b/apps/photocraft-web/Cargo.toml index 6b4c62797af..a4ded641817 100644 --- a/apps/photocraft-web/Cargo.toml +++ b/apps/photocraft-web/Cargo.toml @@ -29,7 +29,7 @@ log = { workspace = true } [target.'cfg(target_arch = "wasm32")'.dependencies] # `wgpu` pulls egui-wgpu's defaults: WebGPU plus the WebGL2 fallback. -eframe = { workspace = true, features = ["default_fonts", "wgpu", "accesskit"] } +eframe = { workspace = true, features = ["wgpu", "accesskit"] } rfd = { workspace = true } wasm-bindgen = "0.2" wasm-bindgen-futures = "0.4" diff --git a/apps/photocraft-web/index.html b/apps/photocraft-web/index.html index 5e734006be6..d090cf47da5 100644 --- a/apps/photocraft-web/index.html +++ b/apps/photocraft-web/index.html @@ -4,7 +4,7 @@ PhotoCraft - +