[JSX] Creating outlines of text path - different behavior of UI vs script
- May 30, 2022
- 2 replies
- 893 views
Hi all,
I have Ovals with a half circle path on them. I am trying to measure if the text exceeds half of the oval. My solution to that was to convert the path to an outline and measure its position relative to the halfway point of the circle. If I have the Oval selected in InDesign, and click Type >> Create Outlines, it converts the type path to a single Page Item with correct dimensions. Oval itself has no method .createOutlines();
However, I can't seem to mimic this behavior in script. I've tried variations of the following on the Oval object:
oval.textPaths[0].texts[0].createOutlines();
oval.textPaths[0].parentStory.createOutlines();
If I run either of those two commands, each character is outlined separately as anchored objects on the path, and they get condensed as such. Please see attached screenshots for the oval object, and the outcomes from running the outline through InDesign vs. running it on the parent story of the text path via script. Thanks.
PS, if anyone has better ideas about how I might measure whether the text is longer than half way around its path, I'm all ears.


