Editing type 1 fonts with FontLab - Kerning issues

albertoxic's picture

Hi,
when a font has a confusing menu/font/file name, a colleague of mine opens the pfb file with FontLab 4.6, changes the font infos and generate again the font, with new afm, inf, pfb and pfm files.

Since kerning data are stored in afm and pfm files and FontLab opens only the pfb file, I fear this process can lead to a loss in the original kerning infos.

My colleague says FontLab automatically search for metric files in the same folder where the pfb files are: so when he generate the font FontLab use the original metric files to create the new afm and pfm files.

What do you think about it?

John Hudson's picture

I think FontLab is pretty clever :-)

albertoxic's picture

Hi John
So my colleague is right?
Can you tell me when FontLab acquire the kerning infos from the afm/pfm files placed in the same directory as the pfb file? When the user opens the file or when he (re)generate the font?

Many thanks

charles ellertson's picture

When you open a font in FontLab, the metrical data is read in at the same time -- you can check this by opening the metrics/kerning window.

But this *file* isn't a font -- its extension is .vfb. You only have a *font* when you *generate fonts*. So I suppose you could say that technically, the kerning data is put in a font when it is (re)generated, but the data is read into FontLab when the file is opened.

A small point.

Charles

albertoxic's picture

Thanks Charles,
my friend was right: FontLab is a very smart program...

twardoch's picture

Alberto,

you don't need to worry. For Win Type 1 fonts, if you open a .pfb file, FontLab automatically looks for a corresponding .afm file in the same folder, and if not found, for a .pfm file. Only if none of these files are found in the same folder, FontLab will drop the kerning.

BTW, for Mac Type 1 fonts, kerning will get imported if you open the font suitcase, but will be dropped if you directly open the LWFN printer font file -- so you need to be careful which file you open.

Your trick is fine, but remember that some font names are written in the .afm/.inf and .pfm files, e.g. MS Menu Name, or Family Name. So if you modify font naming and generate a .pfb file, but you use the old .afm or .pfm, your font names may be out of sync. Actually, Microsoft Windows really reads the font names from the .pfm file, NOT from the .pfb file, when accessing the font. So it is always a good idea to re-make all Type 1 files: .pfb, .afm, .inf and .pfm.

Regards,
Adam Twadoch
Fontlab Ltd.

albertoxic's picture

Dear Adam,
I think your post is the definitive word on this issue.

Thanks
ar

charles ellertson's picture

>>Only if none of these files are found in the same folder, FontLab will drop the kerning. >>

True. However, you can always manually read in a .afm file (dunno about mac formats). A good check would be to open the metrics/kerning window to make sure the kerning data is there. If the kerning data isn't there, find the .afm file and manually import it.

FWIW

Syndicate content Syndicate content