About the Fonts folder in Windows, Part 2 (aka Adding Fonts)

by Michael S. Kaplan, published on 2006/07/02 03:01 -04:00, original URI: http://blogs.msdn.com/b/michkap/archive/2006/07/02/654110.aspx

You may have read the first post I wrote about this, titled About the Fonts folder in Windows, Part 1 (aka What are we talking about?). I won't say that it is all downhill from there, but this post is definitely going to see us spending a little time in the valley....

You see, there is one thing about the Fonts folder that just about everyone can agree about -- the lovers of Microsoft, the haters of it, and everyone in between.

And that is that they can't stand the UI for adding fonts.

There are even instructions for it, though those instructions do not include pictures (probably put together by someone who was embarrassed about the whole thing).

Luckily the folks on the Typography team include a little art here. It is true that they haven't updated the instructions for the last few versions. But that is okay -- because the UI has not been updated either. :-)

And if you want art, the folks at Adobe give instructions with art here and here, the first link having the extra info on using the Adobe Type Manager for all of those Type 1 fonts (ATM is not needed for the later versions).

Most people I talk to never even knew this ridiculous dialog that looks like a reject they forgot to update from Windows 3.1 even existed; they simply open the Fonts folder and drag the font files to it. Most people don't even realize there is a right-click menu option for fonts to install them, either.

And lots of other people put up sites explaining how much cooler all of this is on a Mac (like this X vs. VP one). I won't comment except to say that there are some times that Microsoft appears to be clueless about UI. And this is one of them.

But the reason for the dialog existing was explained by the owner of it not too long ago:

The current install font dialog presents a list of fonts that are present in a directory to install and it lists them by font name.  These come in roughly 3 categories:

  1. individual fonts - truetype, opentype, raster - eg foo.ttf.  There is a 1-1 mapping of fonts to fonts that get displayed in the install font dialog.  The only way to get the name of the font is by opening the font file and reading the font name from it - the file names almost never contain a good enough name, and the file names aren't localized.
  2. .inf installs - you can specify a catalog of fonts that span media in a .inf file.  There is a 1-many mapping of .inf files to available fonts to install, the only way to generate the list of fonts is to parse the .inf file.
  3. Type 1 fonts, eg foo.pf* - There is a 2-1 mapping of font files to fonts, each type 1 font has 2 files (sometimes 3) associated with it, at a minimum a .pfb and .pfm file.

There isn't another dialog in the system that can take such a set of input and produce the proper list of items.  Many people say this should just use the common file open dialog, however unfortunately the requirements imposed by 1-3 above aren't supported in any way by the common dialogs, its a very unusual case.

Now I am going to say that (speaking just for me and not at all for Microsoft or anyone who owns the dialog or the folder or even the functionality) that this explanation does not really ring true for me.

I mean, a common file open dialog can handle both multiple file types (.INF, .TTF, .PFB, .PFM, etc.) and multiple files at the same time. If they don't select all the files that are needed for a Type 1 font then an error can be put up just like they selected a corrupted file or one that is already installed.

Sure it's a complicated little bit of code, I won't argue about that. And a tester would probably find it to be a target rich environment when looking for bugs. But it isn't impossible; it's just intricate.

So it seems like an update here ought to be possible. If that were the only reason, I mean.

But in the end, I think the real story is a bit more involved -- one of those weird situations where the people who own the functionality (the font folks, the rendering folks, the other font folks) are not the owners of the UI. And they don't have the resources to take the ownership. And the folks who own it don't really have a ton of resources either, so this turns into one of those sacrificial features that can get cut each version (on one version because there is no time left and on the next because we already shipped it before, right?).

When everything is said and done, the story here is not nearly as impressive as it probably ought to be. Or even as impressive as it could be. It really does scream for someone to take all that info I put in the first post about what is involved with the install and just putting something together, doesn't it? :-)

The story continues, in both more impressive and less impressive ways. Stay tuned....


This post brought to you by (U+ff26, a.k.a. FULLWIDTH LATIN CAPITAL LETTER F)

# Rosyna on 2 Jul 2006 3:41 AM:

Alternatively, selecting one of the files could select all the rest of the required files automatically. IE, search the directory for the rest. Then there's no reason to deal with the mappings of a font requiring multiple files.

How does it deal with ttc files?

# Gabe on 2 Jul 2006 5:36 AM:

I understand that using a standard dialog is more or less impossible for the "Add Fonts" feature. However, I don't understand why they don't make a new dialog that just uses Explorer's Font Folder listview code. It shouldn't be too hard to make a dialog that looks like a common Open dialog, only it would show fonts instead of files.

# Michael S. Kaplan on 2 Jul 2006 9:16 AM:

Hi Gabe,

I don't disagree here at all -- but that's just a detail (the minimum they would need is something that can do all of the parsing I talked about).

Ideally a new dialog would do it all before selection along the lines you are talking about, but since it has not been significasntly updated in over 15 years, I would not want to get too greedy in my request. :-)

# Michael S. Kaplan on 2 Jul 2006 9:18 AM:

Hi Rosyna,

