• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Font Testing - TOO slow.( Efficiency experts needed)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Font Testing - TOO slow.( Efficiency experts needed)


  • Subject: Font Testing - TOO slow.( Efficiency experts needed)
  • From: Xandra Lee <email@hidden>
  • Date: Thu, 4 Jan 2001 07:57:03 -0500

--The following routine tests that specific fonts are installed
before continuing a script. It works fine but... it's VERY slow if user
has many fonts installed & fonts are not found.

Additional QuerY: is there any way to get QXP to return just the font
names rather font records (as below?) (I have an OSAX that will do this
but prefer to use QXP for usabiltiy by others)

------Script begins here -----------
property fontList : {"John", "Susan"}--non existent for testing reasons
--Halt script if neither font is found
set fontsCheck to my checkFonts(fontList)


on checkFonts(fontList)
tell application "QuarkXPress"
set x to font list
end tell

set xList to {}
set font1 to (item 1 of fontList)
set font2 to (item 2 of fontList)

--get repeat to halt when it meets criteria Or list is exhausted
-- (whichever comes first)
set xCount to count of items of x

--clear variables:
set isDone to false
set counter to 0
set f1check to 0
set f2check to 0

repeat until isDone is true
set counter to counter + 1
copy name of item counter of x to beginning of xList
if font1 is in xList then
set f1check to 1
end if
if font2 is in xList then
set f2check to 1
end if
set fontsCheck to (f1check + f2check)
if fontsCheck = 2 then
set isDone to true
beep 1
end if
if counter = xCount then
set isDone to true
end if
end repeat

if fontsCheck is 0 then
display dialog "This script uses " & font1 & " & " & font2 & "." &
return & ,
"Either install the fonts, or change the script." buttons {"Cancel"}
default button "Cancel" with icon caution
beep
end if
---other stuff here
return fontsCheck
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>


  • Follow-Ups:
    • Re: Font Testing - TOO slow.( Efficiency experts needed)
      • From: Hans Haesler <email@hidden>
  • Prev by Date: Re: Newie To AppleScripts, would like someone to look over a script
  • Next by Date: Re: Font Testing - TOO slow.( Efficiency experts needed)
  • Previous by thread: Akua spawn examples?
  • Next by thread: Re: Font Testing - TOO slow.( Efficiency experts needed)
  • Index(es):
    • Date
    • Thread