can you reason about how to get text styles in figma. im developing a figma plugin. my ai agent is struggeling with this: Here is a summary of the current situation and my plan:
The Problem:
The get_text_style
command is not currently extracting text style properties from Figma text nodes. While the command successfully identifies text nodes, the textStyle
object returned is empty.
What's Not Working:
The core issue lies in how the _getSingleTextStyle
function (located in src/server/commands/figma/style/text/TextStyleGet.ts
) attempts to access the text style properties. The properties like fontName
, fontSize
, etc., are not directly available on the main node object (nodeInfo.document
) that is retrieved from Figma. Instead, they are nested within a style
sub-object of that node (i.e., nodeInfo.document.style
). My current code was incorrectly looking for these proper