Commit graph

29 commits

Author SHA1 Message Date
rcoenen be272dc4dc
feat(fig): support text on path 2026-08-17 12:00:01 +03:00
Danila Poyarkov 7d8d33e1e5 feat(vector): add bitmap vectorization engine
- Preprocess raster input within provider image limits while preserving alpha

- Convert transformed SVG paths and gradients into editable vector networks

- Normalize path geometry into tightly placed vector frames

- Cover real provider fixtures, coordinate mapping, transforms, and gradients

Co-authored-by: Rob Coenen <753704+rcoenen@users.noreply.github.com>
2026-07-27 15:33:15 +03:00
Danila Poyarkov 9919d8710a fix(text): verify visible international font rendering
- Register CanvasKit faces under their source family names so CJK and Arabic glyphs paint instead of only shaping metrics
- Add deterministic CJK, Arabic, mixed-script, first-paint, and interactive fallback image oracles
- Cover typed and tool-created text parity with a repository-owned Noto CJK subset

Fixes #324
Fixes #291
2026-07-17 16:19:18 +03:00
Danila Poyarkov 72e3bc4fb5 chore: organize repo tooling under tools 2026-06-07 09:40:54 +03:00
Danila Poyarkov 64e8b21949 fix(canvas): render imported page guides 2026-05-27 19:00:23 +03:00
Danila Poyarkov 711106518e test(kiwi): record raw metadata oracle 2026-05-27 15:37:14 +03:00
Danila Poyarkov da537c05a7 test(canvas): summarize pattern oracle deltas 2026-05-27 14:25:10 +03:00
Danila Poyarkov f67c6c78c7 test(kiwi): record pattern alignment oracle 2026-05-27 13:21:44 +03:00
Danila Poyarkov d3eed6f4a9 fix(canvas): derive rich decoration geometry 2026-05-27 12:16:08 +03:00
Danila Poyarkov 9a7ef5e2cb test(canvas): update visual oracle metrics 2026-05-27 11:04:27 +03:00
Danila Poyarkov 5c6808e219 test(kiwi): record Figma noise effect payloads 2026-05-27 02:56:05 +03:00
Danila Poyarkov 4861b37e64 fix(io): include text decoration export bounds 2026-05-27 00:53:47 +03:00
Danila Poyarkov 94dd6cf3aa fix(canvas): tune Figma pattern origin 2026-05-26 21:21:49 +03:00
Danila Poyarkov 16e523380b test(canvas): tighten pattern visual oracle 2026-05-26 21:12:57 +03:00
Danila Poyarkov e02782d1b5 test(canvas): record Figma visual oracle diffs 2026-05-26 20:44:18 +03:00
Danila Poyarkov c1532610db fix(canvas): tighten Figma text and pattern fidelity 2026-05-26 18:30:08 +03:00
Danila Poyarkov d208cc326e fix(canvas): render Figma pattern fills 2026-05-26 17:33:45 +03:00
Danila Poyarkov 63f391d694 test(kiwi): add Figma mask oracle coverage 2026-05-26 16:34:33 +03:00
Danila Poyarkov 3348115a04 test(kiwi): record pattern paint oracle gap 2026-05-26 16:24:55 +03:00
Danila Poyarkov 1e1d78c7f6 fix(canvas): render Figma leading trim 2026-05-26 16:23:59 +03:00
Danila Poyarkov fd0124b6f8 Add Arabic and RTL support
# Conflicts:
#	packages/core/src/renderer/text.ts
2026-03-29 21:06:29 +03:00
Mahmoud Almontasser 9ed102b706 feat: add Arabic and RTL support 2026-03-29 11:42:30 +02:00
Danila Poyarkov e396df3224 Add .pen document import
Co-authored-by: Anton Soldatov <eddclyde@yandex.ru>
2026-03-28 13:57:32 +03:00
Danila Poyarkov b0e94a0bef Remove autoresearch truth file 2026-03-14 18:11:46 +03:00
Danila Poyarkov fd5b0b5538 Name-based tree path matching: 0 unmatched (was 99), reveals 106 total real diffs\n\nResult: {"status":"keep","total_diffs":106,"visibility":1,"text":0,"fills":11,"radius":0,"size":94,"unmatched":0} 2026-03-14 14:48:55 +03:00
Danila Poyarkov 8719546b16 Set up autoresearch for Figma import fidelity optimization 2026-03-14 13:07:27 +03:00
Danila Poyarkov 0d1f42f0b1
Fix CJK text garbled when font unavailable (#89)
* Fix CJK text garbled when font unavailable (#69)

Always use buildParagraph for text rendering when fonts are loaded,
even when the node's specific font isn't available. The paragraph
shaper falls back to the CJK font in fontFamilies, instead of the
previous drawText fallback which used Inter (no CJK glyphs).

* Add renderText unit tests for CJK font fallback behavior

* Add CJK visual regression test with Noto Sans SC fixture

- Download NotoSansSC-Regular.ttf as LFS-tracked test fixture
- Add setCJKFallbackFamily() export for headless/test use
- Visual test verifies CJK text renders through buildParagraph fallback
  when node font is unavailable (the exact PR #89 scenario)
- Assert dark pixel count > 500 to distinguish real glyphs from tofu
2026-03-10 16:58:57 +03:00
Danila Poyarkov f6a12cc736 Fix DSD propagation through intermediate DSD-targeted clones
Replace BFS (which skipped DSD-modified nodes in visited set, breaking
the chain for deeper clones) with iterative convergence loop. Track
dsdSizeSet separately from dsdModified so nodes with only position/
geometry changes inherit size from their source.

Fix transitive override propagation: re-clone from source (not component)
to preserve componentId chain for DSD. Add syncChildrenDeep for deep
property propagation (stroke colors on nested vectors).

Reduces vector overflow in gold-preview.fig from 25 to 0 (visible,
unclipped).
2026-03-04 22:47:32 +03:00
Danila Poyarkov f24f6e0dc6 Add .fig test fixtures (LFS) and fix O(n²) import bottleneck
- Add Material 3 Design Kit and Nuxt UI v4 community files as test fixtures
- Track tests/fixtures/*.fig with Git LFS
- Fix O(n²) getChildren() in fig-import: build children index upfront
  - material3.fig (87K nodes): 37s → 535ms (69x faster)
  - nuxtui.fig (314K nodes): minutes → 2.3s
- Optimize kiwi ByteBuffer: inline readVarUint, use TextDecoder for strings
2026-03-01 09:55:07 +03:00