インデザインで、ドキュメントのフォント情報を調べる。
今回は、フォント収集スクリプト作成にあたって、
まず、フォント情報を調べる必要があったので作りました。
インデザインCS5,CS6で動きます。
たぶんCS4でも大丈夫だと思いますが…
【作成方法】
ユーティリティ > AppleScript エディタを起動。
下記のAppleScriptコードを入力して、
スクリプト形式で「ドキュメントのフォント情報一覧.scpt」などの適当な名前で保存。
▼AppleScript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
tell application "Adobe InDesign CS5" if (count document) = 0 then activate display dialog "ドキュメントを開いてください。" & return & return buttons {"OK"} default button 1 giving up after 55 with icon 0 return end if tell document 1 set allFonts to fonts --set ATCFonts to composite fonts --font type > ATC > Adobe Type Composer set myText to "" repeat with i from 1 to count allFonts set FontProperties to properties of font i set myText to myText & (my fontInfo(FontProperties) as Unicode text) & return & return end repeat end tell end tell tell application "TextEdit" make new document set name of front window to "ドキュメントのフォント情報一覧" set text of front document to myText as Unicode text --set size of every word of document 1 to 13 activate end tell on fontInfo(FontProperties) tell application "Adobe InDesign CS5" set infotext to "" & return set infotext to infotext & name of FontProperties & return set infotext to infotext & "----------------------------------------------------------------------------------------------" & return try set infotext to infotext & "allow editable embedding:" & allow editable embedding of FontProperties & return end try try set infotext to infotext & "allow outlines:" & allow outlines of FontProperties & return end try try set infotext to infotext & "allow PDF embedding:" & allow PDF embedding of FontProperties & return end try try set infotext to infotext & "allow printing:" & allow printing of FontProperties & return end try try set infotext to infotext & "font family:" & font family of FontProperties & return end try try set infotext to infotext & "font style name:" & font style name of FontProperties & return end try try set infotext to infotext & "font style name native:" & font style name native of FontProperties & return end try try set infotext to infotext & "font type:" & font type of FontProperties & return end try try set infotext to infotext & "full name:" & full name of FontProperties & return end try try set infotext to infotext & "full name native:" & full name native of FontProperties & return end try try set infotext to infotext & "index:" & index of FontProperties & return end try try set infotext to infotext & "location:" & location of FontProperties & return end try try set infotext to infotext & "name:" & name of FontProperties & return end try --try --set infotext to infotext & "object reference:" & name of (object reference of FontProperties) & return --end try try set infotext to infotext & "ordering:" & ordering of FontProperties & return end try --try --set infotext to infotext & "parent:" & name of parent of FontProperties & return --end try try set infotext to infotext & "platform name:" & platform name of FontProperties & return end try try set infotext to infotext & "PostScript name:" & PostScript name of FontProperties & return end try try set infotext to infotext & "registry:" & registry of FontProperties & return end try try set infotext to infotext & "restricted printing:" & restricted printing of FontProperties & return end try try set infotext to infotext & "status:" & status of FontProperties & return end try try set infotext to infotext & "version:" & version of FontProperties & return end try try set infotext to infotext & "writing script:" & writing script of FontProperties & return end try return infotext end tell end fontInfo |
【置き場】
インデザインのスクリプトパネルに配置。
スクリプトパネルを表示させた状態で、「ユーザー」を右クリック > Finder で表示で、
置き場が表示されます。
【使い方】
インデザインが前面に表示された状態で、
スクリプトパネルから、作成したスクリプトをから実行すると、
下図のように表示されます。
処理に時間がかかるため、表示までに1分位かかるかも知れません。
参考情報
http://indesign.cs5.xyz/iddomjs/Font.html
Indesign Script – Liste mit Schriften im Dokument ausgeben