Skip to main content
Question

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

  • April 14, 2023
  • 1 reply
  • 238 views

aamir.shaikh


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.

This topic has been closed for replies.

tank666

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.


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