# mutator

Instantiate a variation font. Run, eg:

$ fonttools varLib.mutator ./NotoSansArabic-VF.ttf wght=140 wdth=85

fontTools.varLib.mutator.instantiateVariableFont(varfont, location, inplace=False, overlap=True)

  Generate a static instance from a variable TTFont and a dictionary defining the desired location along the variable font’s axes. The location values must be specified as user-space coordinates, e.g.:

  > {‘wght’: 400, ‘wdth’: 100}

  By default, a new TTFont object is returned. If `inplace` is True, the input varfont is modified and reduced to a static font.

  When the overlap parameter is defined as True, OVERLAP_SIMPLE and OVERLAP_COMPOUND bits are set to 1. See https://docs.microsoft.com/en-us/typography/opentype/spec/glyf

fontTools.varLib.mutator.interpolate_cff2_PrivateDict(topDict, interpolateFromDeltas)

fontTools.varLib.mutator.interpolate_cff2_charstrings(topDict, interpolateFromDeltas, glyphOrder)

fontTools.varLib.mutator.interpolate_cff2_metrics(varfont, topDict, glyphOrder, loc)

  Unlike TrueType glyphs, neither advance width nor bounding box info is stored in a CFF2 charstring. The width data exists only in the hmtx and HVAR tables. Since LSB data cannot be interpolated reliably from the master LSB values in the hmtx table, we traverse the charstring to determine the actual bound box.

fontTools.varLib.mutator.main(args=None)

  Instantiate a variation font