• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
1

Rotating warped text via script

Community Expert ,
Oct 06, 2020 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. 

TOPICS
Scripting

Views

668

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
community guidelines

correct answers 1 Correct answer

Advocate , Oct 07, 2020 Oct 07, 2020

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);

 

 

 
 
 

 

 

Votes

Translate

Translate
Adobe
Community Expert ,
Oct 06, 2020 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.

Votes

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
community guidelines
Advocate ,
Oct 07, 2020 Oct 07, 2020

Copy link to clipboard

Copied

 

 

 

Votes

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
community guidelines
Advocate ,
Oct 07, 2020 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.  

 

 

Votes

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
community guidelines
Community Expert ,
Oct 07, 2020 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

Votes

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
community guidelines
Advocate ,
Oct 07, 2020 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);

 

 

 
 
 

 

 

Votes

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
community guidelines
Advocate ,
Oct 07, 2020 Oct 07, 2020

Copy link to clipboard

Copied

Capture.PNG

Votes

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
community guidelines
Advocate ,
Oct 07, 2020 Oct 07, 2020

Copy link to clipboard

Copied

Capture.PNG

Distorsion d'enveloppe

 

Votes

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
community guidelines
Community Expert ,
Oct 12, 2020 Oct 12, 2020

Copy link to clipboard

Copied

LATEST

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

Votes

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
community guidelines
Valorous Hero ,
Oct 07, 2020 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

Votes

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
community guidelines