Repository navigation
Keep Affinity text and curves editable and expand PSD typography - #158
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 forwasm32-unknown-unknown.make check-editable-interchange-independentwith 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.