Re: Font Testing - TOO slow.( Efficiency experts needed)
Re: Font Testing - TOO slow.( Efficiency experts needed)
- Subject: Re: Font Testing - TOO slow.( Efficiency experts needed)
- From: Xandra Lee <email@hidden>
- Date: Thu, 4 Jan 2001 10:15:47 -0500
WHOOPS...I just realised how ASTOUNDINGlY stupid my posted script was
(I'd unecessarily nested all sorts of stuff within a repeat--DUH)
Clicking "Send" seemed to have jogged my addled brain.
Anyway, here's a much improved version, in case anyone can use it (or
improve on it).
NOTE: I've yet to deal with the fact that checking for AGaramondBold,
will pass test if AGaramond is in the list) etc
----------------------------------
--The following routine tests to see if desired fonts are active:
--REQUIRED: Quark xPress - OR - GTQ Scripting Library's "List Fonts" OSAX
property fontList : {"Symbol", "Susan"}
set missingFonts to (my checkFonts(fontList)) -->List of missing fonts
if missingFonts is not {} then
---do whatever here
end if
on checkFonts(fontList) --> list of Missing Font Names
-- **Get list of active Fonts:
try
set xList to list fonts -- Requires GTQ's "List Fonts" OSAX
on error --if no "List Fonts" use QXP
(* following can be commented out if you don't have Quark *)
tell application "QuarkXPress"
set x to font list
end tell
set xCount to count of items of x
set xList to {}
repeat with i from 1 to xCount
copy name of item i of x to beginning of xList
end repeat
end try
-- **Compare desired fonts with active ones:
set fCount to count of items of fontList
set missingFonts to {}
repeat with N from 1 to fCount
set aFont to (item N in fontList)
if aFont is not in xList then --(not completely acurate?)
copy aFont to end of missingFonts
end if
end repeat
--end try
return missingFonts
end checkFonts
Alixandra Leigh
AceDesign
email@hidden
------------------------------------------
Furniture:
><
http://home.rochester.rr.com/alexleighs/furniture/furniture.htm>
Renderings:
><
http://home.rochester.rr.com/alexleighs/interiors/interiors.htm>