PSD: Preserve Text Editability writes point type as editable type layers

The PSD Options dialog gets Preserve Text Editability, and document.export
takes preserveText (with layers). Horizontal and vertical point type is
written as a type layer (a TySh block with its EngineData) that a reader
can edit, and keeps its pixels. The layer holds the text, its fonts by
PostScript name, size, leading, tracking, scaling, baseline shift, caps,
underline, strikethrough, fill color, Fractional Widths, paragraph
alignment and orientation.

Type that a type layer would draw differently stays pixels: area type,
type on a path, strokes, non-solid fills, fractional tracking, character
attributes the layer does not carry, paragraphs that set more than their
alignment or run right to left, System Layout, Optical Margin Alignment,
ruby, effects, an appearance of its own and opacity masks. A layer that
holds type becomes a group of its type layers and pixel layers of the art
between them, unless other art in it blends in a mode other than Normal.
This commit is contained in:
dotCooCoo
2026-11-15 12:07:06 -08:00
parent bd67a010f6
commit 4327c51f57
14 changed files with 961 additions and 20 deletions
+1
View File
@@ -10,6 +10,7 @@ pub mod gif;
pub mod jpeg;
pub mod png;
pub mod psd;
mod psd_type;
pub mod quantize;
pub mod tga;
pub mod tiff;