Copy link to clipboard
Copied
Hello there,
I'm modifying a javascript that makes an export of each layer contained in an Illustrator document and I want to specify the method used for anti-aliasing (either Type Optimized or Art Optimized). Similarly to the option under the "Image size" tab in the "Save for the Web" panel.
I didn't find any antiAliasingMethod property in the ExportOptionsPNG24 properties (only an antiAliasing property that accepts boolean). So I wonder if it is actually possible to do it through scripting?
Many thanks,
D
Copy link to clipboard
Copied
I don't see anything in the guide, does it create a big difference visually if you choose either option? I made a couple of test with simple images and text and saw a small variance. If you can tell them apart visually you can try to set either Art or Type manually before you run your script, since it remembers the last value you used, it may get picked up by the script too.
- change to Art manually
- run your script
- change to Type manually
- run your script
- compare results
Copy link to clipboard
Copied
Thanks for your reply CarlosCanto. Your idea was interesting but it didn't work, the anti-aliasing method value hasn't been remembered when I run the script. Also, even if it worked the process would not be ideal.
The difference between the two anti-aliasing method is especially visible and important on type. Art optimized will render a blurry text and Type optimized a sharp one. Here's a comparison I just posted: http://i.eho.st/pp1jbclb.png
So I guess it is not possible to specify this value for the export but your idea made me think of an other possibility.
I always apply those filters on each text object (type and area type), so they all have a "Rasterize" effect that I can turn on and off in the Appearance panel. So before export all my text is optimized to render at 72ppi (with this Rasterize filter), the purpose of the script is to export that same design for retina displays (scale the design by 200%) so I'll need to turn the Rasterize filter off during this process–or my text will be all pixelated.
Would it be possible to:
– Select all type and area type objects – visible and unlocked would be sufficient (I guess I've seen something about this in the scripting reference doc)
– Turn off "Rasterize" effect – I read in a thread here that it was possible to manipulate any menu command of most Adobe CS applications but no reference was linked and I haven't been able to find one.
Thanks again for your help,
D
Copy link to clipboard
Copied
Untried but does does text antialias have any affect on output or is this only for screen render?
Copy link to clipboard
Copied
I'm not sure I understand your question. When refering to text and anti-aliasing in my posts I talk about screen render designs only. I'm trying to set up a script that takes a 72ppi optimized illustrator file (with text anti-aliasing) and makes an export of that design for retina displays scaled by 200% without any anti-aliasing on the text.
Copy link to clipboard
Copied
What Im trying to say is does changing a textFrame's antialiasing do what you need…? May be that export option just makes this change globally?
TextFameItem property…
antialias | TextAntialias: TextAntialias.NONE TextAntialias.SHARP TextAntialias.CRISP TextAntialias.STRONG | r/w | The type of a text anti-aliasing on text frame item. |
Like I said I've not actually used this and tested but you could try it?
Copy link to clipboard
Copied
Ah I see. I've seen this property but thought it would apply only on text boxes (area type) and not single text objects. Do you know if this property applies to text objects globally? I could give it a try.
Copy link to clipboard
Copied
none…
strong…
idiot should have done them on white oh well you get my point?
Copy link to clipboard
Copied
Well I'll need to try sharp and crisp to see how it renders. Not sure it gives the same result as a Rasterize filter with Type Optimized method.
Copy link to clipboard
Copied
another way that comes to my head is,
- manually create 2 graphic styles, one for your rasterized text and one for your normal text
in your script
- apply the normal style to all text frames
- export
- apply the rasterized style back to all text
Copy link to clipboard
Copied
That's interesting!
I never thought of graphic styles as I don't use them on a regular basis. I guess that would totally do the trick. I am going to give it a try.
Copy link to clipboard
Copied
Carlos, where in the UI do you do this… Something I clearly don't use in the app so Im unsure if scriptable at all…
Copy link to clipboard
Copied
where in the UI do you do this…
Hi Mark, what? the graphic styles? just drag a text frame with the raster effect on it, and drop it in the Graphic Styles Palette to save all embellishments, give it meaningful name. Then to use it select a text frame without any styling and click on your the saved graphic style and all embellishments from the other text frame will be applied to it.
Copy link to clipboard
Copied
Carlos… ta graphic styles Im fine with… I couldn't find raster options as live object filter…? You known the one right in the dammed middle looking back at me shouting HELLLLLO… overhere… Swapping graphic styles should do the trick…
Copy link to clipboard
Copied
oh rasterize, I don't use it myself either but I think is this
Copy link to clipboard
Copied
I stuck in the same problem. Solved only through rasterization, did it inside script and have used temporary layers. You can find my solution here: Looking for an illustrator script to export without anti-aliasing - Graphic Design Stack Exchange