Skip to content

Render project fonts in editor #3366

Description

@nighca

Background

The project-font persistence and default-project foundation is tracked by #3343. Once a project carries font files and fontPreferences, XBuilder's editor must use the same font semantics when it renders SVG costumes, backdrops, and other image assets.

Draft PR #3367 implements the current editor-side integration. Its original data-URI approach was functionally correct but made large-font SVG previews prohibitively slow, so it cannot merge until the rendering strategy is improved.

Goal

Make editor image rendering consume project fonts and font preferences correctly and performantly, so editor preview aligns with project/runtime font semantics.

Scope

  • Provide the current project's font files and ordered fontPreferences to SVG/image rendering consumers.
  • Apply project font semantics to SVG font-family references and project fallback preferences.
  • Embed or otherwise make available only the font resources required to render each image, without modifying the source SVG file.
  • Replace the current large-font data-URI strategy with a performant approach.
  • Verify rendering fidelity for the SVG features used by Builder assets.
  • Add focused rendering, cache, and performance/regression coverage for the chosen solution.

Out of scope

Related

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions