Skip to main content
Solved

Access text position style - subscript / superscript


Zhihao_Cui1

Text has “Position” (under “Details” Type settings) in UI where we can set subscript / superscript, is it possible to access this information via API?

Best answer by Ian_Barrow

hi,
As of what appears to be August 24, you can now read openTypeFeatures from a text node.
this does contain info in an object of the selected range regarding it’s superscrit status
“SUPS”
At present, from what I see this isn’t currently an element you can set in the API.

Ian

View original

4 replies

Ian_Barrow
  • 4 replies
  • Answer
  • August 28, 2023

hi,
As of what appears to be August 24, you can now read openTypeFeatures from a text node.
this does contain info in an object of the selected range regarding it’s superscrit status
“SUPS”
At present, from what I see this isn’t currently an element you can set in the API.

Ian


Ian_Barrow

Hi Zhihao,
this can now be seen in the getRangeOpenTypeFeatures.
presently sadly it can’t be set as far as I can tell.


@Ian_Barrow hello! Is there any plans on adding support to setRangeOpenTypeFeatures?


Ian_Barrow

@Dmytro_Chernov I think you’d need to ask someone at Figma that question.
I am hoping that they do, but not sure if it’s on their radar.
If they do, then i will be implementing it in my plugin.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings