openpencil/tests/e2e
Danila Poyarkov e77eeff11c
fix(fig): write text glyphs from the layout the renderer draws (#928)
* fix(fig): write text glyphs from the layout the renderer draws

Text without saved glyphs was written to .fig with outlines from a
character-by-character fallback: one unwrapped line at y = lineHeight,
no alignment, advances in pixels. Figma lays saved text out from that
data, so every wrapped OpenPencil label opened in Figma on one line, and
since saved glyphs now draw before the paragraph, OpenPencil did the same
after a reopen (#914). The Figma clipboard had a second writer with its
own shaping that matched outlines to characters by index.

One builder in @open-pencil/fig now writes derivedTextData for both. It
keeps glyphs a layer already has and otherwise asks the export runtime to
shape the text. Core shapes with the paragraph the renderer draws, so
lines, alignment, and baselines match, and takes each outline from the
glyph ID CanvasKit chose, so ligatures and contextual forms keep their
shapes. CanvasKit does not say which font drew a run, so outlines are
written only when the run's own font covers it; otherwise the layout is
written without outlines and readers lay the text out themselves.
Advances are in em units and the character offset map has one entry per
character, as in Figma's files.

The reader drops glyphs the earlier fallback wrote, recognised by its
offset map one entry longer than the text with every glyph on the one
written baseline, and any glyph set with a missing outline.

* fix(scene-graph): reflow resized text instead of stretching its glyphs

Resizing scaled a text layer's saved glyphs into the new box. That suits
path text, whose glyphs follow its path, but flat text reflows, and with
saved glyphs drawn before the paragraph a resized Figma text layer was
drawn stretched. Scale glyphs only for path text, including baked path
text that kept only rotated glyphs, and let the width change drop the
rest.

* docs(fig): describe how derived text is written

Figma draws saved text from derivedTextData even when it has the font, so the export docs record which glyphs the shared writer keeps, shapes, or leaves without outlines, and the units it writes. The README names the runtime service by what it now does.

* fix(fig): write text without glyphs when shaping fails

Glyphs are derived data, so a shaper error must not fail the .fig save or Figma clipboard copy that writes them. The builder now writes the layer without glyphs and logs a warning; the clipboard used to swallow the error silently, which hid a font-provider mismatch.
2026-10-06 11:37:02 +00:00
..
app test: type the tabs module in the closed-documents spec (#917) 2026-10-05 18:55:49 +00:00
brand feat: refresh branding with generated platform icons (#707) 2026-09-16 11:54:07 +03:00
canvas fix(fig): write text glyphs from the layout the renderer draws (#928) 2026-10-06 11:37:02 +00:00
chat feat(ai): revert, regenerate, and edit chat turns (#844) 2026-10-06 09:54:42 +00:00
clipboard test(clipboard): open a document in the Tauri fixture 2026-09-16 14:00:30 +03:00
code feat(lint): suggest group-to-frame and hidden-layer fixes; keep canvas edits in code previews (#870) 2026-10-04 12:46:06 +00:00
collab feat(collab)!: sync layer trees as a CRDT and open each room in its own tab (#902) 2026-10-06 10:40:25 +00:00
color-picker test: typecheck the test suites and fix what that found (#896) 2026-10-05 12:42:38 +00:00
components test: typecheck the test suites and fix what that found (#896) 2026-10-05 12:42:38 +00:00
context-menu feat: create, fill, and edit slots (#862) 2026-10-04 17:02:28 +00:00
design perf(properties): retain inactive panels safely 2026-09-15 17:01:44 +03:00
design-check test: typecheck the test suites and fix what that found (#896) 2026-10-05 12:42:38 +00:00
dom-css feat: write variables as a CSS token stylesheet (#856) 2026-10-04 18:15:52 +00:00
editor fix: match Figma when dragging, drawing, duplicating, and pasting (#894) 2026-10-05 12:39:03 +00:00
export test: typecheck the test suites and fix what that found (#896) 2026-10-05 12:42:38 +00:00
fonts test: typecheck the test suites and fix what that found (#896) 2026-10-05 12:42:38 +00:00
keyboard feat: create, fill, and edit slots (#862) 2026-10-04 17:02:28 +00:00
layers test: typecheck the test suites and fix what that found (#896) 2026-10-05 12:42:38 +00:00
native fix: validate parsed JSON at untrusted boundaries with Valibot (#855) 2026-10-04 17:01:50 +00:00
pages Release v0.14.0 2026-08-10 11:40:44 +03:00
panels feat(vue): add responsive property grids 2026-07-26 12:42:50 +03:00
perf test: typecheck the test suites and fix what that found (#896) 2026-10-05 12:42:38 +00:00
properties feat: create, fill, and edit slots (#862) 2026-10-04 17:02:28 +00:00
scene test: honor the configured browser test origin 2026-09-16 12:46:13 +03:00
settings feat(collab)!: sync layer trees as a CRDT and open each room in its own tab (#902) 2026-10-06 10:40:25 +00:00
snap test(snapping): verify pixel rounding without guides 2026-09-13 14:02:16 +03:00
storage refactor(ui): compose shared editor controls (#670) 2026-09-10 12:09:06 +03:00
storybook fix: validate parsed JSON at untrusted boundaries with Valibot (#855) 2026-10-04 17:01:50 +00:00
stroke-picker test: typecheck the test suites and fix what that found (#896) 2026-10-05 12:42:38 +00:00
text test: typecheck the test suites and fix what that found (#896) 2026-10-05 12:42:38 +00:00
toolbar test: typecheck the test suites and fix what that found (#896) 2026-10-05 12:42:38 +00:00
tools test: typecheck the test suites and fix what that found (#896) 2026-10-05 12:42:38 +00:00
ui test(ui): keep runtime theme import dependency-safe 2026-07-20 14:07:32 +03:00
variables
vectorize feat(app): convert image layers to vectors 2026-07-27 16:22:05 +03:00
viewport
autosave.spec.ts test: typecheck the test suites and fix what that found (#896) 2026-10-05 12:42:38 +00:00
components.spec.ts feat: create, fill, and edit slots (#862) 2026-10-04 17:02:28 +00:00
fixtures.ts test(app): stabilize final interaction coverage 2026-07-20 16:34:16 +03:00
recovery.spec.ts fix: protect unsaved documents and defer credential access (#713) 2026-09-17 15:25:15 +03:00