openpencil/tests/engine/render/canvas
Danila Poyarkov 0f64cecc49
fix(text): finalize font readiness and label shaping (#593)
* fix(text): prepare browser fonts atomically

- Fetch approved Fontsource resources directly in browsers with bounded responses and retryable provider failures
- Limit page font resolution concurrency and retain live Inter substitution paragraphs after baked glyph invalidation
- Shape frame, section, and component labels through a bounded native Paragraph cache
- Cover real Geist, Geist Mono, and Roboto Mono browser loading plus substitution and cache lifecycle behavior

* test(canvas): cover substitution and label shaping

- Capture baked missing-font text before editing, live Inter substitution on first input, and visible undo output
- Assert text-picture and derived-glyph invalidation with finalized substituted readiness
- Cover shaped frame, rotated frame, section, component, component-set, ellipsis, kerning, and zoom label presentation

* fix(text): preserve same-origin fetches during font resolution

- Route same-origin application and fixture requests through native fetch while Unifont temporarily proxies global HTTP requests
- Keep the external provider HTTPS allowlist enforced for cross-origin font resources
- Cover the production race discovered while loading gold-preview.fig during provider initialization

* fix(text): preserve substituted path glyphs

- Keep imported derived curved glyphs for text-on-path layers when exact fonts finalize as substituted
- Cover substituted path rendering through the runtime renderer and refresh the corrected visual oracle
- Update shaped Inter measurement badges and merged typography panel snapshots after visual inspection
- Search virtualized font catalogs explicitly and restore the canvas screenshot helper used by broad E2E coverage

* fix(text): use browser font transport without desktop warning

- Keep the browser provider implementation aligned with current settings behavior after splitting from preparation

* test(text): inject same-origin browser font context

- Keep the transport test deterministic outside a Window global

* fix(text): preserve final browser font transport hardening

- Carry the same-origin large-document bypass and bounded cross-origin provider checks from the preserved integration snapshot

* fix(text): initialize font transport outside Window contexts

- Keep unit and headless module imports safe while browsers use their current origin

* test(text): satisfy async visual fixture contract

- Return from the resolver setup continuation after requesting render

* test(canvas): include paragraph cache lifecycle

* fix(text): cancel queued browser font loads

- Race serialized provider work against preparation cancellation\n- Release queue slots after cancelled waiters without disturbing active requests\n- Reuse one section-title paragraph cache entry for measurement and drawing

* fix(text): close font queue cancellation races

- Release reserved proxy queue slots when cancellation lands after queue acquisition\n- Skip paragraph work for zero-width section labels

* fix(text): abort active provider resolution

- Race active provider resolution against its preparation signal and restore the temporary fetch proxy promptly\n- Forward cancellation through proxied provider requests\n- Align the renderer font-readiness facade with substituted text
2026-08-30 14:33:32 +03:00
..
effects refactor(canvas): adopt immutable CanvasKit paths (#554) 2026-08-18 23:09:45 +03:00
guides feat(canvas): add Figma guide feedback parity 2026-08-20 14:02:33 +03:00
labels fix(text): finalize font readiness and label shaping (#593) 2026-08-30 14:33:32 +03:00
visual refactor(fig): own instance interpretation 2026-07-18 02:06:34 +03:00
blend.test.ts feat: split SceneGraph and Pen packages 2026-06-30 10:54:32 +03:00
boolean-visual.test.ts chore: format codebase 2026-05-24 12:15:29 +03:00
boolean.test.ts refactor(canvas): adopt immutable CanvasKit paths (#554) 2026-08-18 23:09:45 +03:00
cache.test.ts Merge remote-tracking branch 'joey/feature-overlapping-element-analysis-tool' into pr352-local-merge 2026-06-30 09:47:07 +03:00
component-label-text.test.ts
corner-smoothing.test.ts refactor(canvas): adopt immutable CanvasKit paths (#554) 2026-08-18 23:09:45 +03:00
culling.test.ts fix(fig): preserve component instance rendering 2026-08-10 04:30:06 -03:00
derived-text.test.ts feat(fig): support text on path 2026-08-17 12:00:01 +03:00
font-readiness.test.ts feat: split SceneGraph and Pen packages 2026-06-30 10:54:32 +03:00
gradient.test.ts fix(canvas): orient linear gradients like Figma 2026-05-18 03:21:16 +03:00
image-fill.test.ts feat: split SceneGraph and Pen packages 2026-06-30 10:54:32 +03:00
label-cache.test.ts
layout-grids.test.ts feat: split SceneGraph and Pen packages 2026-06-30 10:54:32 +03:00
line.test.ts fix(fig): preserve imported hug container bounds 2026-05-18 04:20:22 +03:00
masks.test.ts feat: split SceneGraph and Pen packages 2026-06-30 10:54:32 +03:00
measurement.test.ts feat(canvas): measure distances between layers (#515) 2026-08-14 18:18:55 +03:00
raster-export.test.ts fix(fig): preserve component instance rendering 2026-08-10 04:30:06 -03:00
renderer-lifecycle.test.ts fix(text): finalize font readiness and label shaping (#593) 2026-08-30 14:33:32 +03:00
retained-backing.test.ts fix(fig): address instance rendering review 2026-08-10 05:09:03 -03:00
schema-fill-fallback.test.ts fix(fig): preserve multi-color vector fills 2026-07-28 11:45:58 +03:00
silhouette-autopsy.test.ts feat(fig): support text on path 2026-08-17 12:00:01 +03:00
text-font-variations.test.ts fix(canvas): render Figma leading trim 2026-05-26 16:23:59 +03:00
text.test.ts fix(text): finalize font readiness and label shaping (#593) 2026-08-30 14:33:32 +03:00
variable-modes.test.ts fix(fig): honor node-scoped variable modes 2026-07-21 00:23:00 +03:00