0
Fork 0
mirror of https://github.com/penpot/penpot-exporter-figma-plugin.git synced 2025-01-07 23:50:05 -05:00
penpot-exporter-figma-plugin/plugin-src/translators/text/font/custom/translateCustomFont.ts

11 lines
390 B
TypeScript
Raw Normal View History

import { getCustomFontId, translateFontVariantId } from '@plugin/translators/text/font/custom';
2024-05-06 01:06:14 -05:00
import { FontId } from '@ui/lib/types/shapes/textShape';
export const translateCustomFont = (fontName: FontName, fontWeight: number): FontId | undefined => {
return {
fontId: `custom-${getCustomFontId(fontName)}`,
fontVariantId: translateFontVariantId(fontName, fontWeight)
};
};