set numWaitTime to 1.5 as number
tell application "Font Book" to launch
tell application "Finder"
activate
set listLngList to {"Adobe", "Apple", "Bitstream", "Bureau", "DynaLab", "Google", "ITC", "Linotype", "Microsoft", "Monotype", "ParaType", "URW", "Esselte Letraset", "-------", "Morisawa", "Fontworks", "DynaComware", "Iwata", "TypeBank", "スクリーン", "-------", "Apache", "SIL"} as list
set theLangAns to (choose from list listLngList with title "言語選択" with prompt "フォントコレクションを作成するファウンダリを選択してください" default items "日本語" without multiple selections allowed and empty selection allowed) as text
if theLangAns is "-------" then
return
else if theLangAns is "false" then
return
end if
end tell
tell application "Font Book"
activate
set boolFontCollection to exists of font collection theLangAns
if boolFontCollection = false then
try
set objFontCollection to make new font collection
end try
delay numWaitTime
tell objFontCollection
set name to theLangAns
end tell
delay numWaitTime
tell font collection theLangAns
set displayed name to theLangAns
end tell
end if
set listAllTypeFaces to get every typeface as list
repeat with theFont in listAllTypeFaces
set listFontProperties to properties of theFont
set listAdditionalnfo to typeface additional info of listFontProperties
set FBFaceCopyrightName to ""
try
set listFBFaceCopyrightName to FBFaceCopyrightName of listAdditionalnfo
end try
if theLangAns is "Apache" then
try
set listFBFaceCopyrightName to FBFaceLicenseName of listAdditionalnfo
end try
else if theLangAns is "SIL" then
try
set listFBFaceCopyrightName to FBFaceLicenseName of listAdditionalnfo
end try
end if
if listFBFaceCopyrightName contains theLangAns then
add theFont to font collection theLangAns
else if theLangAns contains "ITC" then
if listFBFaceCopyrightName contains "International Typeface Corporation" then
add theFont to font collection theLangAns
end if
end if
end repeat
end tell