Article View: adobe.scripting.indesign
Article #17292Re: (AS) OT fractions feature?
From: Olav Kvern
Date: Mon, 23 Jun 2003 22:22
Date: Mon, 23 Jun 2003 22:22
27 lines
1635 bytes
1635 bytes
Eric--
Try something like the approach shown in the following example:
tell application "InDesign 2.0.2"
set change preferences to nothing
set find preferences to nothing
--Enter the font name. Insert a tab character between the family name
--("Minion Pro" in this example) and the font style name ("Regular" in this example).
set myOTFont to font "Minion Pro Regular"
set myDocument to make document
tell page 1 of myDocument
set myTextFrame to make text frame with properties {geometric bounds:{"6p", "6p", "24p", "24p"}, contents:"It would take 1/2 of the time and 1/4 of the effort."}
set applied font of parent story of myTextFrame to myOTFont
search myTextFrame for "1/2" with change attributes {otf fraction:true, font:myOTFont}
search myTextFrame for "1/4" with change attributes {otf fraction:true, font:myOTFont}
end tell
end tell
Thanks,
Ole
Technical Details
Message-ID:
<1de9a683.3@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebXReferences:
<1de9a683.-1@WebX.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,f332520123d2c8c6 X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-06-23 15:37:43 PST From: "Olav Kvern" <okvern@adobe.com> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: Re: (AS) OT fractions feature? Message-ID: <1de9a683.3@WebX.la2eafNXanI> Date: Mon, 23 Jun 2003 15:22:46 -0700 References: <1de9a683.-1@WebX.la2eafNXanI> Lines: 28 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit