Generate Samples Of Your Mac’s Fonts [OS X Tips]

Generate Samples Of Your Mac’s Fonts [OS X Tips]

Gotta alotta fonts installed on your Mac, but never know which you’d like to actually use in a document? Most apps show font previews on the formatting menu, but with Microsoft Word and some other apps many people turn off this feature because it massively increases start-up times. The solution is to create (and print off, if you wish) a font sample document that you can refer to whenever you want. This is very easily done on your Mac, as follows.

Here’s another tip from Mac Kung Fu, which contains over 300 tips, tricks, hints and hacks for OS X. It’s available from Amazon as well as other bookstores, and also as an eBook for all eReaders.

If you’ve got a lot of fonts installed on the system, you may find it helpful to create a sample document displaying them all. Lots of professional designers rely on binders full of such printed examples.

An AppleScript will do the job. Start by opening the Font Book application, which is the Mac font manager (Finder->Applications->Font Book). Highlight any or all the fonts you want to include in the sample document. Then open Finder, hit Shift + Command + G , and type /Library/Scripts/Font Book. Then double-click Create Font Sample.scpt. This will open the script in AppleScript Editor, but don’t worry; all you need do is click the green Run button on the program’s toolbar. This will open a TextEdit document, and, slowly but surely, it will be filled with samples of each font you selected earlier. Once it’s finished, quit AppleScript Editor and then save and/or print the new TextEdit document as required.

UPDATE: With the help of Cult of Mac reader Deborah’s comment below, I’ve updated the script so that it pops-up a dialog box asking for a sentence or paragraph which it will then use to create the font sample document. The new script can be downloaded here and can be used in exactly the same way as described above–download it, open Font Book, double-click the new script, then click the Run button in AppleScript Editor.

