In a script, I am inserting text that is a 4-line poem. Each line except the last ends with a hard return ("\n"). I would like to calculate the length (in inches or some other length unit) of each individual line to find the longest line and adjust the left indent accordingly. Is it possible to get the length of a line of text in a script?
Yes, I used the wrong term. I'm using the soft return character at the end of my poem stanza lines.
The horizontalOffset method of determining line length, based on the starting and ending characters, worked well for me. Thanks for the suggestion!