MCPcopy
hub / github.com/figma/plugin-samples / createText

Function createText

trivia/code.ts:209–215  ·  view source on GitHub ↗
(characters: string, size: number)

Source from the content-addressed store, hash-verified

207}
208
209function createText(characters: string, size: number) {
210 const text = figma.createText()
211 text.fontName = {family: 'Roboto', style: 'Regular'}
212 text.characters = characters
213 text.fontSize = size
214 return text
215}
216
217async function loadFonts() {
218 await figma.loadFontAsync({ family: "Roboto", style: "Regular" })

Callers 1

displaySingleQuestionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected