Home | History | Annotate | Download | only in tables
      1 from __future__ import print_function, division, absolute_import
      2 from fontTools.misc.py23 import *
      3 from . import DefaultTable
      4 from . import ttProgram
      5 
      6 class table__f_p_g_m(DefaultTable.DefaultTable):
      7 	
      8 	def decompile(self, data, ttFont):
      9 		program = ttProgram.Program()
     10 		program.fromBytecode(data)
     11 		self.program = program
     12 	
     13 	def compile(self, ttFont):
     14 		return self.program.getBytecode()
     15 	
     16 	def toXML(self, writer, ttFont):
     17 		self.program.toXML(writer, ttFont)
     18 		writer.newline()
     19 	
     20 	def fromXML(self, name, attrs, content, ttFont):
     21 		program = ttProgram.Program()
     22 		program.fromXML(name, attrs, content, ttFont)
     23 		self.program = program
     24 	
     25 	def __len__(self):
     26 		return len(self.program)
     27 
     28