You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The engine keys all type off font style ids (draw / sans / serif / mono), but the id-to-stack mapping (FONTS in palette.js) is hardcoded. A host that wants brand fonts (a custom sans, a corporate serif) has no supported path: the stacks feeding measurement, canvas drawing, the editing textarea and any UI all read the same constant.
Proposal
A tiny registry API on the existing ids, no default behavior change:
import{setFontStacks,resetFontStacks,fontStackOf}from'@quickdrawjs/core'// once at startupsetFontStacks({sans: "'Inter', system-ui, sans-serif",mono: "'JetBrains Mono', ui-monospace, monospace",})
setFontStacks(partial) remaps ids (or registers brand-new ids — any font prop value resolves).
fontStackOf(id) is the single resolution point used by measurement, drawing and the editor; unknown ids fall back to draw.
resetFontStacks() restores bundled defaults.
Process-global by design (same model as a rendering backend): configure once at startup.
New ids also typecheck (FontId widens to accept custom strings while keeping autocomplete for the built-ins). Nothing renders differently unless the host opts in.
Activity