Copying Unicode Names From A Font / & Color Component Glyphs In A VFB?

Vladimir Tamari's picture

As the Beatles sang: Help!
I have two font weights with the same number of glyphs, same encoding, and glyph names, but the unicode entries are incomplete or missing in one of them. How do I either:
Copy the good unicode names from one font to the other without changing the outline, bearings or anything else?
Copy the outline and side-bearings to the font with the good unicode names?
Another question: is there a quick method to sort and color all the component glyphs of a font in Fontlab?
Many thanks.

John Hudson's picture

The easiest way to do this would be to simply copy the cmap table from the good font to the other one. I would use DTL OTMaster for this, which is a simple copy/paste operation, but if you want a no-cost option you could use TTX: dump cmap table from one font and merge it to the other.

Note that this relies on the glyph ordering of the two fonts being identical.

Another way to do this, in FontLab, is to save a .nam name-to-unicode file of the good font, and then use it to Apply Unicodes to the other font.

jasonc's picture

What John says makes the most sense, but it would be a pretty simple python script to write through as well.

Vladimir Tamari's picture

Thank you John I have installed TTX and will be trying to implement the steps you kindly described.
jasonc - I tried to learn Python a while back, trying to simulate physics ideas, but it was hard to remember the commands unless one uses it constantly.

Vladimir Tamari's picture

John I have managed to install TTX on the Mac and to create .tx versions of my fonts, and to edit the cmap there. The reverse process of recreating a .ttf file (In Terminal type ttx and drag the .ttx file there/ ) is not working. Any other way to use TTX i.e syntax to copy cmap from A to B directly?


erwindenissen's picture

Too bad you are on a Mac, as with FontCreator it can be done in a split second.

Select all glyphs from the source font, and then copy and paste the codepoints (paste special) to the destination font.

Vladimir Tamari's picture

Tak erwindenissen. I remember FontCreator the can-do little software fondly from my first experiments with handwriting font years ago. Glad it seems to be developing well. I did download the PC trial but the fonts I wish to deal with are in different encodings. In Fontlab I could rearrange the glyphs, but on the Mac the paste-special command there changes some Unicode names in the target font.

Syndicate content Syndicate content