Skip to content

Latest commit

 

History

History
41 lines (35 loc) · 3.8 KB

compiling_fonts.md

File metadata and controls

41 lines (35 loc) · 3.8 KB

FontLab > UFO+Designspace+FontMake workflow:

This is how we get from FontLab VFC files to final variable TTFs.

If you are working directly with UFOs only, and not starting with the FontLab source, you would skip to point 13 below.

For points 5 and 7, we use a FontLab script, which is here in the repo. You need to install these scripts in FontLab and know how to run scripts from FontLab. (Note: the script is mostly relevant if one is editing glyphs, for many other kinds of work, it is unlikely you will be breaking glyph-master compatibility.)

  1. Bump the version string in the font.
  2. Update the date/time stamp in the font to current.
  3. Save the font.
  4. Save the font under a temp name. Further changes are being made on this copy of the font.
  5. In FontLab do Font > Update Glyphs. This forces FontLab to do a full update. Otherwise its “lazy load” conflicts with the subsequent scripts and generates bogus errors. :(
  6. Run the SG-Font-Check QA script that is in the scripts folder within FL. (Note that "SG-UFO-Prepare.py" is basically the same script, only it deletes problem glyphs! As the project is no longer in early stages, deleting glyphs to make the font build is no longer okay.)
  7. Correct any problem glyphs by decomposing them, etc. Manually decompose problem glyphs not caught by the script. * (Currently none)
  8. If problems were fixed, Run SG-Font-Check QA again.
  9. Convert outlines to TT with Tools > Actions > Basics > Convert to TT Curves (be sure to set "All Masters" at top, and check "Apply to entire font" at bottom left)
  10. Check _Features Panel > “Hamburger” menu (top left) > Include Classes: Kerning and OpenType should be checked (on); Tags and Virtual Tags should be unchecked (off)
  11. Delete any [mark] [mkmk] and [kern] features from the Features Panel; then from the panel’s hamburger menu, recreate them
  12. In the Kerning panel, use the Match Kerning operation from the “hamburger menu” at the bottom right of the panel.
  13. Export your UFO+Designspace (File > Export Font As, select "DesignSpace + UFO" near the bottom)
  14. Run fontmake from the command line, in the same folder as the output file: fontmake -m *.designspace -o variable --keep-overlaps (if you only have one designspace file in the folder) or fontmake -m ScienceGothic[YOPQ,wdth,wght,slnt].designspace -o variable --keep-overlaps (substitute exact file name if different)
  15. Remove MVAR table with gftools gftools fix-unwanted-tables *.ttf, as required by #244
  16. Run gftools-fix-nonhinting.py *.ttf ScienceGothic[YOPQ,wdth,wght,slnt]1.ttf per #239
  17. run gftools fix-dsig --autofix *.ttf (Note: this may need to be the last step in any sequence of fixes) #251
  18. Remove old unfixed files
  19. Make sure final font file is named correctly, per Google specs. e.g. ScienceGothic[YOPQ,wdth,wght,slnt].ttf
  20. TESTING steps are part of the compile process, as follows...
  21. Run fontbakery check-googlefonts ScienceGothic[YOPQ,wdth,wght,slnt].ttf
  22. Either: Run ftxvalidator ScienceGothic[YOPQ,wdth,wght,slnt].ttf or install and validate in Apple’s Font Book

At this time, we have fixed most issues identified by FontBakery, but have a few items to discuss with Google. We do not yet have ftxvalidator running properly, but have a workaround.


  • Running the script will not always find every broken glyph. For example, at one point /zero.zero was the ultimate evil. It was compatible and did not use a mixed reference, but nevertheless fontmake would result an error. (Eventually Thomas rebuilt it and the problem went away.) If you encounter a case like this at the fontmake stage later on, back up to this point and fix (flatten) the incompatible characters, even though the script shows no reason for a problem.