Using Apple Font Tools

When troubleshooting font issues on your Mac, there are not very many tools that you can use to get under the hood and examine what the problem might be. Most of the time you are at the mercy of interpreting what might be happening. Sometimes you activate a font, but it does not show in your fonts menu, a font appears in your menus and you don’t remember ever activating it. At that point you are left to go between applications and see if the activation state is consistent between apps. And even then you can’t be sure if it is an application update issue, a cache issue or simply if you have a bad font.

Apple Font Tools

There is a an application (or in this case a suite of applications) that can help. Apple Font Tools is a little known, but extremely powerful set of command line utilities that can help you with may issues concerning fonts on your Mac.

The problem is there are so many things you can do with Apple Font Tools that there is no way to cover them all in a single blog post. I will visit some of the other interesting features of Apple Font Tools in the future, but the first I’d like to take a look at is ftxinstalled fonts.

Download and Install Apple Font Tools

The first thing you will need to do is download is Apple Font Tools Release 3.1.0. The download can be found at the link here.

Download the file, unzip it, then double-click on the Apple Font Tool Suite 3.1.0.dmg to open it. Then, double-click on the Apple Font Tool Suite 3.1.0.mpkg and click through the installer.

Since Apple Font Tools are command line based (there are a couple gui utilities installed as well, but we will visit those later) there is no application you can double-click on to access these tools. You will need to run these tools from Terminal.

Apple Tools - ftxinstalledfonts

The first tool we are going to look at is ftxinstalledfonts. The title of the utility pretty much says it all. It is a utility to see what fonts are installed on your Mac and where the fonts are located. This may sound trivial, but this is a very powerful tool for troubleshooting activation issues.

Running ftxinstalledfonts

Next we need to Launch Terminal. This can be found in the Applications/Utilities Folder.

ftxfinderscreensnapz0011

For those who suffer from command-line jitters, Terminal can be a frightening place and there is no shortage of warnings for those who venture there proceed at extreme peril.

Now it is true you can do some real damage through the command line, but the tool I am going to discuss today is basically a harmless one. In fact, the commands I am going to tell you about you will be able to copy and paste right from this blog entry so you won’t need to worry about typos of the disk erasing, never-ever-ever-recover-your-data variety.

To run ftxinstalledfonts type “ftxinstalledfonts” and then, depending on the output you want, add a number of operands to the command.

For example, if you copy and paste the line below into Terminal and hit return you will be given a list of the active fonts on your Mac.

ftxinstalledfonts -f

Your returned information in the Terminal, depending on the activation state of your fonts, should look something like this below:

ftxinstalledfontsf

The information returned can be somewhat confusing because this command will also list fonts on your system that will never appear in your font menus such as Keyboard or AquaKana. But if you are aware that this can be the case (these fonts are found in the /System/Library/Fonts/ folder and are fonts your OS needs) you can get some really useful information form the output.

Now if we run the command below you will be given a list of the active fonts and their locations.

ftxinstalledfonts -fl

This information is especially valuable if you are using a third-party font manage as it will be easy to determine what fonts are activated by that application and what fonts are active because they are in a system fonts folder.

I use FontAgent Pro to manage my fonts. If, for example, I want to find out what fonts are activated from within FontAgent Pro, I can type the line below and only the fonts activated by FontAgent Pro will be returned.

ftxinstalledfonts -fl | grep FontAgent

Note: The vertical line in the above command is called a “pipe” which takes the results from the first command and feeds it into the next command, in this case grep, which filters all the lines that contain the text “FontAgent.” If you want to learn more about the command command line, just Google “unix command line tutorial” and you will get a bunch of sites that can shepherd you along to command line guru status.

The result appears in the screenshot below:

ftxinstalledfontsfontagent

From this we can determine that I have five fonts activated by FontAgent Pro (highlights mine) and that Terminal allows you to select non-contiguous text to copy and paste (way cool!).

You can also learn additional information about a font. Copy and paste the following command into Terminal:

ftxinstalledfonts -flrq

This will give you a list of all fonts in the system, showing their full name, FOND (QuickDraw) name, version name and directory location.

And if you would like to get a report of active fonts, you can take that the information into a text file and save it to your desktop using the command below.

ftxinstalledfonts -flrq > ~/Desktop/report.txt

ftxinstalled fonts can be used for troubleshooting as well. If you have a font that keeps appearing in your menus, although you never activated it in your font manager, it has to be somewhere. ftxinstalledfonts can tell you where it is.

For example, suppose we have a font appearing in our font menu in Flash named DINEngschrift, but we have not activated it in our font manager. With the command below we can find the location of the font.

ftxinstalledfonts -fl | grep DINEngschrift

After we hit enter we will get the information returned like in the screen shot below.

ftxgrep

As we can see in the highlighted area, the font in question is installed in the home user font folder buried in a folder called “hidden font.”

