Applescript that shows ALL fonts??

profx

ill never 4get watsisname
I have quite a few non standard font on my machine and i want a way to do a sample list that includes ALL the fonts on the system.

The Applescript font sampler that comes with the OS only does factory standard ones. Does any one know of an app that can list all the fonts or can anyone modify the font sampler script so that it gets all of the fonts??


Thanks
 
Open up any Cocoa font panel. And you can sample there. For example...

open Mail and go to compose. Click Font and go to the drop box and select SHOW PREVIEW. there you are. View any font on the system.

Have fun :)
 
what i mean is to be able to print off a sample text document with an example of every font on the system

for example load up
"/Library/Scripts/Info Scripts/Font Sampler.scpt"

and execute that, it does exactly what i want but only does system standard fonts!

if you look at the beginning of this file it lists all the fonts it is going to sample. I want a way of dynamically getting all the fonts on the system. Its probably only 1 or 2 lines af code but i dont know how to do it. If someone does please tell me!!
 
Oh ok. Try this. Open that script up. Remove his code from the top...

set the font_list to {"American Typewriter", "American Typewriter Light", "American Typewriter Bold", "American Typewriter Condensed", "American Typewriter Condensed Light", "American Typewriter Condensed Bold", "Arial", "Arial Italic", "Arial Bold", "Arial Bold Italic", "Arial Black", "Arial Narrow", "Arial Narrow Italic", "Arial Narrow Bold", "Arial Narrow Bold Italic", "Arial Rounded MT Bold", "Baskerville", "Baskerville Italic", "Baskerville SemiBold", "Baskerville Bold", "Baskerville SemiBold Italic", "Baskerville Bold Italic", "Big Caslon Medium", "Brush Script MT Italic", "Comic Sans MS", "Comic Sans MS Bold", "Copperplate", "Copperplate Light", "Copperplate Bold", "Courier New", "Courier New Italic", "Courier New Bold", "Courier New Bold Italic", "Didot", "Didot Italic", "Didot Bold", "Futura Medium", "Futura Medium Italic", "Futura Condensed Medium", "Futura Condensed ExtraBold", "Geneva", "Georgia", "Georgia Italic", "Georgia Bold", "Georgia Bold Italic", "Gill Sans", "Gill Sans Italic", "Gill Sans Light", "Gill Sans Light Italic", "Gill Sans Bold", "Gill Sans Bold Italic", "Herculanum", "Lucida Grande", "Lucida Grande Bold", "Marker Felt Thin", "Marker Felt Wide", "Optima Regular", "Optima Italic", "Optima Bold", "Optima Bold Italic", "Optima ExtraBlack", "Papyrus", "Trebuchet MS", "Trebuchet MS Italic", "Trebuchet MS Bold", "Trebuchet MS Bold Italic", "Verdana", "Verdana Italic", "Verdana Bold", "Verdana Bold Italic", "Zapfino"}

and add this in its place...

set font_list to the list folder (path to fonts from local domain) without invisibles

That should load every font from your /Library/Fonts folder and list them dynamically.
 
cheers, close, very close

but this is what is returned from
Code:
set font_list to the list folder (path to fonts from local domain) without invisibles

Code:
{".default.fcache", "AmericanTypewriter.dfont", "Arial", "Arial Black", "Arial 
Narrow", "Arial Rounded Bold", "Baskerville.dfont", "Beijing.dfont", 
"BigCaslon.dfont", "Brush Script", "Cochin.dfont", "Comic Sans MS", 
"Copperplate.dfont", "Courier New", "Didot.dfont", "Futura.dfont", "Georgia", 
"GillSans.dfont", "HelveticaNeue.dfont", "Herculanum.dfont", "MarkerFelt.dfont", 
"Optima.dfont", "Papyrus.dfont", "Taipei.dfont", "Times New Roman", "Trebuchet 
MS", "Verdana", "Webdings", "Zapfino.dfont"}


This is so nearly what i want, it still lists the files beginning with a period and it dosent think it likes the file extentions.


also i have folders (groups of fonts) in my font folder is there anyway to recursively list contents of folders?

this is getting quie complicated now!

I might be better off makeing a unix script that stores the names of all the fonts, then remove all the extentions, and load the the text file into the script (manually if necessary!)
 
Actually I got the same thing happen as well, not sure why the invisible file loaded there. It might be easier to have a shell script create the file then have the Applescript read from that file to add to this script. I was messing around trying to get this one to work it'll take a little while there. I tried. LOL Keep your progress posted if you can. I might tinker around with it more tomorrow.
 
Back
Top