2013-11-27 02:34:11 -05:00
|
|
|
from . import DefaultTable
|
1999-12-16 21:34:53 +00:00
|
|
|
import array
|
2013-11-27 02:34:11 -05:00
|
|
|
from . import ttProgram
|
1999-12-16 21:34:53 +00:00
|
|
|
|
|
|
|
class table__f_p_g_m(DefaultTable.DefaultTable):
|
|
|
|
|
|
|
|
def decompile(self, data, ttFont):
|
2000-02-01 15:31:18 +00:00
|
|
|
program = ttProgram.Program()
|
|
|
|
program.fromBytecode(data)
|
|
|
|
self.program = program
|
1999-12-16 21:34:53 +00:00
|
|
|
|
|
|
|
def compile(self, ttFont):
|
2000-02-01 15:31:18 +00:00
|
|
|
return self.program.getBytecode()
|
1999-12-16 21:34:53 +00:00
|
|
|
|
2000-02-01 15:31:18 +00:00
|
|
|
def toXML(self, writer, ttFont):
|
|
|
|
self.program.toXML(writer, ttFont)
|
|
|
|
writer.newline()
|
|
|
|
|
|
|
|
def fromXML(self, (name, attrs, content), ttFont):
|
|
|
|
program = ttProgram.Program()
|
|
|
|
program.fromXML((name, attrs, content), ttFont)
|
|
|
|
self.program = program
|
1999-12-16 21:34:53 +00:00
|
|
|
|
2000-02-01 15:31:18 +00:00
|
|
|
def __len__(self):
|
|
|
|
return len(self.program)
|
|
|
|
|