These are just a couple of uses for ftxinstalled fonts. There are lots of other options you can find out about by reading the documentation and tutorials provided with the Apple Font Tool Suite.

Keep an eye out for future articles where we will discuss some of the uses for the other utilities that come with the Apple Font Tools Suite.

Dealing with Garbled Fonts

Note: The article below was written by Benjamin Levisay, founder of FontGeek.net and Alpha FontGeek. It first appeared on FontGeek May 31, 2006. This article is probably one of the most helpful and referred to articles ever published on the site. In order to keep it easily available for FontGeek readers, we are republishing it on the updated FontGeek website.

PS. If you want to visit the old FontGeek website, which is full of incredibly helpful information, click here.

One of the most common e-mail requests for help that I get from FontGeek.net readers is about font problems in what are normally considered non-graphic programs. Yes, I am talking about your browsers and your email applications, and while hardcore graphics artist don’t usually consider this a high priority with regard to getting their jobs out the door or to the printer, who among us isn’t annoyed when we can’t read our email or look at a web page correctly? These are the kind of problems for which we don’t plan for and we find difficulty getting support from the companies that make our graphic applications.

Let me clarify the problem. In your email program (it could be Apple’s mail or even Microsoft’s Entourage) or your browser (usually Safari, Firefox or Explorer) you will sometime find that the text shows up garbled. The result is you cannot read it correctly, or that you have to increase the text size in those programs to read the site’s content.

applications2

I’ve seen a lot of online posts about this, and they all seem to have one magic bullet to solve the problem. Unfortunately, one bullet may not do it. There are actually two distinct problems that can be perceived as the same thing, and several factors that can contribute to either of these two problems. Jumbled text could be a font cache problem, or it can be an incorrect font substitution problem. Troubleshooters usually know about one and not the other. With that in mind I’d like to explain the different problems and show you the troubleshooting steps you need to follow in order to alleviate these problems on your Mac.

Identify the Problem

The first thing you need to do is to identify which problem you are having. You are either having a font cache issue or an incorrect substitution problem.

These three images (below) show garbled text that I captured as screenshots from different websites using Safari.

garbledtext1

If you look closely at them you’ll see that there are some differences. The first, Sample 1, shows the unfamiliar characters overlapping each other. This is an example of font cache corruption.

The Second Example, Sample 2, shows the unfamiliar characters more evenly spaced. This example, although not readable, looks more orderly and evenly spaced. This is an example of a incorrect font substitution problem–in this case Times Phonetic is being incorrectly substituted for Times.

The third example, Sample 3, shows numbers and fractions. This is also an example of incorrect font substitution–in this case Helvetica Fractions is being incorrectly used instead of Helvetica.

If the problem you are seeing looks like the first image go to the section below, which deals with Font Cache Problems. If the problem looks like the second or third image go to the section named Font Substitution Problems.

Dealing with Font Cache Problems

Font caches have become a real headache for Mac OSX users. They not only crop up in your browser and email applications but also in your graphic documents. When fonts are activated (either by a font manager or by placing them into one of OS X’s Fonts folders) they are cached for use. Some of these font caches are handled by the OS and some of these font caches are handled by the applications themselves. In either case is is very easy for these cache files to become corrupt.

cacheproblems

If you are seeing examples similar to that just above, it is most likely caused by a corrupt cache file. What appears to be happening with this particular problem is that incorrect or corrupted encoding information is being used when mapping the character codes as input by your keyboard to the glyphs they represent in the problematically cached font.

smasherThere are various programs that you can use to delete font caches. The one that I use is Smasher from Insider Software. You can use Smasher’s font cache smashing feature to remove these cache files in an attempt to restore normal behavior, and to help rule out font cache corruption as the sole cause of the problem.

Note: Smasher has several font cache smashing features which can be activated by purchasing the program but the Mac OSX font caches can be cleared using the program in demo mode.

picture4

After using Smasher to clear you Mac OS X font caches, you will be forced to restart your computer. If after restarting your computer you’re still having problems with text displaying incorrectly in your browser or e-mail programs then you are most likely looking at an incorrect font substitution problem.

Dealing With Incorrect Fonts Substitution Problems

What is a font substitution problem? It’s very simple: When a document or a web page calls for a specific font due to unavailability or inadequate font calls to the OS another font is chosen instead, an incorrect font substitution results. For the most part this isn’t the worst problem to have with a browser or e-mail application. If a webpage calls for Arial and somehow Arial Narrow (or another normal roman font) is used, you still will be able to read the text. Right? So what’s the big deal?

Here’s a common scenario where an incorrect font substitution will cause a webpage to be completely unreadable. Let’s start with one of Apple’s web pages. If you go to Apple’s Hot News web page and look at the source code form within Safari you will see, among other things, that Times and Times Roman are specified (see screen shot below).

htmlsource2

