open-design-sdk
open-design-sdk copied to clipboard
Font warnings displayed even when fonts are found
When running the following, where ./font/
has all the required custom fonts,
sdk.setGlobalFontDirectory('./font/');
// Import a Figma design
const design = await sdk.importFigmaDesign({
figmaToken: FIGMA_TOKEN,
figmaFileKey: FIGMA_FILE_KEY
})
design.setFontDirectory('./font/');
const artboard = design.getArtboards()[2]
// Render the artboard
await artboard.renderToFile(`rendered.png`)
The following warnings are printed to the console, even though the fonts are resolved and rendered correctly in the exported image.
warn | Font not available: MontserratRoman-Bold
warn | Font not available: MontserratRoman-Regular
Presumably, the warning is coming from design-facade.ts
This is of course, not a huge blocker on anything, but it would be nice if these false positives were cleaned up.