Replaces the features.fea file in the UFO with the external features.fea file *src* is the source directory with the UFOs and external features.fea file
(src)
| 9 | |
| 10 | |
| 11 | def buildFeatures(src): |
| 12 | """ |
| 13 | Replaces the features.fea file in the UFO with the external |
| 14 | features.fea file |
| 15 | |
| 16 | *src* is the source directory with the UFOs and external features.fea file |
| 17 | """ |
| 18 | ufos = getFiles(src, "ufo") |
| 19 | feature = os.path.join(src, "features.fea") |
| 20 | for ufo in ufos: |
| 21 | shutil.copy(feature, ufo) |
| 22 | print("🏗 Moved features into UFOs") |
| 23 | |
| 24 | for ufo in ufos: |
| 25 | font = Font(ufo) |
| 26 | # Turn off writing out gdef table glyph classes as this |
| 27 | # causes fontmake to choke on the variable font build. |
| 28 | # Ben Kiel thinks this is because the classes push the |
| 29 | # table size to create another lookup in the Sans fonts, |
| 30 | # causing a mis-match between the number of lookups in Sans |
| 31 | # vs Mono. Instead, only write out the ligature carets, and |
| 32 | # let fontmake/ufo2ft fill in the classes. Testing found that |
| 33 | # fontmake/ufo2ft will not write ligature classes, just mark |
| 34 | # and base, FYI. |
| 35 | make_mark_mkmk_gdef_feature(font, GDEF_Classes=False) |
| 36 | print("🏗 Added mark, mkmk, and GDEF to features") |
| 37 | |
| 38 | |
| 39 | def makeSTAT(font, designspace): |
no test coverage detected