class fontTools.ttLib.ttCollection.TTCollection(file=None, shareTables=False, **kwargs)[source]

Object representing a TrueType Collection / OpenType Collection. The main API is self.fonts being a list of TTFont instances.

If shareTables is True, then different fonts in the collection might point to the same table object if the data for the table was the same in the font file. Note, however, that this might result in suprises and incorrect behavior if the different fonts involved have different GlyphOrder. Use only if you know what you are doing.

save(file, shareTables=True)[source]

Save the font to disk. Similarly to the constructor, the ‘file’ argument can be either a pathname or a writable file object.

saveXML(fileOrPath, newlinestr='\n', writeVersion=True, **kwargs)[source]