Copy link to clipboard
Copied
Can a script flip text on a path?
With menus it would be Type > Type on a Path > Type on a Path Options > Flip How to create type on a path in Illustrator​
The closest I can see a script getting to it is using app.executeMenuCommand('textpathtypeOptions') but with thousands of text to flip on circles I'm looking for something more automatic.
A script to put text on a path is easy enough thanks to Muppet Mark: https://forums.adobe.com/thread/983212, but what should the last line to flip it be?
#target illustrator
var doc = app.activeDocument;
doc.defaultFilled = false, doc.defaultStroked = true;
var textPath = doc.pathItems.ellipse( 0, 0, doc.width /2 , doc.height /2 );
textPath.pathPoints[3].selected = PathPointSelection.ANCHORPOINT;
app.cut();
doc.selection = null;
app.redraw();
var tp = doc.textFrames.pathText( doc.pathItems[0], 0, 0, TextOrientation.HORIZONTAL );
tp.textRange.characterAttributes.size = 20;
tp.contents = 'Please flip me';
tp.textRange.paragraphAttributes.justification = Justification.CENTER;
// tp.flip // what should this line be??
Thanks!
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Try this:
// your code
// tp.flip // what should this line be??
var myMatrix = getScaleMatrix(-100,100);
tp.transform(myMatrix);
Have fun
😉