Article View: adobe.scripting.indesign
Article #836Re: [CS3 JS] Question about collecting overridden style settings
From: Peter Kahrel
Date: Thu, 05 Mar 2009 13:13
Date: Thu, 05 Mar 2009 13:13
10 lines
1143 bytes
1143 bytes
You needn't worry too much about the difference in constructors. In many cases you can apply a font using either a string or an object:
myNewCharacterStyle.appliedFont = "Times";
myNewCharacterStyle.appliedFont = app.fonts.item ("Times");
The second one always works, so it's good practice to assign objects rather than strings (that goes for all objects, not just strings). So you should be able to do this:
myNewCharacterStyle.appliedFont = myTextStyleRange.appliedFont
Peter
Technical Details
Message-ID:
<59b81cad.3@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!news2.glorb.com!newshub.sdsu.edu!webcrossingReferences:
<59b81cad.-1@webcrossing.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,ae48fa806cc37e1a X-Google-Attributes: gidf939a,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: "Peter Kahrel" <kahrel@kahrel.plus.com> Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!news2.glorb.com!newshub.sdsu.edu!webcrossing Newsgroups: adobe.scripting.indesign Subject: Re: [CS3 JS] Question about collecting overridden style settings Message-ID: <59b81cad.3@webcrossing.la2eafNXanI> Date: Thu, 5 Mar 2009 05:13:15 -0800 References: <59b81cad.-1@webcrossing.la2eafNXanI> Lines: 13 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit