MCPcopy Index your code
hub / github.com/arrowtype/recursive / writeKerning

Function writeKerning

mastering/build_static.py:199–213  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

197
198
199def 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
216def buildFontInfo(stylename, dir):

Callers 1

buildInstancesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected