fix(print): wait for custom fonts to be loaded (closes #8097)

This commit is contained in:
Elian Doran
2026-04-18 09:28:54 +03:00
parent a617b59765
commit 1674bf0a87

View File

@@ -105,6 +105,9 @@ function SingleNoteRenderer({ note, onReady }: RendererProps) {
// Check custom CSS.
await loadCustomCss(note);
// Wait for all fonts (including those from custom CSS) to finish loading.
await document.fonts.ready;
}
load().then(() => requestAnimationFrame(() => onReady({
@@ -130,6 +133,7 @@ function CollectionRenderer({ note, onReady, onProgressChanged }: RendererProps)
media="print"
onReady={async (data: PrintReport) => {
await loadCustomCss(note);
await document.fonts.ready;
onReady(data);
}}
onProgressChanged={onProgressChanged}