mirror of
https://github.com/zadam/trilium.git
synced 2026-05-06 10:46:57 +02:00
fix(print): wait for custom fonts to be loaded (closes #8097)
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user