figcraft/docs
bflatastic f2802cca02 M7: headless renders use system fonts
Headless runs (`figcraft-cli export`, `render`, `convert`, `run`, and the headless MCP server) never indexed the installed fonts, so a text layer in an installed family (Segoe UI, Inter installed per user, ...) was measured and drawn with a fallback face, while the desktop app used the real one. Auto layout sizes from MCP agents therefore differed from what users see in the app.

- `figcraft_text::scan_system_fonts_on_demand()`: the font database indexes the system fonts the first time it is used (first text layout, font lookup or font listing). `figcraft-cli` turns it on at startup for every subcommand, so a run that touches no text never pays for the scan. The desktop app keeps its background scan.
- `scan_system_fonts()` now runs once per process (a `OnceLock`): racing callers wait for the one directory walk instead of each walking the folders.
- Opt-out for reproducible renders: `--no-system-fonts` on any subcommand, or `FIGCRAFT_NO_SYSTEM_FONTS=1` (honoured by the desktop app too). Text then uses only the built-in fonts, as before.
- The scan is cheaper: it reads each file's headers, table directories and `name` tables instead of whole files (about 460 MB on this Windows machine), and takes file metadata from the directory listing instead of a lookup per file. This also speeds up the desktop app's background scan.
- Browser/wasm build unchanged (the scan is a no-op there).
- Docs: `docs/cli.md` (new Fonts section) and `docs/mcp.md` (Fonts under the backends table); CLI usage text mentions the flag.
2026-10-12 09:32:42 +07:00
..
brand M0.1-M0.3: workspace, licences, geom/color/doc crates 2026-10-09 12:01:57 -04:00
images Docs: README showcase screenshots and example files 2026-10-12 08:57:26 +07:00
architecture.md M8: Windows QA fixes (#131) 2026-10-11 18:20:38 +07:00
auto-layout-parity.md M2: auto layout behaviour suite and fixes (#130) 2026-10-11 17:53:11 +07:00
cli.md M7: headless renders use system fonts 2026-10-12 09:32:42 +07:00
collab-protocol.md M11: plugin directory on figcraft-server 2026-10-12 05:28:53 +07:00
collaboration-parity.md M8: cursor chat and spotlight in live sessions 2026-10-12 03:47:34 +07:00
components-parity.md M1: layers and assets panels behaviour suite and fixes 2026-10-12 03:47:34 +07:00
contributors.md About: Contributors and Models tabs with full credits; bump version to 0.2.0 (from 0.1.0) for release 2026-10-09 21:10:33 -04:00
control-protocol.md M5: prototyping tail: gamepad triggers, widgets in prototypes, mode lookups 2026-10-12 05:28:53 +07:00
dev-mode-parity.md M7: dev resources links 2026-10-12 02:30:25 +07:00
file-format-parity.md M6: experimental .fig export 2026-10-12 07:19:57 +07:00
gaps.md M6: experimental .fig export 2026-10-12 07:19:57 +07:00
hardware-parity.md M8: Windows QA fixes (#131) 2026-10-11 18:20:38 +07:00
localization-parity.md M9: draft catalogs catch up 2026-10-12 07:53:24 +07:00
mcp.md M7: headless renders use system fonts 2026-10-12 09:32:42 +07:00
parity-checklist.md M1: keyboard shortcut parity suite and bindings 2026-10-12 06:49:02 +07:00
plugins.md M11: plugin installs saved at once; directory and library requests off the UI thread 2026-10-12 06:15:00 +07:00
prototyping-parity.md M5: prototyping tail: gamepad triggers, widgets in prototypes, mode lookups 2026-10-12 05:28:53 +07:00
release-playbook.md M0.9: MCP server + figcraft-cli, PDF export, web app, release/CI packaging, vector edit mode, workspace lint cleanup 2026-10-09 13:31:53 -04:00
releasing.md M9: hosting figcraft-server: wss in the desktop app, server releases, deployment guide (#125) 2026-10-11 15:52:27 +07:00
roadmap.md M9: Simplified Chinese draft catalog 2026-10-12 05:57:48 +07:00
server.md M11: plugin installs saved at once; directory and library requests off the UI thread 2026-10-12 06:15:00 +07:00
target-app-parity.md Docs: shortcut counts, draft coverage and the box-selection label after the polish pass 2026-10-12 07:53:24 +07:00
translating.md M9: Simplified Chinese draft catalog 2026-10-12 05:57:48 +07:00
ui-parity.md M1: rotation origin and place-with-Enter shortcuts 2026-10-12 07:53:24 +07:00