Commit Graph
298 Commits
Author SHA1 Message Date
ruchirguitar 38bc5fd077 Type: draw digits in an Indic script, Western or by the letters before them (#10996) 2026-11-29 00:25:40 +05:30
aiongg ab20a4d05e text build script reads the manifest dir at run time, so worktrees sharing a target dir find their own fonts 2026-11-27 02:25:46 +00:00
aiongg 95334485a6 Merge PhotoCraft main (installed_catalog); craft-libs at next 5c5e0d52c3 2026-11-23 14:03:56 +00:00
aiongg e03e93e2df Fonts: tests offer a fixed catalog; installed fonts only where asked for
The process catalog the engine, font picker and Glyphs panel read follows the
shared engine's rule (uses_system_fonts): without the installed-font scan
(tests, nextest, PHOTOCRAFT_NO_SYSTEM_FONTS) it lists the bundled and added
fonts only, so a test's font list no longer depends on the machine. Code that
asks for installed fonts (load_system_fonts, installed_font_files) reads
installed_catalog(), the global Catalog. The options bar harness comment names
the real reason for its step limit.
2026-11-23 07:08:24 +00:00
aiongg 90e393ea85 Merge upstream main; pin craft-libs at ce643eb0 (next with the live font catalog and picker fixes) 2026-11-22 14:00:06 +00:00
David Mann a6abf45640 Merge PR #15202: fix(text): preserve possessive endings in spelling suggestions 2026-11-22 00:26:47 +01:00
David Mann fec6be72b9 Merge PR #15157: fix(text): keep supported left apostrophes inside spelling words 2026-11-22 00:26:02 +01:00
David Mann 6b7d2b6fc5 Merge PR #14755: fix(text): honor explicit Hans in served font language fallback 2026-11-22 00:25:15 +01:00
aiongg abb8b2315d Show fonts installed while PhotoCraft runs without a restart
Start the font catalog with the craft-libs app API at launch: it polls the
suite font store and rechecks the font folders on window activation, and
wakes the UI after a change. Each frame, the shared engine registers the
installed font files it lacks and re-renders the type layers that use the
affected families.
2026-11-21 06:27:48 +00:00
FredAppsandFredApps 12eb024b79 Limit text conversion to painted rows (#15717)
* Limit text conversion to painted rows

* Remove temporary full-row oracle

---------

Co-authored-by: FredApps <[email protected]>
2026-11-20 18:11:02 +07:00
aiongg 9ec396231e fix(text): skip the OS locale query in nextest test processes 2026-11-18 14:59:39 +00:00
FredApps d43d2ae651 Merge pull request #8691 from switch87/fix/text-symbol-fallback
Type: fall back to the symbol and math fonts for signs like ⌖ and ⤒ (#8689)
2026-11-18 16:25:10 +07:00
David Mann 01a5b5a389 Merge pull request #15381 from davidmann4/perf/test-speed-quick-wins
Test speed: no font scan in test processes, CMYK profile once, raw-develop at one depth (#15377)
2026-11-17 16:49:07 +01:00
aiongg ed14e1c413 PhotoCraft on the craft UI framework (#15449)
PhotoCraft's UI moves onto the shared craft UI framework in storytold/craft-libs (next branch): shell, dock and panels, hosted dialogs, keyboard, focus, IME and pointer routing, the canvas's view commands, themes and tokens. The engine, document model, file formats, commands and automation stay. PhotoCraft pins storytold/craft-libs next.
2026-11-17 10:41:35 -05:00
Dylan M. Taylor d71e9fd1bf text: bound copies of preserved style data and font names (#11046) 2026-11-16 21:59:36 -05:00
David MannandClaude Opus 5.5 e3e97d17e0 text: nextest test processes skip the shared engine's system font scan (#15377)
cfg!(test) only covers photocraft-text's own tests; every other crate's
test binaries link it as a normal dependency, so each nextest test
process started a background scan of the installed fonts (on Windows
also a reg.exe child for the UI locale) beside the GPU tests, and tests
silently depended on the machine's fonts. Skip it when NEXTEST is set,
as CI runs every test through nextest. Tests that want installed fonts
already build their own engine with TextEngine::with_system_fonts.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-17 02:37:53 +01:00
FredApps a94e84dd8d text: take the TySh envelope from craft-psd (#778)
parse_tysh/write_tysh/translate_tysh/transform_is_safe become adapters over
craft_psd::text::envelope (extracted from here in craft-libs#1594); only the
Affine <-> [f64; 6] mapping stays. write_tysh/build_tysh return Option: a block
the shared writer refuses (unsafe transform, non-finite bounds, > 8 MiB) is not
written, and export falls back to pixels with its existing warning. craft-psd
re-pinned to craft-libs main eafb50af (additions only in crates/psd).
2026-11-16 12:35:11 +01:00
Mex 5a537149b7 fix(text): preserve possessive endings in spelling suggestions
Suggest corrections for the possessive stem, then restore its ending and case. Cover the bundled dictionary, proper nouns, normalized apostrophes, and duplicate endings.
2026-11-15 20:18:41 +01:00
Dylan M. Taylor 3713b02f78 Merge pull request #15125 from storytold/dot/photo-plist-shared
Use shared binary plist lookup for macOS locale
2026-11-15 10:56:32 -05:00
Mex 94315dbafe fix(text): keep supported left apostrophes inside spelling words
Recognize U+2018 inside words, consistently with dictionary normalization. Cover exact UTF-8 token boundaries, real-dictionary misspellings and all supported apostrophe forms.
2026-11-15 15:46:06 +01:00
Dylan M. Taylor 3bae275d0a Refresh Base64 codec removal and retain plugin alphabet compatibility 2026-11-15 11:54:15 +00:00
Mex 380df930ca fix(text): ignore language extensions when choosing scripts
Stop script and region matching at extension/private-use singletons so a numbering-system value cannot override an explicit Chinese script. Extend the existing language table with extension, private-use, and extlang controls.
2026-11-14 20:11:47 +01:00
Mex 65adc6e793 fix(text): honor explicit Hans in served font language fallback 2026-11-14 19:48:12 +01:00
Dylan M. Taylor 74330157cb Use craft-psd for PSD/PSB format code (#13414)
* Use craft-psd from craft-libs; remove crates/psd

* Regenerate the scorecard (28 crate roots)

* Take craft-psd at craft-libs 55d120f2

* Regenerate lockfile for current shared format crates

* Pin shared format crates to current craft-libs main

* Match brush import cap to shared decoder budget

* xtask: update layer fixtures after PSD extraction
2026-11-12 02:53:54 -05:00
Dylan M. Taylor d51e4bce94 text: charge the rasterizer's output tiles, not only its pixels (#11047)
* text: charge the rasterizer's output tiles, not only its pixels

The renderer checked a layer's pixel count and working buffers, but its
output surface stores whole 256x256 tiles. An extreme transform of short
text gives a thin rectangle that crosses tens of thousands of tiles while
holding few pixels, so the tile storage far exceeded the budget.

Refuse a render whose output tiles exceed MAX_RASTER_BYTES.

* address review: charge text accumulator with output tiles

* address review: compute the accumulator size in u64
2026-11-11 16:24:19 -05:00
Tanish Manku efd3cb1e97 Merge pull request #8812 from devius/fonts-georgian
Fonts: draw Georgian with craft-fonts' Noto Sans Georgian, installed Georgian faces, and on the web
2026-11-11 00:00:51 -07:00
Dylan M. Taylor 4b1055c732 fix(text): validate font table directories in one pass and cap collection faces (#11194) 2026-11-10 17:57:38 -05:00
Khawar Zamman WaniandFredApps e1145b604e Make text-on-path placement editable (#11629)
* Add path text placement ranges and drag gestures

* Preview path placement and track bounded canvas damage

* Preserve legacy path anchors and show overflow markers

* Match path marker hit targets and directional cursors

* Fix path placement lint failures

* Cover path text body movement and position locks

* Keep open path text movable at range endpoints

* Target the type path after attaching text

* Fix path text range rendering and placement lifecycle

* Map vertical path text and preserve drag branch continuity

* Cover path placement lifecycle and preview damage regressions

* Preserve closest branch projection and fix CI regressions

* Normalize path endpoints and bind gestures to their viewport

* Simplify viewport ownership guards for Clippy

* Document path placement invariants and regression cases

* Fix path placement ownership, validation and geometry caching

* Correct path placement regression fixtures

* Ignore transient path geometry cache in UI state equality

* fix: allow path text flips with stale placement ranges

* fix: retain path text handles after shortening curves

* test: account for layer translation in path placement drags

* fix: mark path text range with x and o markers on the path

The beginning marker is an x and the end a small circle, both on the
path, with a plus in the circle while the range hides glyphs. The
cursor's triangle points right over the beginning, left over the end,
and both ways over the text body, which moves the whole range.
Direct Selection leaves an anchor or handle under a marker to path
editing; Path Selection always takes the marker.

* fix: resolve coincident path text markers by lap or drag direction

The x and o markers coincide on a closed path's full lap and on an
empty or end-clamped open range. A full lap now moves the whole text;
otherwise the first motion picks the beginning (backward) or the end
(forward). Marker fixtures press on the path, where the markers now
sit.

* fix: let either end of a full-lap path text range be dragged

Text attached to a closed path fills one lap, so its x and o markers
coincide and every press moved the whole text, leaving no way to
shorten the range. As the text begins just ahead of that point and
ends just behind it, a press ahead along the path now grabs the
beginning and one behind grabs the end; the point itself still moves
the whole text.

* test: check full-lap marker drags do not flip the text

* fix: read and write the path text range in PSD

Type on a path keeps its range in the Txt2 frame as /2 /6 [start end],
in curve-segment units with -1 for the default. Three reference-editor
files in ag-psd's test set fix the mapping: text-path ends a third into
the first segment and draws only "so" of "some text", and
text-path-26/27 move the start on an open path.

Import reads both ends (and the flipped flag) into the layer's start and
end. Export writes an open path whole with its start and end in the
range, instead of cutting the path at the start, and a closed path's
limited end as a range from its start. Path text in a document that
never came from a PSD now gets a Txt2 block, so its path is saved at
all, and the warning that the end limit is lost is gone.

* fix: let both selection tools grab a path text marker on an anchor

Direct Selection gave an anchor under a marker the click, so an open
path's default markers (on its end anchors) and a closed path's
coincident full-lap markers (on its first anchor) could not be moved
with that tool. In the reference editor either selection tool drags a
marker wherever the pointer shows the text bar with a triangle, so the
marker now wins for both tools.

The Direct Selection tests for reshaping a type path (#9114) drag its
last anchor, where the default end marker sits; they now end the
range short of it. To reshape at an anchor under a marker, drag the
marker off it or select the anchor with a marquee and nudge it.

* fix: keep explicit and empty path text ranges through PSD

An explicit end at the path's end stays explicit, so centered and right type keeps its alignment within the span. A closed range whose ends meet reads as empty, not as a full lap.

* ci: re-run checks after a download outage

* ci: re-run checks after a download outage

* fix: preserve legacy path text anchors through PSD

* ci: re-run checks against current main

---------

Co-authored-by: FredApps <[email protected]>
2026-11-10 16:28:51 +01:00
4e22c92889 fix(text): #8247 colour glyph review findings (fan-out graphs, hidden glyphs, CMYK, clips, radial)
Works through the five CodeRabbit threads on d9102e7e0a:

- A COLR graph that reuses both children of every composite was walked
  exponentially often (skrifa 0.44 only limits depth and cycles on the
  current path), stalling rendering and measuring. photocraft-text moves to
  skrifa 0.47, already in the lockfile, which caps a walk at 16384 paints;
  such a glyph falls back to its plain outline like a cycle does.
- Glyphs hidden by a transparent text colour are skipped before their graph
  is walked or painted, so they can't spend the budget and drop the
  visible text.
- In CMYK (and other non-RGB) documents, pixels in the text colour alone
  keep its own components instead of a round trip through sRGB, as plain
  glyphs do (a K-only black stays K only).
- Nested clips intersect by the smaller coverage, so a glyph clipped by its
  own outline twice keeps its anti-aliased edge.
- A radial gradient's shared point of touching circles (a = b = c = 0) is
  painted with the largest t instead of dividing 0 by 0.

Each fix has a test that fails without it.

Co-Authored-By: adi-1108 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-09 15:21:10 +01:00
David Mann 5ac21d0166 Merge remote-tracking branch 'origin/main' into pr-8247 2026-11-09 13:52:03 +01:00
FredApps e4961259bb Merge pull request #10344 from ebosido444-ai/fix/faux-bold-weight
fix(text): size faux bold by Photoshop's size/72 ring instead of a flat 3.6% (#9008)
2026-11-09 11:55:23 +01:00
d9102e7e0a fix(text): #8247 colour glyph review findings (clips, budgets, edge cases)
Works through the review threads on the colour glyph painter:

- Clips no longer leak into composites: a layer is painted without the
  clips around it, which apply once when the layer is merged, so a glyph
  around a SrcIn composite keeps its anti-aliased edges and Src/Clear
  composites leave pixels outside the clip alone.
- Layers, clip masks and fills count against shared budgets: the bytes
  left beside the accumulator and output (MAX_RASTER_BYTES) and the pixel
  work left of MAX_PASS_PIXELS. The fixed eight-layer cap that flattened
  deeper composites (dropping their modes) is gone.
- Clip boxes are drawn like the clip glyphs, so bent type bends them
  instead of dropping them; ink bounds take the intersection of the clips.
- Colour glyph clips follow the selected anti-alias mode.
- A colour glyph whose paint graph skrifa cannot walk draws its outline;
  one whose base glyph has no outline still paints its layers.
- Coincident colour stops switch at their offset; sweeps whose angles run
  past 360 degrees sample the right turn of the angle.
- Float documents keep extended text colours in colour glyphs.

Co-Authored-By: Aditya Vishwakarma <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-09 01:04:31 +01:00
David Mann 2eddd344eb Merge remote-tracking branch 'origin/main' into pr-8247 2026-11-09 00:50:17 +01:00
Triwarr d1e95f57a8 PDF: share embedded fonts and tighten text checks
- Register imported fonts in photocraft_text::shared() so the app can
  re-lay text after edits or DPI changes. Prefer an installed full
  family, and register an embedded face under its PostScript name
  (key-suffixed when two faces share it) so a subset cannot shadow it.
- Warn that text using PDF-embedded fonts may change font when edited or
  reopened; the document format does not carry the bytes yet.
- Reject mirrored text and b == -c matrices; scale the tolerance by the
  em size so 90-degree text stays editable. Tests for rotated and
  mirrored text.
- Use pdfcer's 0.30 em line tolerance.
2026-11-08 05:02:23 +01:00
Triwarr a18268d0d3 PDF: editable text pass and review fixes
- Text: build one TextLayer per line/style run from the Device's glyph
  draws. Derive the family from the PostScript name (subset tag, style
  suffix, MT/PS, camel spacing); italic from the font flags/attributes
  or name; bold from the weight or name; pair fill+stroke glyphs as fake
  bold (Tr 2/6) instead of a second run.
- Require an embedded font with a PostScript name; standard-14/Type 1
  substitutes and Type 3 text fall back to the raster page.
- Register embedded font bytes in the text engine, use the family the
  font reports, and render text caches on import. Tests compare the
  text composite with the raster page.
- Review fixes: accept a page-sized no-op clip; draw zero-width strokes
  as 1 px hairlines and use 1 px as the dash base; reject non-uniform
  stroke transforms; repeat odd dash arrays and keep zero dashes;
  ExtGState ca/CA already reach the colour alpha (tested); note that
  catch_unwind only guards unwinding profiles.
2026-11-08 05:02:23 +01:00
f826d0ac24 fix(text): #8247 colour glyph buffers follow main's fallible Coverage
Main made Coverage::new fallible (Coverage::try_new, finish -> Option, #4979);
the colour glyph Painter still called the old infallible API and its own
layer/clip buffers used vec! sized by the glyph window. Every buffer is now
reserved with try_reserve; a glyph that cannot be reserved makes the text
render nothing, as main does for its own passes, instead of aborting.

Co-Authored-By: adi-1108 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-08 02:22:24 +01:00
b42dcd5b1c Merge main into #8247 (resolve render.rs against faux-bold restructure)
Co-Authored-By: adi-1108 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-08 01:41:13 +01:00
Davit Matchakhelidze a86691a7d9 Merge upstream main into fonts-georgian 2026-11-07 02:42:30 +04:00
David Mann 1e82972ee1 Merge pull request #9667 from davidmann4/fix/system-tools-full-path
Windows: run explorer.exe and reg.exe by full path (#9666)
2026-11-06 17:26:45 +01:00
ebosido444-ai 8c7b173e03 test(text): pin faux bold's ink at 12, 32, 72, 120 and 200 px
The ring is `max(size/72, min(size/40, 0.45))`; the ink test only checked
120 px. It now walks five sizes, asserts the ink rectangle grows by twice the
ring at each (the flat 3.6 % ring this replaced grew it by 0.072 * size), and
pins the bold/plain ink ratio: 1.35x at 32, 72, 120 and 200 px, 1.64x at 12 px
where the pixel floor is 3.75 % of the size.

No caller of the removed constant is left: `grep -rn FAUX_BOLD` finds only the
`type.fauxBold` menu command id, and `faux_bold_radius(size_px)` is the only
reader of the ring.
2026-11-06 01:47:53 +03:00
ebosido444-ai a68d2a3dbf fix(text): size faux bold by Photoshop's size/72 ring instead of a flat 3.6% (#9008)
Faux bold grew the outline by a flat 3.6% of the font size. Photoshop thickens
by about `size/72`, so a PSD's Faux Bold layer rendered 1.3-1.5x heavier than
the pixels Photoshop stored in the file. That shows up as soon as the layer is
clicked: it displays the PSD's own raster until edit mode re-renders it
(`begin_edit` -> `type.edit` -> `refresh_at`), and the text visibly turns
bolder at that moment.

`faux_bold_radius(size_px)` now returns the ring in pixels, fitted to
Photoshop's stored layer pixels: `size/72`, with a pixel floor that fades in
below ~32 px (Photoshop's small type reads heavier than `size/72`) and a cap so
a sub-pixel glyph does not grow into a blob.

Measured with a temporary probe that compared each type layer's render with the
PSD's own cached raster (alpha sum, no text or file content recorded) on a
4200x5940 CMYK document with five faux-bold layers, 18-60 pt at 300 dpi:

    layer   px size   ink vs Photoshop, before   after
    3        125        1.35x                    0.87x
    4        125        1.29x                    0.89x
    8        250        1.26x                    0.93x
    9         75        1.47x                    0.96x
    10        75        1.44x                    0.96x

Text without faux bold is untouched (the radius is only read for bold glyphs).

Tests: `faux_bold_radius_has_a_pixel_floor_that_fades_for_tiny_type` (the
fitted curve), `faux_bold_at_display_sizes_grows_the_outline_by_size_over_72`
(the weight at 120 px, 1.35x over plain; the flat ring measured 1.95x there),
and the weight pinned in `faux_bold_keeps_antialiased_edges_at_small_sizes`,
which was adjusted to the new ring.

(faux bold does not widen advances) is still open and not touched here.
2026-11-06 01:47:53 +03:00
faseJadeandClaude Opus 5.5 efb2a6cbc7 refactor: one base64 decoder, from the base64 crate
paint::tile::b64_decode, plugin.install, the macOS monitor-profile reader
and the font SRI helper each hand-rolled base64. The shared decoder took
"====" as one zero byte and padding mid-string ("QQ==QUJD"), and
plugin.install alone took unpadded input. All now use the base64 crate
(already in the tree): standard alphabet, padding optional, whitespace
ignored, anything else refused.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-05 09:39:30 +02:00
Khawar Zamman Wani 0a9717fa64 PDF export: keep the top text and shape layers as vectors, with selectable text (#10355)
* Skip compositing for geometric measurements

* Preserve simple PDF shapes and glyph source ranges

* Preserve text and shapes in PDF export (#10269)

- Export topmost simple text layers as vector glyph outlines with selectable text
- Embed ActualText unicode span and invisible text operators (mode 3 Tr) for 100% extraction
- Support stroked shapes in vector PDF export (centered solid strokes, dashes, line caps/joins)
- Retain glyph style indices in text rendering outlines

* Drop a product name from the glyph outline doc comment

* PDF export: keep path text and synthetic bold raster

* Fix PDF Unicode selection and respect font embedding permissions

* Render the text cache in PDF raster fallback fixtures

* Fix PDF vector selection eligibility and finite text matrices

* Preserve upper PDF vectors and reject overflowing curve controls

* Fix text shape import in PDF regression test

* Cover PDF Unicode map blocks and leading selection whitespace
2026-11-05 03:33:35 +01:00
Tareq HalabyandFredApps 2472b4a46b PSD: keep stylistic sets in Txt2 for PhotoCraft-native documents (#10313)
* PSD: keep stylistic sets in Txt2 for PhotoCraft-native documents.

needs_txt2 now covers Txt2-only OpenType flags (ss01–ss20 and non-default TXT2_FEATURES). Fresh documents get a framed point-text object with full style runs so Set 1/5 round-trip on save/reopen (#10308).

* Txt2: seed fill colour and font list on PhotoCraft-native blocks.

Fresh style runs get a /53 paint dict, and an empty font list gets a CoolTypeFont entry so index 0 resolves (CodeRabbit on #10313).

* Txt2: tag SimplePaint and ensure numbered /0 on legacy blocks.

CodeRabbit: write /99 /SimplePaint on fresh /53 dicts, and create the numbered resource dictionary before pad_frames when a legacy block lacks it.

* Txt2: treat a missing stylistic-set mask as 0 when comparing styles

A style run without key 85 used to agree with any ssNN mask, so enabling
ss01 could leave the file's runs in place on save. Align with import's
default of 0. Also restore the G8 gaps note after rebasing onto main.

* style(io): rustfmt psd_kerning stylistic-sets test

* Txt2: keep Photoshop /0 stable when seeding fonts and frames

Only seed a CoolTypeFont list and inject /0/8 when the block is
PhotoCraft-native or already had those keys / needs new frames, so
unedited Photoshop Txt2 saves stay byte-identical (#2374).

* style(text): rustfmt oversized-template assert

* PSD: keep the Txt2 scaffolding to PhotoCraft-native blocks

A file's own Txt2 block (any Photoshop era) is written as before: no
numbered /0 or /0/8 frame list is injected, a layer without a template
object gets its stub, a run without /53 isn't given one, and no
minimal style base is used. Only a block PhotoCraft creates itself
(prev.is_none()) gets fresh point-text objects, minimal runs, a seeded
font list and a frame list.

Fresh objects now write one /5 paragraph run per paragraph (UTF-16
lengths, checked conversion), as edited objects are refitted.

Tests: Photoshop blocks with an empty or missing /0 get no native
scaffolding; the oversized-template test is back to main's assertion;
fresh paragraph runs; the PSD round trip checks ss01 and ss05 on every
run.

---------

Co-authored-by: FredApps <[email protected]>
2026-11-04 13:28:06 +01:00
Dylan M. Taylor d5bd171810 text: merge a run of union components once when fitting area type (#11065)
AreaShape::spans folded each Combine/Join component into the growing
interval list with a full merge, so a shape of many disjoint components
cost components x intervals per row, repeated for every row the layout
tries. Gather a run of union components' intervals and merge them once
(sort and sweep) when the run ends; other operators fold as before.
2026-11-03 20:23:51 -05:00
Dylan M. Taylor 282be0927e text: group glyphs by colour once instead of rescanning per colour (#11069)
The rasterizer found each glyph's colour with a linear search of the
colours seen so far, then walked every glyph and decoration twice per
colour (bounds, then coverage) to draw that colour's items. A text layer
with a colour per letter cost colours x glyphs before drawing anything.

Build each colour's glyph and decoration lists in one pass, keyed by the
colour's bits, and draw each pass from its own lists.
2026-11-03 20:23:29 -05:00
Dylan M. Taylor 3fd5304dfe text: find paragraphs and trailing blanks without rescanning (#11045)
Layout looked up each paragraph's style with a reverse scan of every
paragraph start, tab placement re-checked the whole rest of the line for
every cluster, and PSD import found each character run's paragraph by
summing paragraph lengths from the first one. Each was quadratic in
counts a file controls.

Use the existing binary search over run starts for paragraphs, one
reverse scan for the line's last inked slot, and precomputed paragraph
ends with a binary search on import.
2026-11-03 19:35:50 -05:00
d21c403e5f Type: add OpenType Numerals submenu (figure styles) (#11051)
* Type: add OpenType Numerals submenu (figure styles)

Type › OpenType › Numerals sets lnum/onum/pnum/tnum as a radio style
(Default through Tabular Oldstyle). Checkmarks follow the selection
start; TYPE-218-5 scorecard/gaps updated; parity floor 640.

* refactor(engine): one style-at-character lookup for the OpenType menus

feature_on_at and numerals_style_at each walked the runs the same way;
they now share style_at. NumeralsStyle::from_id and numerals_style_of
read the existing tables instead of repeating them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(text): persist OpenType numeral tags through PSD EngineData

Map lnum/pnum/tnum as EngineData bools and the width×height combos as
FigureStyle (Krita/Illustrator), so Numerals choices survive PSD round-trip.

* docs(gaps): note Numerals PSD figure-tag round-trip

* revert(text): keep PSD EngineData to the keys Photoshop writes

Backs out the PSD half of 18610324 and its gaps note (58813de3); the
engine reformat in that commit stays.

- `LiningFigures`, `ProportionalFigures` and `TabularFigures` are not
  Photoshop EngineData keys (the commit says Photoshop only has
  `OldStyle`), so writing them puts keys of our own into users' PSDs.
- The `/FigureStyle` code table (1-4) has no oracle: no Photoshop-authored
  file in photocraft-corpus, and neither ag-psd nor psd-tools reads it.

AGENTS.md rule 3 asks for public specs or observation. PSD persistence
of the numeral styles can come back with a Photoshop-authored oracle.
The Numerals menu still round-trips through .pcraft.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* test(text): lock PSD EngineData to Photoshop OldStyle for numerals

Document AGENTS.md clean-room: only onum survives TySh round-trip; lnum/pnum/tnum stay .pcraft-only until a Photoshop-authored corpus oracle.

---------

Co-authored-by: FredApps <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-11-03 17:55:35 +01:00
Davit Matchakhelidze 5328220ebe Merge upstream main into fonts-georgian 2026-11-03 07:36:24 +04:00
David Mann 9ec0f51dc1 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	crates/ui-egui/src/i18n/nb.tsv
2026-10-31 13:55:06 +01:00