Skip to content

Implement project-font persistence and defaults in XBuilder #3343

Description

@nighca

Background

Project-level font support has a design task in #3332 and is tracked by #3342.

XBuilder needs the project-data foundation before editor previews can consume project fonts: projects must own font resources, carry fallback preferences, and preserve those resources through normal project file operations. Editor-side image rendering is tracked separately in #3366.

Goal

Implement the project-font persistence, default-project, and compatibility foundation in XBuilder based on the product model defined in #3332.

Scope

  • Add project data structures for font resources and font preferences.
  • Persist, publish, export, and load project font files through existing project file mechanisms.
  • Serialize fontPreferences in project configuration and expose the parsed data through the project model.
  • Configure deployment-specific new-project font preferences and materialize required preset font files.
  • Preserve the existing Chinese rendering behavior when legacy projects are opened and subsequently saved.
  • Assemble the default project from lazily loaded source assets through project-model APIs rather than an .xbp template.
  • Remove Builder-bundled Scratch font files while retaining the generic SVG font-injection utility for the editor follow-up.

Out of scope

  • Editor-side rendering of project fonts in SVG/image previews; tracked by Render project fonts in editor #3366.
  • Final product UI for adding/removing project fonts or changing preferences.
  • Expanding the base SPX runtime by baking in every possible font.
  • Depending on fonts installed on the user's local system for published/exported project behavior.

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