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

11 lines
385 B
TypeScript
Raw Normal View History

import { getCustomFontId, translateFontVariantId } from '@plugin/translators/text/custom';
import { FontId } from '@ui/lib/types/text/textContent';
export const translateCustomFont = (fontName: FontName, fontWeight: number): FontId | undefined => {
return {
fontId: `custom-${getCustomFontId(fontName)}`,
fontVariantId: translateFontVariantId(fontName, fontWeight)
};
};