openpencil/packages/core
Danila Poyarkov 226542cfcf fix(layout): use stored .fig dimensions for headless text measurement
The estimateTextSize() fallback (fontSize × 0.6 × charCount) produced
wildly inaccurate results, causing 26K node mismatches on material3.fig.
Nodes imported from .fig files already carry Figma's computed dimensions —
use those instead. Falls back to the estimate only for newly-created
nodes with the 100×100 default size.

Reduces headless layout mismatches by ~56% (26,299 → ~11,669), with
TEXT node mismatches dropping 92%.

Fixes #212

Co-authored-by: Alexander Bonin <3462438+alex4o@users.noreply.github.com>
2026-04-22 14:00:07 +03:00
..
assets Refactor font loading: DRY up local font lookup, fix headless fallback 2026-03-16 13:38:16 +03:00
src fix(layout): use stored .fig dimensions for headless text measurement 2026-04-22 14:00:07 +03:00
package.json fix(layout): bump yoga-layout to 3.3.0-grid.3 with Node.free() support 2026-04-13 12:09:45 +03:00
tsconfig.json Fix core release build config 2026-03-30 18:54:18 +03:00
tsdown.config.ts Release v0.11.6 2026-04-08 22:04:22 +03:00