How to show custom previews for all fonts in 10.9 Font Book?

For years, I've enjoyed the feature in OS X Font Book where you can type in custom text and scroll through all the fonts to preview it. Now on Mavericks, when I try to do this, it only works for single-font families. All font families containing multiple fonts (e.g. bold, italic, etc.) will only show the default sample text. How can I change this behavior to be like older OS X versions, where you can see the custom text for all fonts? I'm hoping there's a plist somewhere that can be edited.


This works (at least in Yosemite Public Beta 2):

Open Font Book, select "Custom" from the View menu, double-click in the preview area and type what you want. Then, close Font Book. Then, re-open Font Book. Now, whatever you had previously typed should be the preview text for every font.

Annoying, yes, but it's a lot better than nothing!


I think that you are talking about the font-families. Since Mavericks, font-families are grouped and. You can get a custom preview by clicking on the triangle next to the font name ane selecting the font you want.


I had the same problem and wrote a script for an overview in a html-file. For me this solved the problem. So maybe this is a solution for you, too. I think it is not difficult, but you have to know how to open Terminal application.

If you're familiar with scripts and Terminal and so on, save the code below with a name of your choice at a place of your choice. Otherwise I'll recommend the following:

Open the TextEdit application. Open a new file (File -> New), click on Format and choose Make Plain Text. Then insert the code below and save the file as fonts.sh on your Desktop.

Then open Terminal application and type

cd ~/Desktop

Then type the following, which will list all files on your Desktop - and also the just created fonts.sh

ls -l

In the line with the new "fonts.sh"-file you'll probably see something like

-rw-r--r--@

The first four signs mean, that you can read (r) and write (w) on this file. But at the moment you don't have the right to execute it. Therefore type

chmod u+x fonts.sh

If you now repeat the "ls -l" command, you should see that the rights of fonts.sh changed to

-rwxr--r--@

The new x shows, that you can execute the file. Now you can generate the promised html-file :-)

Just type

./fonts.sh

The next time you want to use the script, you only have to start Terminal, and type

cd ~/Desktop
./fonts.sh

I hope, this helped.

And here is the code to save in a file:

#!/bin/sh

echo "\n************************************"
echo "Welcome to an overview of your fonts"
echo ""
echo "Advice: This script generates two files: fonts.html and fonts-in-system.txt, second one will be deleted again. But if you already have files with such names on your Desktop they will be overwritten! So be careful!"
echo ""

echo "Enter what you want to have displayed"
read INPUT

echo "Do you want to have the fonts in normal (n), italic (i) or oblique (o) style?"
read STYLE

if [ "$STYLE" = "n" ] ; then
    STYLE="normal"
elif [ "$STYLE" = "i" ] ; then
    STYLE="italic"
elif [ "$STYLE" = "o" ] ; then
    STYLE="oblique"
else
    echo "Normal style is used!"
    STYLE="normal"
fi

echo "Do you want to have the fonts in normal (n), lighter (l) or bold (b) weight?"
read WEIGHT

if [ "$WEIGHT" = "n" ] ; then
    WEIGHT="normal"
elif [ "$WEIGHT" = "l" ] ; then
    WEIGHT="lighter"
elif [ "$WEIGHT" = "b" ] ; then
    WEIGHT="bold"
else
    echo "Normal weight is used!"
    WEIGHT="normal"
fi


echo "Fonts are generated - you'll find them on your Desktop in 'fonts.html'.";

# Temporary file fonts-in-system.txt is generated
# It will include font family names like "Kaiti SC,楷體\-簡,楷体\-简"
cat > "fonts-in-system.txt" << EOF
$( fc-list : family )
EOF

# Sort font list
sort "fonts-in-system.txt" -o "fonts-in-system.txt"

# Generate html-file
cat > fonts.html << EOF
<!DOCTYPE html>
<html>
    <body>
        <table>
EOF

LAST_FONT=""

while read LINE ; do
    if [[ ! $( echo "$LINE" | grep "^\." ) ]] ; then #only take fonts which don't start with a "."
        FONT=$( echo $LINE | sed "s/,\(.*\)//" ) #cut off everything in a line starting with a comma => line "Kaiti SC,楷體\-簡,楷体\-简" would become "Kaiti SC"
        if [ "$LAST_FONT" != "$FONT" ] ; then    #print each font only once
            echo "          <tr style=\"font-family:$FONT; font-style:$STYLE; font-weight:$WEIGHT\">" >> fonts.html
            echo "              <td>$FONT</td>" >> fonts.html
            echo "              <td>$INPUT</td>" >> fonts.html
            echo "          </tr>" >> fonts.html
        fi
        LAST_FONT=$FONT
    fi
done < "fonts-in-system.txt"

cat >> fonts.html << EOF
        </table>
    </body>
</html>

EOF

rm "fonts-in-system.txt"