0
Fork 0
mirror of https://github.com/penpot/penpot-exporter-figma-plugin.git synced 2025-01-06 23:00:55 -05:00
penpot-exporter-figma-plugin/plugin-src/translators/text/font/translateFontId.ts

14 lines
460 B
TypeScript
Raw Normal View History

2024-05-06 01:06:14 -05:00
import { FontId } from '@ui/lib/types/shapes/textShape';
import { translateCustomFont } from './custom';
import { translateGoogleFont } from './gfonts';
import { translateLocalFont } from './local';
export const translateFontId = (fontName: FontName, fontWeight: number): FontId | undefined => {
return (
translateGoogleFont(fontName, fontWeight) ??
translateLocalFont(fontName, fontWeight) ??
translateCustomFont(fontName, fontWeight)
);
};