From 3bab0d4f52a15c122642767184f04fb235cc5049 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 8 Oct 2026 18:12:33 +0000 Subject: [PATCH] PSD text fill: keep the fix and its tests, drop the proof-only screenshots and example The Photopea screenshots, their ATTRIBUTION row and the example that made them documented the bug for review; the unit tests in crates/text cover the behaviour, so they are not needed in the tree. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01UHgFEHEsefoQoBParH47JA --- ATTRIBUTION.md | 1 - crates/io/examples/psd_text_fill.rs | 28 --------------------------- docs/images/psd-text-fill-after.png | Bin 3864 -> 0 bytes docs/images/psd-text-fill-before.png | Bin 1232 -> 0 bytes 4 files changed, 29 deletions(-) delete mode 100644 crates/io/examples/psd_text_fill.rs delete mode 100644 docs/images/psd-text-fill-after.png delete mode 100644 docs/images/psd-text-fill-before.png diff --git a/ATTRIBUTION.md b/ATTRIBUTION.md index 4d61c087..c6c4a085 100644 --- a/ATTRIBUTION.md +++ b/ATTRIBUTION.md @@ -50,7 +50,6 @@ The other built-in ICC profiles and the generated LUT looks are produced by code | `docs/brand/` (all files) | ArtCraft name, wordmark and mark | ArtCraft Team | getartcraft.com | Not open source; trademarks of the ArtCraft Team, [`docs/brand/LICENSE-brand.txt`](docs/brand/LICENSE-brand.txt) | | `docs/images/photocraft-*.jpg` | PhotoCraft screenshots | PhotoCraft contributors (UI) | Rendered offscreen with the `snapshot` example | MIT OR Apache-2.0 (UI); the artwork in each is public domain, listed below | | `docs/images/preferences-apply-*.png` | Preferences before and after adding Apply (no artwork) | PhotoCraft contributors | PhotoCraft control-channel capture and offscreen `snapshot` example | MIT OR Apache-2.0 | -| `docs/images/psd-text-fill-*.png` | Live text before and after the PSD fill fix | @ragedotdev | Photopea canvas captures of original synthetic text from `crates/io/examples/psd_text_fill.rs`; cropped to the document, with no Photopea UI assets | MIT OR Apache-2.0 | Artwork shown in the screenshots (all public domain, via Wikimedia Commons; details in [`docs/images/SOURCES.md`](docs/images/SOURCES.md)): diff --git a/crates/io/examples/psd_text_fill.rs b/crates/io/examples/psd_text_fill.rs deleted file mode 100644 index eaf73526..00000000 --- a/crates/io/examples/psd_text_fill.rs +++ /dev/null @@ -1,28 +0,0 @@ -//! Write a small PSD for a live-text edit check in another editor. -//! `cargo run -p photocraft-io --example psd_text_fill -- /tmp/text-fill.psd` - -use photocraft_color::{Color, ColorMode, SampleType}; -use photocraft_doc::text::{CharStyle, TextRun}; -use photocraft_doc::{Document, Layer, LayerContent, Size, TextLayer}; -use photocraft_geom::Affine; - -fn main() -> Result<(), Box> { - let path = std::env::args_os().nth(1).ok_or_else(|| std::io::Error::new(std::io::ErrorKind::InvalidInput, "usage: psd_text_fill "))?; - let mut doc = Document::new("Text fill", Size::new(640, 240), ColorMode::Rgb, SampleType::U8); - let text = "Editable text"; - let mut layer = TextLayer { - text: text.into(), - runs: vec![TextRun { - len: text.len(), - style: CharStyle { font_family: "Inter".into(), size_pt: 48.0, color: Color::rgb(0.1, 0.2, 0.5), faux_bold: true, ..Default::default() }, - }], - transform: Affine { m: [1.2, 0.0, 0.0, 1.4, 30.0, 150.0] }, - ..Default::default() - }; - layer.sync_summary(); - photocraft_text::TextEngine::new().render_layer(&mut layer, doc.resolution_dpi, doc.pixel_format()); - doc.layers.push(Layer::new("Editable text", LayerContent::Text(layer))); - let output = photocraft_io::export(&doc, "text-fill.psd", &Default::default())?; - std::fs::write(path, output.bytes)?; - Ok(()) -} diff --git a/docs/images/psd-text-fill-after.png b/docs/images/psd-text-fill-after.png deleted file mode 100644 index 26b665e7e9fe58f75c2e6c238246f930e9578277..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3864 zcmeHKX;2f$whm;#F)qv?0)quOqYNUlsSq55pvWMyghdfV2#NzDLXa&95C|&zZ~+Ao zWc7i-h%5rKCL{>5?;wx>Awq~r$i|igLY5cb)P41)UcG;}>i)UsM|W5CIbV03I_K;D zQr%n~_JFiN003Z*0Tf)=-~adB#tObKIw@?pQp?vE3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