repair font-family module

This commit is contained in:
Julie Blanc 2026-03-05 16:32:19 +01:00
parent cb9fd93e51
commit ace75a3fb2

View file

@ -138,14 +138,10 @@ export function usePreviewRenderer({
}
);
// Watch for font-face CSS changes (new font loaded) and re-render
watch(
() => stylesheetStore.fontFaceCss,
() => {
if (!initialized.value) return;
renderPreview();
}
);
// Note: no separate watcher on fontFaceCss — the content watcher handles re-render.
// fontFaceCss is read from the store at render time in the srcdoc template.
// loadFont() is awaited before updateStyle() in callers, so fontFaceCss is always
// up to date when the content watcher fires.
// Re-render when narrative data changes
watch(