index.html now loads /api/fonts/fonts.css, synthesized at request time by goods-editor's mountEditorApi from the host's fonts/ directory (populated via fetch-fonts in goods-editor-module — the host-local fetch script shrinks to a pointer). Shipped synchronously in <head> on purpose: the module's runtime injector races first paint and the editor's text measurement gives wrong answers against fallback metrics until real fonts load. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
29 lines
1.1 KiB
JavaScript
29 lines
1.1 KiB
JavaScript
#!/usr/bin/env node
|
|
/**
|
|
* DEPRECATED — fonts now live with goods-editor-module.
|
|
*
|
|
* The host used to fetch TTFs into its own fonts/ directory and
|
|
* register them at server boot. After the v0.8 module reorg, font
|
|
* ownership moved into goods-editor-module:
|
|
*
|
|
* • The TTF files live under goods-editor-module/fonts/.
|
|
* • Fetch them with `npm run fetch-fonts` inside goods-editor-module.
|
|
* • mountEditorApi (called from the host's server.js) registers them
|
|
* with node-canvas at boot and serves them to the browser via
|
|
* /api/fonts/fonts.css.
|
|
* • The host's index.html loads that stylesheet directly — no more
|
|
* Google Fonts CDN, no more host-side TTFs.
|
|
*
|
|
* This file is kept as a tombstone so anyone who looks for it
|
|
* understands what happened. Safe to `rm scripts/fetch-fonts.mjs`
|
|
* in the next housekeeping commit; nothing references it anymore
|
|
* (package.json's scripts block was already trimmed during the
|
|
* module-split work in May 2026).
|
|
*/
|
|
|
|
console.error(
|
|
'[fetch-fonts] This script has moved to goods-editor-module.\n' +
|
|
' Run: (cd ../goods-editor-module && npm run fetch-fonts)'
|
|
);
|
|
process.exit(1);
|