Uses ufo2ft to write out the *font*'s kerning feature file to the *path* *font* is a font object (Defcon or FontParts) *path* is a `string` of the path to write the kerning feature file
(font, path)
| 197 | |
| 198 | |
| 199 | def writeKerning(font, path): |
| 200 | """ |
| 201 | Uses ufo2ft to write out the *font*'s kerning feature file to the *path* |
| 202 | |
| 203 | *font* is a font object (Defcon or FontParts) |
| 204 | *path* is a `string` of the path to write the kerning feature file |
| 205 | """ |
| 206 | |
| 207 | from ufo2ft.featureWriters.kernFeatureWriter import KernFeatureWriter, ast |
| 208 | |
| 209 | feaFile = ast.FeatureFile() |
| 210 | w = KernFeatureWriter() |
| 211 | w.write(font.naked(), feaFile) |
| 212 | with open(path, "w") as f: |
| 213 | f.write(str(feaFile)) |
| 214 | |
| 215 | |
| 216 | def buildFontInfo(stylename, dir): |