TextNode.getStyledTextSegments([‘fontName’]) returns incorrect end value. Here, the word is ‘Spline’, which contains 6 characters. So, the end number should be 5, since we are starting from 0.
Everything is correct here. Starting from 0 to 6. Where 0—position before the text characters; 6—position after text characters.
But what if you entered only one character, then the start would be equal to the end, i.e. 0? This is fundamentally wrong.
UX/UI designer. Figma expert. Creator and developer of plugins and widgets for Figma and FigJam. Check out my resources in Figma Community: figma.com/@tank