PhotoCraft: An open-source, photo editor written by scratch in pure Rust
Merge PR #5180: Type tool: click a path to start type on it (TYPE-218-1, #218)
aiongg11c3f1ec9299
diff --cc contributors/people.tomlindex c62354e3b,6dda48b4b..832c109ef--- a/contributors/people.toml+++ b/contributors/people.toml@@@ -159,40 -159,6 +159,44 @@@ sync_github_name = falsreal_name = "Ufuk Efe"sync_github_name = true+[people.nicolasfalesy]+sync_github_name = true++[people.sidney]+real_name = "Sidney Markowitz"+sync_github_name = true++[people.TaylorBurke]+sync_github_name = true++[people.1Git2Clone]+sync_github_name = true++[people.Silvertree2010]+display_name = "Netter"+sync_github_name = false++[people.Byxis]+sync_github_name = true++[people.00xJS]+sync_github_name = true++[people.guillehr2]+real_name = "Guillem Hermida"+sync_github_name = true++[people.fjamesprice]+sync_github_name = true++[people.ha1des]+sync_github_name = true++[people.LorenzoFasolino]+real_name = "Lorenzo Fasolino"+display_name = "Lorenzo Fasolino"+sync_github_name = false+++ [people.zolyy]+ real_name = "Gall Zoltan"+ sync_github_name = falsediff --cc crates/ui-egui/src/canvas.rsindex 3a6fa065e,27ea38325..20fcc87bf--- a/crates/ui-egui/src/canvas.rs+++ b/crates/ui-egui/src/canvas.rs@@@ -4296,9 -3883,16 +4296,18 @@@ pub fn canvas_view(app: &mut Photocraft{egui::CursorIcon::Crosshair}- Tool::Move => egui::CursorIcon::Move,+ // Photoshop's Move tool keeps the standard arrow pointer (#5646): the movable+ // layer under it is marked by the hover outline, not by a different cursor.+ Tool::Move => egui::CursorIcon::Default,+ // Over a path it can follow, the Type tool's path-type pointer (Photoshop).+ Tool::Type+ if app.drag.is_none() && {+ let [x, y] = xf.to_doc(p);+ crate::type_tool::path_at(app, x, y).is_some()+ } =>+ {+ crate::type_tool::path_cursor(&painter, p)+ }// Dragging is handled with the pan itself, above.Tool::Hand => crate::tool_cursor::hand(ui.ctx(), false),Tool::RotateView => crate::rotate_view::cursor(response.dragged()),diff --cc crates/ui-egui/src/type_tool.rsindex aa79f5e8b,531138721..b2004c95a--- a/crates/ui-egui/src/type_tool.rs+++ b/crates/ui-egui/src/type_tool.rs@@@ -1156,8 -1093,9 +1235,7 @@@ pub fn draw_overlay(app: &mut Photocraf}// Frame: paragraph text shows its box with handles; point text an underline per line.let mods = crate::workspace_ui::sticky_mods(app, painter.ctx().input(|i| i.modifiers));- if crate::type_transform::draw(app, painter, xf, mods) {- return;- }+ let has_transform = crate::type_transform::draw(app, painter, xf, mods);- let shape = app.session.active().and_then(|s| text_layer(&s.doc, id).map(|t| t.shape.clone()));let frame = Stroke::new(1.0, t.accent);match shape {Some(photocraft_doc::text::TextShape::Box { x, y, width, height }) => {diff --cc docs/gaps.mdindex 9b281d678,4aaba8506..3342a0d54--- a/docs/gaps.md+++ b/docs/gaps.md@@@ -84,15 -78,15 +84,15 @@@ what an agent can't finish alone- **Estimate:** 80–140 h.### G8. Type depth- - **Missing:** type on a path beyond rigid glyph placement (TYPE-218-1 partial, #4365),-- **Missing:** the rest of type on a path (TYPE-218-1: glyphs along the curve, `type.attachToPath` and- the Type tool's click on a shown path landed; the caret on the curve, dragging the start, vertical- path type and PSD path text remain), paragraph direction UI (TYPE-218-2), complex-script- fallback fonts and golden tests (TYPE-218-3), OpenType Numerals and Stylistic Sets submenus- (TYPE-218-5; the Character panel buttons landed 2026-10-11, #3752), live Warp Text preview- (TYPE-218-7, #2689), "rasterize and continue" for distort/perspective on type- (TYPE-218-9), text free transform (#2630). Done since the re-measure: manual and optical kerning- with PSD round trip (TYPE-218-6, #206), variable-font axes (TYPE-218-4, #2985).-- **Evidence:** scorecard Type: 3 done, 2 partial, 4 missing. 2026-10-11: 2/3/4/5 clicks select++- **Missing:** type on a path beyond rigid glyph placement (TYPE-218-1 partial, #4365; the Type tool's click on a shown path landed),+ paragraph direction UI (TYPE-218-2), complex-script fallback fonts and golden tests+ (TYPE-218-3), OpenType Numerals and Stylistic Sets submenus+ (TYPE-218-5; the Character panel buttons landed 2026-10-11, #3752), text free transform+ (#2630). Done since the re-measure: manual and optical kerning with PSD round trip+ (TYPE-218-6, #206), variable-font axes (TYPE-218-4, #2985), Warp on live type without a+ rasterize prompt, as in Photoshop (TYPE-218-9, #3004), and the live Warp Text preview that opens+ with the layer's warp (TYPE-218-7, #2689).+- **Evidence:** scorecard Type: 5 done, 3 partial, 1 missing. 2026-10-11: 2/3/4/5 clicks selectword, line, paragraph and all text, with tests (TYPE-218-8, #3493). The Type tool froze the app for60 s on one macOS machine (#2518).- **Estimate:** 120–200 h.@@@ -290,31 -265,7 +290,32 @@@| Date | Change | Summary ||---|---|---|+| 2026-10-15 | minor | G1 / #5972 A1: render only provably constant-RGB `GdFl` noise fills; variable noise synthesis remains open |+| 2026-10-18 | minor | G9: with no selection, Copy takes fill and adjustment layers whole and Paste recreates them (#2344); UI-217-23 stays partial (a single pixel layer copies its pixels only); estimate unchanged |+| 2026-10-15 | minor | G2: a cancelled 24 MP Gaussian Blur job stops within 44 ms max (P25, budget 200 ms; was about 400 ms; local runs, baseline not re-run), the uncancelled job on a locked-transparency layer about 40% faster; #6205 |+| 2026-10-15 | minor | G9: Animated Zoom preference takes effect (hold the Zoom tool to zoom continuously, #6210); prefs that do nothing 25 of 166; no estimate changed |+| 2026-10-16 | minor | G7: Content-Aware Move's live preview covers every selection the command takes (over 256 × 256: a coarse result solved scaled down, then the exact one); TOOL-213-4 done (#6680) |+| 2026-10-15 | minor | G9: Save in Background off saves in the foreground under a modal progress dialog (#6207); preferences that do nothing 25 → 24 of 169 |+| 2026-10-14 | minor | G1: a PSD smart object's filter mask shows when the file opens (Photoshop stores the filtered pixels unmasked); export stores them that way too; Photoshop-oracle floor 185 → 188 of 258 |+| 2026-10-13 | minor | G14: D90 image area measured (4288 × 2848 at (10, 10)); gap remains open |+| 2026-10-14 | minor | Corpus floors raised to the measured results of the CMYK, Lab, 32-bit, Levels, Threshold, Posterize, feather and pass-through fixes landed together: Photoshop-authored 165 → 185 of 258, io 146 → 148 of 170, psd-tools 242 → 249 of 309 |+| 2026-10-13 | minor | G1: generated large-file fixtures (20 MP, 150 layers, 2 GB PSD, 4.38 GB PSB) round-trip in io tests/large_files.rs; the 4.38 GB PSB opens on Windows through io (#375 evidence); FILE-216-2 done (#5107) |+| 2026-10-13 | minor | G1: CMYK Hue/Saturation and Color Balance work on C, M and Y as inverted RGB with black kept, as Photoshop does; cmyk hue-saturation 100% → 0.4–0.7% bad pixels, color-balance 74% → 25%; floor unchanged |+| 2026-10-13 | minor | G1: CMYK Posterize works on the stored values (1 − ink); psd-tools posterize_cmyk passes; psd-tools floor → 242 of 309 |+| 2026-10-13 | minor | G1: CMYK stacks with Invert, Posterize, Threshold, Brightness/Contrast, Levels or Curves layers composite on the document's own inks (14 CMYK oracles pass); Photoshop-oracle floor 151 → 165 of 258 |+| 2026-10-13 | minor | CMYK Threshold compares the Rec. 601 luma of the inks' plain complement, as Photoshop does (every pixel of cmyk8/16 threshold-128.psd); oracle bad pixels 1.6% → 0.2% |+| 2026-10-13 | minor | G1: CMYK Brightness/Contrast (modern and legacy) curves each ink's stored value as Photoshop does; oracle bad pixels 71% → 48–57%, floor unchanged |+| 2026-10-13 | minor | G1: modern Brightness/Contrast's brightness curve refit to Photoshop (six oracles pass); Photoshop-oracle floor 145 → 151 of 258 |+| 2026-10-13 | minor | G1: Lab documents composite Invert, Posterize, Threshold, Brightness/Contrast and Lab Levels/Curves on their stored L, a, b (no clipped RGB round trip); seven Lab oracles pass; Photoshop-oracle floor 145 → 152 of 258 |+| 2026-10-13 | minor | G1: Levels round every step to whole levels and use Photoshop's shadow toe (slope 2^gamma); levels_rgb and stack-levels-curves-hue-posterize pass; Photoshop-oracle floor 145 → 146 of 258, psd-tools 236 → 238 of 309 |+| 2026-10-13 | minor | G1: 32-bit legacy Brightness/Contrast (pivot 127), Channel Mixer (1/1024 steps, constant ×255/512), Photo Filter and Black & White tint unclipped as Photoshop computes them, CPU and GPU; Photoshop-oracle floor 145 → 149 of 258 |+| 2026-10-13 | minor | G1: mask feathers blur with exactly the feather's variance; psd-tools mask-parameters-no-real-channel passes, layer_mask_data 27 % → 4 % off; psd-tools floor → 240 of 309 |+| 2026-10-13 | minor | G1: Threshold splits on Photoshop's luminosity of whole samples (8- and 16-bit rules exact on four oracles); psd-tools threshold_rgb and threshold_16bits_rgb pass; psd-tools floor → 241 of 309 |+| 2026-10-13 | minor | G1: a pass-through group that is a clipping base and holds an adjustment layer renders isolated; psd-tools passthrough_clipping_mask_adjustment passes; psd-tools floor → 240 of 309 |+| 2026-10-13 | minor | G1: 16-bit Posterize bins the 16-bit sample, as Photoshop does (exact on two oracles); psd-tools floor → 241 of 309 |+| 2026-10-13 | minor | G1: Gradient Map driven by the W3C luminosity (0.3, 0.59, 0.11), as Photoshop is; rgb8/rgb16 gradient-map pass; Photoshop-oracle floor 145 → 147 of 258 |+| 2026-10-13 | minor | G6: stale "missing tool" list corrected against `main` — Color Replacement (`paint.colorReplacement`), Red Eye (`paint.redEye`) and Add/Delete Anchor Point (P flyout, #4144) are live tools, so the toolbox is 67 of 68 and Art History Brush is the only one missing; no percentage or estimate changed |+ | 2026-10-13 | minor | G8: a Type tool click on the work path or the active shape layer's path starts type on it at the point clicked (TYPE-218-1, partial); no readiness percentage or estimate changed || 2026-10-13 | minor | G4: Hue Jitter amount-track appearance (#3825, partial); no readiness percentage or estimate changed || 2026-10-13 | minor | G4: minimum inputs in Shape Dynamics and Transfer follow their Control (#3825, partial); no readiness percentage or estimate changed || 2026-10-12 | minor | G5: Free Transform options bar H/V skew fields done |