Why does the getStyledTextSegments() function return incorrect end value?


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.

1 Like