Skip to main content

For example:

$19.99
/month

separate it into two layers where $19.99 is one layer and /month is another

There are existing plugins which have this functionality. Here’s one example:

Figma

Im aware of that. I want know how to do it through the plugin api.


One of the currently available plugins has their source code available on GitHub. Take a look through there to see how they are handling it.

github.com

cool. thank you.


he’s only doing a split(‘\n’)
not handling :

  • the weird L-SEP char that appear if user does shift+ENTER (known issue)
  • natural text wrapping

anyone knows if the Figma API provides any sorts of info about the lines of text generated by the text engine ? i really can’t find anything


@Vincent_Huss hi, do you have any solution now? i have the same issue.


no, i gave up on that feature,

it doesn’t seem like Figma provides any hook for that information 😕

maybe something to consider as a feature request @Figma_Product ?

=> for a text node : providing a list of bounding box for each lines


There was another thread on something similar from earlier this year: Methods and/or Properties for Getting Dimensions of Lines of Text within Text Node?