From 0dafedfacdf5bf5c99f66b66bb4f400a87862825 Mon Sep 17 00:00:00 2001 From: BennoDev <57860196+bennoinbeta@users.noreply.github.com> Date: Mon, 25 Mar 2024 10:20:29 +0100 Subject: [PATCH] #58 fixed typo --- .../src/plugin/events/intermediate-format-export.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/apps/figma-plugin/src/plugin/events/intermediate-format-export.ts b/apps/figma-plugin/src/plugin/events/intermediate-format-export.ts index 26d6be93..4a7fe928 100644 --- a/apps/figma-plugin/src/plugin/events/intermediate-format-export.ts +++ b/apps/figma-plugin/src/plugin/events/intermediate-format-export.ts @@ -37,11 +37,14 @@ async function processNode(node: FrameNode, instance: TPluginHandler): Promise { - const urlResponse = await googleClient.getFontFileUrl(fontMetadata.family, { - fontWeight: fontMetadata.weight, - fontStyle: fontMetadata.style === 'Italic' ? 'italic' : 'regular' - }); + resolveFontContent: async (fontInfo) => { + const urlResponse = await googleClient.getFontFileUrl( + typeof fontInfo.family === 'string' ? fontInfo.family : fontInfo.family.Named, + { + fontWeight: fontInfo.variant.weight, + fontStyle: fontInfo.variant.style === 'Italic' ? 'italic' : 'regular' + } + ); const url = urlResponse.unwrap(); if (url == null) { return null;