Skip to content

feat: render project fonts in editor - #3367

Draft
nighca wants to merge 5 commits into
goplus:devfrom
nighca:issue-3366
Draft

feat: render project fonts in editor#3367
nighca wants to merge 5 commits into
goplus:devfrom
nighca:issue-3366

Conversation

@nighca

@nighca nighca commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Depends on #3362.
Closes #3366.

Summary

  • provide project fonts and the fontPreferences array to the editor SVG rendering context;
  • apply project font semantics to SVG font-family references;
  • rasterize SVG image previews from project font buffers through Resvg/WASM;
  • update image-preview consumers to use the font-aware rendering path.

Status

This PR remains draft and must not merge yet.

  • The WASM approach avoids the large-font data-URI performance problem, but current usvg 0.47 fallback merges glyphs by index rather than grapheme cluster.
  • It therefore fails valid project-font cases: a variation selector or ZWJ emoji earlier in a text run can prevent a later basic-chinese fallback, and compound emoji do not render as atomic fallback clusters.
  • Upstream linebender/resvg#1087 implements the required cluster-boundary merge, but is open and unreviewed. See the tracking issue's POC status for the detailed reproduction and decision options.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Render project fonts in editor

1 participant