C_F_F__2.py 425 B

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