little scripting help required

I am looking for help for a font project. I have developed some masters in parallel, now I have font source files that need to be merged into single files for further development. Those fonts I start with cover Mac OS Roman encoding.


Example: First file has regular glyphs and numbers, second file has four alternate glyphs and Old style Figure designs (in the main numbers slots). Those two sources should become just one, the 10-14 additional glyphs (in font "B" marked with color) with all their kerning, prepared with correct suffixes (.alt, .osf) to be used with OpenType features in the end. This procedure for 4x two source files: The upright designs in Light and Bold and the italic designs in Light and Bold. 


My source files are .vfc (could be saved to a format of your preference) and should result in a format I can further work with in Fontlab. 


I was eager to look into scripting, I did read interesting threads here on TD. I did exercises with DrawBot. But honestly, scripting exceeds my capabilities. I would be thankful to find a professional among you who could help me with this.


The amount of work seems manageable, it is probably rather you are doing me a favour. If you are interested please send me a note with how I could compensate you for your work. Thank you!

Tagged:

Answers

  • If it wasn’t for the kerning in the file that has the alts/OSFs, this would be so easy as to be nearly trivial.

    I think one viable approach would involve taking the files that have the alts/OSFs, and renaming those glyphs with suffixes to their final names while still in that file. Then it will be possible to do whatever merge operation is needed, without collisions.
  • Kent Lew
    Kent Lew Posts: 1,010
    What Thomas advises is essentially how we merged the Font Bureau library decades ago. There was an intermediate step of compare kerning data to make sure there were no accidental conflicts/discrepancies between kerning for the same base glyphs across fonts before merging.
  • If it wasn’t for the kerning in the file that has the alts/OSFs, this would be so easy as to be nearly trivial.

    I think one viable approach would involve taking the files that have the alts/OSFs, and renaming those glyphs with suffixes to their final names while still in that file. Then it will be possible to do whatever merge operation is needed, without collisions.
    Thanks Thomas. I tried new suffixes (kerning is still okay), then merge as you mentioned. Unfortunately the "include kerning" part in merging is the not so trivial part for me. I assume this still requires scripting, and not just the "merge fonts to masters" command. 
  • Kent Lew said:
    What Thomas advises is essentially how we merged the Font Bureau library decades ago. There was an intermediate step of compare kerning data to make sure there were no accidental conflicts/discrepancies between kerning for the same base glyphs across fonts before merging.
    Thank you, Kent. I assume you used a script to check files and merge fonts, and not just a plain font editor?
  • John Hudson
    John Hudson Posts: 3,500
    I have found copying and pasting kerning between fonts in FontLab 8 to be reliable. So you might simply be able to copy entries from the Kerning panel in the source font with renamed glyphs, and then paste into the target font Kerning panel. Note that if this kerning includes any pairs also define in the target font, those will get overwritten, to take care to only select and copy the kerning you are sure you want.
  • I have found copying and pasting kerning between fonts in FontLab 8 to be reliable. So you might simply be able to copy entries from the Kerning panel in the source font with renamed glyphs, and then paste into the target font Kerning panel. Note that if this kerning includes any pairs also define in the target font, those will get overwritten, to take care to only select and copy the kerning you are sure you want.
    Thank you John, I haven't thought of c/p the kerning pairs - I will try to do this!
  • Kent Lew
    Kent Lew Posts: 1,010

    Thank you, Kent. I assume you used a script to check files and merge fonts, and not just a plain font editor?
    It was so long ago, I can’t recall all the steps, but yes we would probably have used a series of Python scripts, since this was a mass conversion of a large library. My part then was more focused on review, QA, and checking/updating features.

    What I typically do these days with smaller projects, like work I used to do for Matthew, is export kerning data as text and then use BBEdit/GREP to remove duplicates and flush out conflicting pairs for analysis. Then import cleaned up kerning back into the font file with glyphs merged by simple copy-paste.