What the web page is saying is that it wants the OS and/or active font manager to use these fonts when displaying this web page. But the font call for these fonts in not all that specific. In other words, the web page isn’t asking for Times regular or Times Roman Medium.

Note: This isn’t Apple’s fault. Web Browsers and CSS Style Sheets are’t set up to make those specific kinds of font calls the way Adobe InDesign or QuarkXPress do.

The next part of this scenario involves the presence of a very common Times font called Times Phonetic. If you had Times-PhoneticAlternate of Times-PhoneticIPA present in either your font manager or in one of your various OS Fonts folders this font could and often does get used instead of the normal Times font specified in the web page. So what you would see instead of the text in Times would look like the text shown in the screenshot below.

timesphoenetic

Another great example of this would be Helvetica. If you look at the CSS Style Sheets of MacFixit.com you will see that Helvetica is specified in certain parts of the site. This is just fine unless you have another very common Helvetica font present, once called Helvetica-Fraction. If you have Helvetica-Fraction or Helvetica-FractionBold present in wither your font manager or in one of your various OS Font folders, then this font could, and often does, get used instead of the normal Helvetica font specified. So what you would see instead of the text in Helvetica would look like the text in the screen shot below.

helvfractions

If you’re storing all of your fonts in one or more of the various Fonts folders the you’ll need to find these fonts, remove them, and restart your computer. Hunting the specific styles down and removing them may be a bit difficult but once you’ve done that you should be able to revisit these web pages and the problem should be resolved.

fapiconIf you are using a font manager finding and removing these fonts is much easier. Since I am using FontAgent Pro I will show you how to go about this using this program.

1. Launch FontAgent Pro.

2. Sort all the fonts in the All Fonts Pane by choosing Activated in the Filter by menu.

3. Scroll through your fonts until you find out is you have any Times-Phonetic or Helvetica-Fractions fonts present and active.

4. Click on the Phonetic fonts to preview them and see if the preview corresponds to the font substitution prolem you are having in your email application or browser.

times-phoenetic-issue

5. Click on the Fraction fonts to preview them and see if the preview corresponds to the font substitution problem you’re having in your email application or browser.

helveticafractissue

6. Switch the Filter by menu back to All Fonts and search for these Helvetica-Fraction fonts and Times-Phonetic fonts.

7. Deactivate those Fonts.

8. Export those fonts into a safe place for backup (in FontAgent Pro using the Export option under the Files menu).

9. Then delete these fonts from FontAgent Pro.

You should now be able to revisit your web pages and/or open your problem e-mails to see if you’ve successfully resolved the problem.

It’s also important to note that there are some other common font style variations besides fractions and phonetic that can be incorrectly substituted in your browser or e-mail application. Fraction fonts can also be called expert fonts. Also alt (or alternate) font styles can cause incorrect font substitutions. So it might not be a bad idea to do a search for phonetic, fractions, expert and/or alt in your font manager so you can avoid potential problems ahead of time.

You may find you need the occasional fraction, expert, phonetic or alt font in some of your graphic documents. When that happens reload those fonts from the export you did (earlier in Step Eight) and use them as necessary. But remember to remove them when you’re done so you don’t continue to have the same kinds of incorrect font substitutions in your browser or email application.

Note: Since this article was written, FontAgent Pro added a new feature where you can suppress auto-activation of individual fonts and libraries. Just select the font in question, perform a Get info (Command + i) and uncheck the Allow Auto-Activation check box. Now the fonts in question will no longer auto-activate so you can keep them in FontAgent Pro and only activate them when they are necessary.

FontGeek is Back!

Hello, my name is Scott Stoel and after about a two year hiatus, FontGeek.net is back. I’ve moved the blog to a new format and am ready to continue blogging about fonts, font management and making font related work-flows more efficient. But if you were a FontGeek reader and you want to look at the older posts, I’ve kept them posted here.

There was one article in particular that was very helpful that I chose to repost. Benjamin Levisay’s  Dealing with Jumbled Fonts in Your Browser and E-mail Programs was a piece I referred many people to and I didn’t think I could leave hidden on the old site.

We hope you like our take on fonts and font management, and we hope you come back often to see our posts. We’d like to hear your feedback. FontGeek a is a closed forum, so if you want to contact me you can reach me at scott@fontgeek.net. If you think you have a suggestion or solution that others would benefit from, I’d be glad to post it as a “Talk Back” item and give you credit.

Also, in the interest of full disclosure, I work for Insider Software where we make products that streamline creative and productivity processes, including the industry-leading FontAgent Pro family of font management products. So in the interest of preserving the objectivity of this site, I will not review any font management software or any other application that competes with our offerings, and that includes those released by Insider. If you think you might have a opinion about a software offering that we should share that represents an objective viewpoint, please get in touch with me and I will consider publishing it here.

Thanks for logging on and I hope you will enjoy the continued adventures of FontGeek v.2.