2014-01-14 15:07:50 +08:00
|
|
|
from __future__ import print_function, division, absolute_import
|
2013-11-27 17:27:45 -05:00
|
|
|
from fontTools.misc.py23 import *
|
2013-11-27 02:34:11 -05:00
|
|
|
from . import DefaultTable
|
|
|
|
from . import ttProgram
|
1999-12-16 21:34:53 +00:00
|
|
|
|
|
|
|
class table__f_p_g_m(DefaultTable.DefaultTable):
|
2015-04-26 02:01:01 -04:00
|
|
|
|
1999-12-16 21:34:53 +00:00
|
|
|
def decompile(self, data, ttFont):
|
2000-02-01 15:31:18 +00:00
|
|
|
program = ttProgram.Program()
|
|
|
|
program.fromBytecode(data)
|
|
|
|
self.program = program
|
2015-04-26 02:01:01 -04:00
|
|
|
|
1999-12-16 21:34:53 +00:00
|
|
|
def compile(self, ttFont):
|
2000-02-01 15:31:18 +00:00
|
|
|
return self.program.getBytecode()
|
2015-04-26 02:01:01 -04:00
|
|
|
|
2000-02-01 15:31:18 +00:00
|
|
|
def toXML(self, writer, ttFont):
|
|
|
|
self.program.toXML(writer, ttFont)
|
|
|
|
writer.newline()
|
2015-04-26 02:01:01 -04:00
|
|
|
|
2013-11-27 03:19:32 -05:00
|
|
|
def fromXML(self, name, attrs, content, ttFont):
|
2000-02-01 15:31:18 +00:00
|
|
|
program = ttProgram.Program()
|
2013-11-27 03:19:32 -05:00
|
|
|
program.fromXML(name, attrs, content, ttFont)
|
2000-02-01 15:31:18 +00:00
|
|
|
self.program = program
|
2015-04-26 02:01:01 -04:00
|
|
|
|
2000-02-01 15:31:18 +00:00
|
|
|
def __len__(self):
|
|
|
|
return len(self.program)
|