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);
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:
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.
Copy link to clipboard
Copied
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.
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.
Copy link to clipboard
Copied
Hi, here are before an after screenshots of what happens to an ai file.
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);
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Distorsion d'enveloppe
Copy link to clipboard
Copied
Sorry for the delayed reply, but this did the trick. Thank you!
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