FYI for anyone else looking I got this working with this:
const fetchFont = async (fontName: string) => { try { const promise = new Promise((resolve, reject) => { WebFont.load({ google: { families: [fontName] }, active: () => resolve("true"), inactive: () => reject("404"), }) }) await promise ..... } catch (err) { console.log("HAS ERR", err) ..... } }
Activity
mikejdegroot commentedon Apr 3, 2023
FYI for anyone else looking I got this working with this: