mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-23 01:57:29 +00:00
Handle font loading breaking (#941)
This commit is contained in:
parent
ea65109260
commit
cd409279a4
1 changed files with 6 additions and 1 deletions
|
|
@ -98,7 +98,12 @@ const parsers = {
|
|||
const fontBlob = await font.async("blob");
|
||||
const fontUrl = await Utils.getUrlFromBlob(fontBlob);
|
||||
const fontFamily = `font-${Utils.getId()}-${file.replace(/\./, "_")}`;
|
||||
await Utils.loadFont(fontUrl, fontFamily);
|
||||
try {
|
||||
await Utils.loadFont(fontUrl, fontFamily);
|
||||
} catch {
|
||||
console.warn(`Failed to load font ${fontFamily}`);
|
||||
return new MakiObject(node, parent);
|
||||
}
|
||||
return new MakiObject(node, parent, { fontFamily });
|
||||
},
|
||||
component: (node, parent) => new WindowHolder(node, parent, undefined),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue