Closed aloisklink closed 2 months ago
Awesome! Please, merge, when you are ready! :)
This doesn't seem to be working for some reason, so I'm closing the PR.
I think maybe we might need to add an await document.fonts.ready
in the Mermaid project instead, but I'm not 100%, since I can't figure out why sometimes the fonts still aren't loading :shrug:
:bookmark_tabs: Summary
Sometimes,
await Promise.all(Array.from(document.fonts, (font) => font.load()))
(added in https://github.com/mermaid-js/mermaid-cli/commit/c179bc1f7ad0066f331217cb2dbea0b8aa9a1d1c) doesn't actually wait for fonts to load.I can't seem to reproduce this on my computer, but it does occasionally happen in GitHub CI (I've seen it happen with Percy).
I'm not exactly sure why this is, (maybe it doesn't include actually applying the fonts?), but just to be safe, I've added some explicit
await document.fonts.read
checks, and even added a warning if Font Awesome is not loaded, and maybe that might help?:straight_ruler: Design Decisions
N/A
:clipboard: Tasks
Make sure you
master
branch