mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
fix: fonts not rendered on init if loadingdone
not fired (#5923)
* fix: fonts not rendered on init if `loadingdone` not fired * remove unnecessary check
This commit is contained in:
parent
52c96a6870
commit
1f117995d9
3 changed files with 113 additions and 23 deletions
2
src/global.d.ts
vendored
2
src/global.d.ts
vendored
|
@ -2,6 +2,8 @@
|
|||
interface Document {
|
||||
fonts?: {
|
||||
ready?: Promise<void>;
|
||||
check?: (font: string, text?: string) => boolean;
|
||||
load?: (font: string, text?: string) => Promise<FontFace[]>;
|
||||
addEventListener?(
|
||||
type: "loading" | "loadingdone" | "loadingerror",
|
||||
listener: (this: Document, ev: Event) => any,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue