Fix PDF export font embedding and improve sync reliability
- Replace data URL loading with temporary HTML file to avoid URL length limits - Embed font files as data URLs in print document CSS for offline rendering - Add font asset registry for Merriweather, Crimson Pro, Roboto Serif, and Average - Implement font file caching and blob-to-data-URL conversion - Clean up temporary HTML file after PDF generation - Fix sync to refresh notes after favorite status sync completes
This commit is contained in:
@@ -11,6 +11,7 @@ import {
|
||||
} from '../services/desktop';
|
||||
import {
|
||||
getNoteTitleFromContent,
|
||||
loadPrintFontFaceCss,
|
||||
PrintExportPayload,
|
||||
sanitizeFileName,
|
||||
} from '../printExport';
|
||||
@@ -268,6 +269,7 @@ export function NoteEditor({ note, onUpdateNote, onToggleFavorite, onUnsavedChan
|
||||
html: noteHtml,
|
||||
previewFont,
|
||||
previewFontSize,
|
||||
previewFontFaceCss: await loadPrintFontFaceCss(previewFont),
|
||||
};
|
||||
|
||||
await exportPdfDocument({
|
||||
|
||||
Reference in New Issue
Block a user