Skip to content

Keep Affinity text and curves editable and expand PSD typography - #158

Merged
IAmJSD merged 2 commits into
mainfrom
feat/editable-interchange
Sep 20, 2026
Merged

IAmJSD merged 2 commits into
mainfrom
feat/editable-interchange

Conversation

@IAmJSD

@IAmJSD IAmJSD commented Sep 20, 2026

Copy link
Copy Markdown
Member

Saving editable text and vector layers to Affinity previously flattened them to pixels. This change writes native artistic/frame text stories and cubic curves, preserves untouched imported parametric shapes and native text, and regenerates edited objects from their live state. Original native objects are invalidated when their text, geometry or cached pixels change, preventing stale content from returning on export.

PSD/PSB type layers now import and export mixed character RGB/alpha fills and standard vertical text with columns advancing right to left. Character fills render in the Type tool and survive text/font edits; changing the foreground fill intentionally recolors the whole layer.

Supported Affinity authoring includes BMP character font/size/bold/italic/fill runs, alignment, point/frame placement, and single-contour cubic paths with solid fill/stroke. Unsupported typography, unverified astral run indexing, compound fill rules, masks and clipped children use the existing raster fallback and export report. Rotated imported Affinity text keeps its native transform without falsely presenting an axis-aligned editable text box. PSD affine/warped text, per-paragraph formatting, bidi/path text and left-to-right vertical columns remain preserved without claiming unsupported local editability. The documentation describes these limits; arbitrary lossless fidelity is not claimed.

Validation:

  • make check-editable-interchange: 245 tests across Affinity, PSD, text layout and the Type tool, including existing real Affinity fixture roundtrips, native class/story/curve assertions, stale-source invalidation and character-color rendering.
  • make lint-editable-interchange: Clippy for all affected crate targets with warnings denied.
  • make check-editable-interchange-web: affected codecs/type components compile for wasm32-unknown-unknown.
  • make check-editable-interchange-independent with ag-psd 31.0.2: independent readback of emitted PSD/PSB character fills/alpha, UTF-16 runs, vertical orientation and paragraph-box dimensions. New checked-in import fixtures are generated by ag-psd, not Schist.
  • make check-i18n: existing catalogs, aliases, fonts and web checks pass; no new user-facing strings or locales.

Affinity structures come from existing Affinity-written probes and the MIT-licensed AFDesignLoad fixture, with artistic-frame and BMP run-index observations from the local Affinity-written corpus documented in docs/affinity-format.md. PSD mappings use the public MIT-licensed ag-psd implementation. No Adobe header files or Photoshop plugin SDK code were read; Photoshop plugin support is outside this change. Interactive rendering in Affinity or Photoshop has not been exercised.

@IAmJSD
IAmJSD merged commit 1f50c31 into main Sep 20, 2026
5 checks passed
@IAmJSD
IAmJSD deleted the feat/editable-interchange branch September 20, 2026 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant