당신은 할 수 있어야한다 :
var text = group.newText({text: "Hello World"})
text._object.setFont(NSFont.fontWithName_size("OpenSans-Bold", 15))
글꼴 이름은 글꼴 파일 이름입니다 :
var text = group.newText({font: NSFont.fontWithName_size("OpenSans-Bold", 15), text:"Hello World"})
을하지만 API의 버그가는 해결하는 것입니다 연장하지 않고. ~/Library/Fonts에서 찾을 수 있습니다. 당신은 텍스트 레이어에 설정할 수 있습니다
다른 특성은 here을 나열하고 여기에 docs에서 예입니다됩니다
var text = group.newText({fixedWidth: true, alignment: NSTextAlignmentCenter, systemFontSize: 24, text:"Hello World"})
text.frame = new sketch.Rectangle(0, 160, 200, 30) // adjust the frame last, after the font/size/alignment etc has been set up