Highlighted

Rotating warped text via script

Adobe Community Professional ,
Oct 06, 2020

Copy link to clipboard

Copied

Hello, I'm writing a batch processing script to rotate svg and ai files. If the raw file contains a warped text frame, then the warp does not transform properly when rotated. I have combed through the DOM for warp options, looking at character attributes, etc. Does anyone have an idea on where to look, or if it's even possible? Some other way to identify if a frame is warped? I've tried converting the text to outlines but that does not help. 

 

Thanks. 

Hi!

Suivre les conseils de William ou utilise "Distortion d'enveloppe"

Pour un effet:

 

 

obj = selection[0];
app.executeMenuCommand('expandStyle');
app.activeDocument.groupItems[0].rotate(90);

 

 

avec "Distortion d'enveloppe"

 

 

obj = selection[0];
obj.rotate(90);

 

 

 
 
 

 

 

TOPICS
Scripting

Views

118

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Rotating warped text via script

Adobe Community Professional ,
Oct 06, 2020

Copy link to clipboard

Copied

Hello, I'm writing a batch processing script to rotate svg and ai files. If the raw file contains a warped text frame, then the warp does not transform properly when rotated. I have combed through the DOM for warp options, looking at character attributes, etc. Does anyone have an idea on where to look, or if it's even possible? Some other way to identify if a frame is warped? I've tried converting the text to outlines but that does not help. 

 

Thanks. 

Hi!

Suivre les conseils de William ou utilise "Distortion d'enveloppe"

Pour un effet:

 

 

obj = selection[0];
app.executeMenuCommand('expandStyle');
app.activeDocument.groupItems[0].rotate(90);

 

 

avec "Distortion d'enveloppe"

 

 

obj = selection[0];
obj.rotate(90);

 

 

 
 
 

 

 

TOPICS
Scripting

Views

119

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Oct 06, 2020 1
Adobe Community Professional ,
Oct 06, 2020

Copy link to clipboard

Copied

What parameters are you passing to the rotate() function? just the angle of rotation?

 

consult this documentation and see if changing any of the other parameters does what you want:

https://illustrator-scripting-guide.readthedocs.io/jsobjref/TextFrameItem/?highlight=rotate#rotate-a...

 

 

edit* forgot to mention, just creating outlines doesn't actually do anything to the effects that are applied. You'll need either "Expand" or "Expand Appearance" or possibly both of those. that will break everything down into simple vector paths. perhaps that'll work for ya.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 06, 2020 2
Enthusiast ,
Oct 07, 2020

Copy link to clipboard

Copied

 

 

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 07, 2020 0
Enthusiast ,
Oct 07, 2020

Copy link to clipboard

Copied

Bonjour,

Il faudrait plus de précisions sur le genre de distorsion.

Je donne un exemple Distorsion d'enveloppe qui fonctionne pour Ai.

renél80416020_0-1602074382276.png

obj = selection[0];
obj.rotate(20);

Pour l'enregistrement en SVG, le texte ayant subi une distorsion est vectorisé, pour le texte d'origine le cadre disparaît.  

 

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 07, 2020 1
Adobe Community Professional ,
Oct 07, 2020

Copy link to clipboard

Copied

Hi, here are before an after screenshots of what happens to an ai file. 

Screen Shot 2020-10-07 at 7.52.38 AM.png

Screen Shot 2020-10-07 at 7.52.20 AM.png

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 07, 2020 0
Enthusiast ,
Oct 07, 2020

Copy link to clipboard

Copied

Hi!

Suivre les conseils de William ou utilise "Distortion d'enveloppe"

Pour un effet:

 

 

obj = selection[0];
app.executeMenuCommand('expandStyle');
app.activeDocument.groupItems[0].rotate(90);

 

 

avec "Distortion d'enveloppe"

 

 

obj = selection[0];
obj.rotate(90);

 

 

 
 
 

 

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 07, 2020 0
Enthusiast ,
Oct 07, 2020

Copy link to clipboard

Copied

Capture.PNG

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 07, 2020 0
Enthusiast ,
Oct 07, 2020

Copy link to clipboard

Copied

Capture.PNG

Distorsion d'enveloppe

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 07, 2020 0
Adobe Community Professional ,
Oct 12, 2020

Copy link to clipboard

Copied

Sorry for the delayed reply, but this did the trick. Thank you! 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 12, 2020 1
Adobe Community Professional ,
Oct 07, 2020

Copy link to clipboard

Copied

If this fits your scenario, you can try to use a live effect syntax to put a transform effect on your art. The only parameter you'd want to change is the rotation angle. However, due to the limitations of Illustrator and scripting the appearance panel this way, you'd have to employ other auxiliary techniques such as graphic styles or recorded actions. The extra stuff may be necessary if you want to reset your art back to not having this effect. I think one simple way to isolate this kind of effect from your artistry ones is to make sure your art is grouped and wrapped in a group which only has this effect.
https://community.adobe.com/t5/illustrator/pageitem-applyeffect-liveeffectxml/m-p/7315221?page=1

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 07, 2020 0
Resources