Ejemplo n.º 1
0
 def getKerningClasses(cls, font, feaFile=None, glyphSet=None):
     side1Groups, side2Groups = cls.getKerningGroups(font, glyphSet)
     side1Classes = ast.makeGlyphClassDefinitions(side1Groups,
                                                  feaFile,
                                                  stripPrefix="public.")
     side2Classes = ast.makeGlyphClassDefinitions(side2Groups,
                                                  feaFile,
                                                  stripPrefix="public.")
     return side1Classes, side2Classes
Ejemplo n.º 2
0
 def _makeMarkFilteringSetClass(self, lookupName, attachments, markClass,
                                include):
     markGlyphs = (glyphName for glyphName in markClass.glyphs
                   if include(glyphName))
     baseGlyphs = (pos.name for pos in attachments
                   if pos.name not in markClass.glyphs)
     members = itertools.chain(markGlyphs, baseGlyphs)
     className = "MFS_%s" % lookupName
     return ast.makeGlyphClassDefinitions(
         {className: members}, feaFile=self.context.feaFile)[className]