(font, args)
Generates feature text by merging feature file with mark positioning
    lookups (already in the font) and making sure they come after kerning
    lookups (from the feature file), which is required by Uniscribe to get
    correct mark positioning for kerned glyphs.
Generates feature text by merging feature file with mark positioning
    lookups (already in the font) and making sure they come after kerning
    lookups (from the feature file), which is required by Uniscribe to get
    correct mark positioning for kerned glyphs.
Generates feature text by merging feature file with mark positioning lookups ( already in the font ) and making sure they come after kerning lookups ( from the feature file ) which is required by Uniscribe to get correct mark positioning for kerned glyphs .
def generateFeatures(font, args):
    """Generates feature text by merging feature file with mark positioning
    lookups (already in the font) and making sure they come after kerning
    lookups (from the feature file), which is required by Uniscribe to get
    correct mark positioning for kerned glyphs."""

    # open feature file and insert the generated GPOS features in place of the
    # placeholder text
    preprocessor = Preprocessor()
    if args.quran:
        preprocessor.define("QURAN")
    elif args.slant:
        preprocessor.define("ITALIC")
    with open(args.features) as f:
        preprocessor.parse(f)
    o = StringIO()
    preprocessor.write(o)
    fea = o.getvalue()
    font.features.text = fea.replace("#{%anchors%}", font.features.text.asFea())
def generateFeatures ( font , args ) : # open feature file and insert the generated GPOS features in place of the # placeholder text preprocessor = Preprocessor ( ) if args . quran : preprocessor . define ( "QURAN" ) elif args . slant : preprocessor . define ( "ITALIC" ) with open ( args . features ) as f : preprocessor . parse ( f ) o = StringIO ( ) preprocessor . write ( o ) fea = o . getvalue ( ) font . features . text = fea . replace ( "#{%anchors%}" , font . features . text . asFea ( ) )