I’m developing a plugin that includes functionality to create a text node with content. I’m trying to set the text node’s vertical alignment to ‘cap height to baseline,’ but I’m having trouble achieving this.
text.textCase = "TITLE";
text.textAlignVertical = "TOP";
text.textAutoResize = "WIDTH_AND_HEIGHT";
text.textLineHeight = "CAP_HEIGHT";
The other ones work fine – but not the Vertical Trim. Thoughts?
tank666
September 30, 2024, 4:37am
2
adamtoreilly:
text.textLineHeight
Where did you get this property? It doesn’t exist in the Plugin API, and you should have seen an error in the console.
Instead of accessing a non-existent property, access the leadingTrim
.
Please read the developer documentation:
The text node represents text where both the whole node or individual character ranges can have properties such as color (fills), font size, font name, etc.