def readFeatureFile(font, text, prepend=True): """Incorporate valid definitions from feature text into font.""" writer = FilterFeatureWriter(set(font.keys())) if prepend: text += font.features.text else: text = font.features.text + text parser.parseFeatures(writer, text) font.features.text = writer.write()
def makeKernFeature(font, text): """Add a kern feature to the font, using a KernFeatureWriter.""" writer = KernFeatureWriter(font) parser.parseFeatures(writer, text) font.features.text += writer.write()
def _collectFeaClasses(self): """Parse glyph classes from existing OTF syntax.""" parser.parseFeatures(self, self.featxt)