We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/caelinsutch/agent-to-figma-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
fonts.ts•673 B
/**
* Map common font weights to Figma font styles
*/
export function getFontStyle(weight: number): string {
switch (weight) {
case 100:
return "Thin";
case 200:
return "Extra Light";
case 300:
return "Light";
case 400:
return "Regular";
case 500:
return "Medium";
case 600:
return "Semi Bold";
case 700:
return "Bold";
case 800:
return "Extra Bold";
case 900:
return "Black";
default:
return "Regular";
}
}
/**
* Load Inter font with specified weight
*/
export async function loadInterFont(weight: number = 400): Promise<void> {
await figma.loadFontAsync({
family: "Inter",
style: getFontStyle(weight),
});
}