らんだむな記憶

blogというものを体験してみようか!的なー

スマートコンポーネントをAPIで操作したい

例えば以下のような感じか。

def makeSmartComponent():
	pos = NSMakePoint(-200, 100)
	comp = GSComponent(Glyphs.font.glyphs["_part.ki"], pos)
	comp.smartComponentValues["width"] = 1
	comp.smartComponentValues["height"] = 50
	return comp

layer = Glyphs.font.selectedLayers[0]
comp = makeSmartComponent()
layer.components.append(comp)