openpencil/packages/core/src/text
Danila Poyarkov e23b3f0ce1 feat(layout): use opentype.js for accurate headless text measurement
estimateTextSize() now tries opentype.js per-glyph advance widths
before falling back to the rough 0.6 × fontSize × charCount heuristic.
Since font data is already cached via loadFont(), this gives accurate
variable-width measurement for any loaded font — no CanvasKit needed.

Parsed opentype.js Font objects are cached per family+style to avoid
reparsing on every layout pass.
2026-04-22 14:11:36 +03:00
..
clipboard-derived-text.ts Release v0.11.4 2026-04-08 20:52:09 +03:00
direction.ts Format 2026-04-06 14:40:19 +03:00
editor.ts Format 2026-04-06 14:40:19 +03:00
fonts.ts Add clipboard text v4 export (#164) 2026-04-08 15:35:00 +03:00
index.ts Restructure @open-pencil/core into domain modules 2026-04-06 14:39:53 +03:00
opentype.ts feat(layout): use opentype.js for accurate headless text measurement 2026-04-22 14:11:36 +03:00
style-runs.ts Restructure @open-pencil/core into domain modules 2026-04-06 14:39:53 +03:00