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