Change Illustrator TextFrameItem aspect

41 Views Asked by At

Using ExtendScript for Illustrator, I need to create programmatically AI documents from scratch, with stroked texts.

I created texts with the following code:

textFrame.contents = 'foo'
textFrame.textRange.characterAttributes.textFont = textFont
textFrame.textRange.fillColor = black
textFrame.textRange.stroked = true
textFrame.textRange.strokeColor = white
textFrame.textRange.strokeWeight = 0.75

but I am getting cropped glyphs because stroke is drawed above the text fill.

enter image description here

So I would like to be able to add fill and stroke "aspects" like in Illustrator user interface, then put stroke aspect bellow fill aspect. I didn't find how to manage aspect with ExtendScript Illustrator API. Does anyone know how to do that?

Creating text outline is not an option because I want to keep texts editable. Neigher creating 2 texts one on top of the other for the same reason.

0

There are 0 best solutions below