mirror of
https://github.com/priyanshujain/margin.git
synced 2026-10-02 19:17:03 +00:00
feat(export): surface typst warnings and glyph-coverage notice
Typst compile warnings were discarded. Capture them via the Warned result and emit a pdf-warnings event (only from the export path, not the live preview) that App shows as a non-fatal toast; the export still succeeds. Also scan book text before reporting success and warn when it contains scripts the embedded Latin fonts cannot render (CJK, Arabic, Hebrew, Devanagari, Thai, emoji). Claude-Session: https://claude.ai/code/session_01RzTWrLiy4zGuw2hZSQGamk
This commit is contained in:
1 parent
5c0040955e
commit
9eabef9041
6 files changed
+69
-10
No files matched your search
@@ -23,8 +23,12 @@ function App() {
|
||||
else if (event.payload === "export-epub") runExport("epub");
|
||||
else if (event.payload === "check-updates") checkForUpdates(false);
|
||||
});
|
||||
const unlistenWarn = listen<string>("pdf-warnings", (event) => {
|
||||
useBook.getState().setNotice(`PDF exported with warnings:\n${event.payload}`);
|
||||
});
|
||||
return () => {
|
||||
unlisten.then((stop) => stop());
|
||||
unlistenWarn.then((stop) => stop());
|
||||
};
|
||||
}, []);
|
||||
|
||||
|
||||
Reference in new issue
Block a user