Skip to content
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.

Commit

Permalink
#58 fixed typo
Browse files Browse the repository at this point in the history
  • Loading branch information
bennobuilder committed Mar 25, 2024
1 parent 2584c61 commit 0dafedf
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,14 @@ async function processNode(node: FrameNode, instance: TPluginHandler): Promise<v
asset: {
font: {
export: { mode: 'Inline' },
resolveFontContent: async (fontMetadata) => {
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;
Expand Down

0 comments on commit 0dafedf

Please sign in to comment.