1from __future__ import print_function, division, absolute_import 2from fontTools.misc.py23 import * 3from fontTools import cffLib 4from fontTools.ttLib.tables.C_F_F_ import table_C_F_F_ 5 6 7class table_C_F_F__2(table_C_F_F_): 8 9 def decompile(self, data, otFont): 10 self.cff.decompile(BytesIO(data), otFont, isCFF2=True) 11 assert len(self.cff) == 1, "can't deal with multi-font CFF tables." 12 13 def compile(self, otFont): 14 f = BytesIO() 15 self.cff.compile(f, otFont, isCFF2=True) 16 return f.getvalue() 17