Related
  • Al

    This is great — exactly what I needed — thanks!

  • prof_peabody

    Why wouldn’t you just open it in Font Book (the built in application that has this exact functionality)?  

    Printing it all out is such a waste of time and paper.  

  • Brennan Hickey

    Great tip! Any way to tell the script what you want the sample text to be?  I much rather have a sentence sampled in that font then just the name of the font..

  • KeirThomas

    Sorry you’re too busy for this kind of thing. Maybe get one of your staff to do it for you?

  • breck

    Perhaps there is no need to waste paper. After the TextEdit document is created, use the Print dialog to save a PDF for easy future reference.

  • KeirThomas

    I’m not an AppleScript expert but I’m sure one will be along in a minute… I know several read CoM. 

  • Daniel Harris

    Cool tip :-)

  • Deborah Oakley

    Yes, having a custom text would be great.
    This is a great script…there’s so much “hidden” stuff on a Mac it’s amazing. Wish that these things weren’t so obscure…

    Okay, figured it out…fairly easy, actually.

    On the 9th line from the top (not including blanks), add the following (or any string you want between the quotes):

    set TextString to “The quick grey fox jumps over the lazy brown dog. 1234567890-=!@#$%^&*()_+”

    On the 15th line from the bottom (again, not including blank lines), replace “set characters to tab & psName & return & return” with “set characters to tab & TextString & return & return”

    If you want to see the actual font name too (bold, italics, whatever), leave the “psName” tag in before the new “TextString” tag, and add a couple of spaces at the start of the text string line to separate it from the name.

    That’s it! Works like a charm. :o)

  • Deborah Oakley

    Okay, figured it out…fairly easy, actually.

    On the 9th line from the top (not including blanks), add the following (or any string you want between the quotes):

    set TextString to “The quick grey fox jumps over the lazy brown dog. 1234567890-=!@#$%^&*()_+”

    On the 15th line from the bottom (again, not including blank lines), replace “set characters to tab & psName & return & return” with “set characters to tab & TextString & return & return”

    That’s it! Works like a charm. :o)

  • KeirThomas

    (Ignore this comment — Disqus has gone wrong.)

  • KeirThomas

    I’ve updated the posting above to link to an updated script that pops-up a dialog box that prompts for whatever text the user wants. Thanks for the help Deborah!

  • KeirThomas

    I’ve added Deborah’s lines to the script. This now makes it possible to produce a font sample document featuring a demo line of text, rather than just font names. 

    Here it is for download — just open Font Book, then double-click the script to run it, and then click the Run button in the AppleScript window:

    http://mackungfubook.com/Creat

  • KeirThomas

    I’ve updated the posting above to link to an updated version of this script that prompts for a sentence or paragraph that will then be used to build the font sample document, as many of you have requested. 

  • KeirThomas

    I’ve updated the post to link to a script that pops-up a dialog box prompting for a string of the user’s choice from which the font sample doc is created. 

  • twitter-28439603

    Font Book does it all, and is built in.

  • prof_peabody

    What?  I suggest an easier, more sensible, plebeian way to approach the situation and you accuse me of elitism or something?  Nasty.  

    And you’re supposed to be the serious author here?!  

    You sound like just another cranky kid making stupid comments to boost their ego.  Very unprofessional.

  • prof_peabody

    Just to be a pedant for a moment … it should actually be 

    “The quick brown fox jumps over the lazy dog.”  

  • Alma Hoffmann

    It worked! I was skeptical after I hit run because nothing happened. I decided to leave it alone and come back later and there it was! Now I need to do add the script to have the phrase instead of the font names. Thank you!

  • Deborah Oakley

    Oh pshaw…who says it can’t be the other way?! There in fact is a type of fox known as gray (Urocyon cinereoargenteus), and there are plenty of brown dogs, so there professor smarteepants !  <g></g>

  • Deborah Oakley

    Oh very cool. Thank you.

  • Deborah Oakley

    Font Book won’t provide a nice, visually-scannable document (that I know of, anyway). I’ve actually toyed with several font catalog programs that don’t do it as nicely as this script. This is what I’ve wanted for a long time now.

  • KeirThomas

    The crucial thing about some third party font manager apps is that they can hide fonts from certain applications, so you could run In Design with all your fonts, for example, but Microsoft Office with only a handful of the usual suspects (Times New Roman etc.) This is important because Macs still handle fonts very badly. Having more than a basic set installed will slow down the computer dreadfully, and cause apps like Microsoft Word to take several minutes to start up (doesn’t sound like a lot but that’s a serious wait when you’re working). 

    At the moment I have a separate account called DTP which has a lot of fonts installed, and where I work on publishing projects. This is another way of handling the fonts issue other than using a font manager. 

  • hagure

    There is also a nice little utility called FontDoc that does a similar thing to these applescripts. Great for colleagues who are timid even around AppleScripts!
    I’ve been using FontDoc for years, but I’ll add these scripts to my toolbox as well!http://www.integrity.com/homes

  • normanack

    Fantastic! Much needed! Many thanks!

    Question: How do you make it print the sentence three times, in three sizes? For example, 12, 14, 18. I tried copying this part twice, replacing the number in “set size to 12″ with 14 and then 18, but got an error with the “end” right after the added part. “End tell” didn’t work. My syntax sucketh. Suggestion? And many thanks again!
    p.s. I promise to work on my AppleScripting.

    repeat with psName in postScriptNames
    set success to true
    try
    tell paragraph paraIndex
    set font to psName
    set size to 12
    set characters to tab & TextString & return & return
    end tell
    on error
    set success to false
    end try

  • devony

    You should try BeeFont, It is the ultimate font utility for users who require a quick, easy and comprehensive overview of all their fonts on Mac. It’s easy to generate sample of font to pdf use BeeFont  use print -> save as pdf. Also, you could select some fonts to generate pdf, That’s cool.

About the author

Keir ThomasKeir Thomas (http://keirthomas.com) is the author of Mac Kung Fu, which contains over 300 tips, tricks, hints and hacks for Mac OS X Lion. He's also the author of over 10 other computing titles.

(sorry, you need Javascript to see this e-mail address)| Read more posts by .

Posted in Mac, OS X, Tips & Tricks | Tagged: , |