The current dialog? You just select them, and it adds the multiple fonts? I haven't ever seen TTC files that were not produced by MS, though -- have you?

# Ruben on 2 Jul 2006 9:34 AM:

The story with Type 1 fonts is even more convoluted when you look at the way the drag & drop functionality works for the Fonts folder.

- If you drag in a .pfm file, the .pfb fle is copied also, where it seems some intelligence is used to locate it. (The .pfm and .pfb files do not need to be in the same folder for drag & drop to work! Neighbouring folders seem to be taken into account as well.)

- If you drag the .inf file, the .pfb and .pfm files are copied.

- If you drag only the .pfb file or both the .pfb and .pfm files, you'll get an error: the font file is damaged or not valid. (Rough translation from Dutch Windows here.)

Note that .pfm files are pretty much Windows-specific; other systems use .pfb and .afm. (Always at least two files it seems.) The actual font resides inside .pfb file, the .pfm file is mainly for metrics, and I think some GDI/TrueType compatibility. Type 1 being a member of the mostly-but-not-quite 8-bit freestyle/chaos encoding club*, and TrueType being Unicode(ish).

I believe Adobe and MS have their hopes on Type 1 dying quickly, though.

* Type 1 fonts tend to to be accessed in 8-bit encodings, but no-one could agree on the actual encoding. So you've got Cyrillic fonts using Latin 1 encoding slots. Yummy. And some fonts support 256 characters (or more), but you'll only be able to access characters 32-255 on Windows or Mac (which used a different encoding vector, IIRC). To give you characters not present in Latin 1 or Mac Roman, you've got 'expert' fonts that provide characters at random code points in the 32-255 range. Including A-Z small caps. Sometimes. And old style figures. But just that, so you'll need to switch fonts continuously if you want to use these features in running text. So Windows is a little erratic with Type 1 fonts, but that's nothing compared to the mess that is called Type 1.

# Michael S. Kaplan on 2 Jul 2006 3:28 PM:

Hi Ruben,

And this is the format that you don't want to die a quick death? :-)

In this blog, if it's not Unicode then it sucks!

# Ruben on 3 Jul 2006 8:09 PM:

I do want Type 1 to die a quick death. It's outstayed its welcome for nearly a decade, as far as I am concerned. So I do want it to die (one of those freak accidents involving a printing press, preferably). Just not it's replacement: OpenType/CFF :-)

Now, if only font vendors would replace their Type 1 fonts with OpenType versions for free...

# Michael S. Kaplan on 4 Jul 2006 1:53 AM:

Folks I have talked to over here in MS Typography say that CFF outlines are supported, as are many other parts of OpenType. Just so you know. :-)

# Ruben on 4 Jul 2006 4:50 PM:

Yup, knew that.

Do you know whether those horrible line art .fon fonts from Windows 16 bits are still supported in the Vista era? (Roman and Modern they were called, I believe.)

And why bitmap font files are OEM code page based? (Read: worse than Type 1.) Simply legacy?

(Should probably have put this in the questions area.)

# Ivan Petrov on 18 Jul 2006 2:22 AM:



# legolas on 19 Jul 2006 7:23 AM:

Ruben, if OpenType/CFF lives, you still have a Type1 font (in CFF format) inside an Opentype wrapper. How is that better than just plain Type1 as far as encoding goes?

Oh and there are extensions to allow Type1 in CFF format to contain more than an 8 bit encoding... Although this involves using Adobes CID sets as an 'encoding'.

Michael: Hope to see the next installment of this series soon!

# LostFont on 19 Sep 2006 7:17 PM:

Does Microsoft have a download for MS Windows core fonts (eg. Arial, Times New Roman) that support the MAC_CHARSET?

Our application uses a file-type converter that relies on the GDI library to parse content.  Currently our server running Win2003 has tons of fonts that support numerous character sets, but not a single font that supports the MAC_CHARSET.  We need to be able to support uploaded files from both Mac and Windows OS users.

# Michael S. Kaplan on 19 Sep 2006 10:48 PM:

There are no downloads that I know of for core fonts that would be more recent than  what the platform you are running has, no. Just make sure to keep both kinds of files in Unicode and everything will work.... :-)

# Jan Kučera on 12 Nov 2007 11:55 AM:

Hi Michael, I'm going to take advantage of open comments today. :-) Great posts, indeed.  What I would like to ask is, if the fonts do not have to be in the Fonts folder, where they could be? I mean, Would \\fontserver\ path work in the registry? Would http:// path work?

Is there any notificiation, that the registry font item failed to load?


# Michael S. Kaplan on 12 Nov 2007 1:53 PM:

These are bigger questions, probably better for a suggestion box item or two....

referenced by

2008/10/09 About the Fonts folder in Windows, Part 5 (Nothing personal!)

2008/03/21 Did UnC "My name is URL" on TV the other day? Fontastic!

2007/11/06 Like a mattress tag, the rule is DO NOT REMOVE

2007/09/25 *Not* new in Vista SP1 -- the Add font dialog....

2007/05/26 On installing fonts

2006/08/27 About the Fonts folder in Windows, Part 3 (aka What changes in Vista?)

go to newer or older post, or back to index or month or day