Quantcast
Channel: Adobe Community : Popular Discussions - Illustrator Scripting
Viewing all articles
Browse latest Browse all 12845

Change font size of a text item in illustrator extendscript and oth attributes

$
0
0

I have a series of text items on a page, some of them are grouped. I would like to go through theses grouped items and set the point size of the type to 8 point. I've don this

 

    for (var i = 0; i < layer.groupItems.length; i++) {

        var group=layer.groupItems[i];

        $.writeln("Group iyem=",group);

        for (var k = 0; k< group.textFrames.length;k++) {

            item=group.textFrames[k];

            $.writeln("Text item ",item.name);

            $.writeln("Text item ",item.size=8);

 

            };

        };

 

...but it doesn't work. If I change the line

   $.writeln("Text item ",item.size=8)

to

   $.writeln("Text item ",item.content)

it returns the text string correctly so I'm pretty confident that I'm accessing the correct item on the page. But I can't access/change the size of the type, or indeed any of the type attributes. What am I doing wrong? Tried to find some reference for this but struggling. Using CS5 by the way

 

Thanks


Viewing all articles
Browse latest Browse all 12845

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>