repair font-family module
This commit is contained in:
parent
cb9fd93e51
commit
ace75a3fb2
1 changed files with 4 additions and 8 deletions
|
|
@ -138,14 +138,10 @@ export function usePreviewRenderer({
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
// Watch for font-face CSS changes (new font loaded) and re-render
|
// Note: no separate watcher on fontFaceCss — the content watcher handles re-render.
|
||||||
watch(
|
// fontFaceCss is read from the store at render time in the srcdoc template.
|
||||||
() => stylesheetStore.fontFaceCss,
|
// loadFont() is awaited before updateStyle() in callers, so fontFaceCss is always
|
||||||
() => {
|
// up to date when the content watcher fires.
|
||||||
if (!initialized.value) return;
|
|
||||||
renderPreview();
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
// Re-render when narrative data changes
|
// Re-render when narrative data changes
|
||||||
watch(
|
watch(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue