Article View: adobe.scripting.indesign
Article #18977Font Book
From: adamcoop
Date: Tue, 11 Feb 2003 04:37
Date: Tue, 11 Feb 2003 04:37
35 lines
2230 bytes
2230 bytes
I'm trying to generate a font book from fonts loaded on my machine.
I have written the following script (based on different examples I've come across in these forums), but still have some limitations. At the moment the script makes a new document and text frame, creates a paragraph for each font, and then formats each paragraph, using the associated font.
set mySize to 9
set sampleText to "Quick Brown Dog Thing"
tell application "InDesign 2.0.2"
set myFontList to get fonts
set the fontCount to the count of myFontList
set myDocument to make document
tell page 1 of myDocument
set myTextFrame to make text frame with properties {geometric bounds:{"20
mm", "12 mm", "285 mm", "198 mm"}, contents:"blah"}
set allText to ""
tell myTextFrame
repeat with i from 1 to fontCount
set thisFont to (the name of item i of myFontList as string)
set allText to allText & return & thisFont & ": " & sampleText
end repeat
set contents to allText
repeat with i from 1 to fontCount
tell paragraph i
set applied font to item i of myFontList
set point size to mySize
end tell
end repeat
end tell
end tell
end tell
This works until it fills up the text frame, and then errors. What I'd like to do is have the script automatically create new pages and flow on as required.
Technical Details
Message-ID:
<1de7cbf2.-1@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebXShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,d09c85b680b6e27a,start X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-02-10 21:08:26 PST From: adamcoop <adam.c@ncprint.com.au> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!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: Font Book Message-ID: <1de7cbf2.-1@WebX.la2eafNXanI> Date: Mon, 10 Feb 2003 20:37:27 -0800 Lines: 38 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit