Home | History | Annotate | Download | only in tables

Lines Matching refs:table

27 	"""Generic base class for TTX table converters. It functions as an
28 adapter between the TTX (ttLib actually) table model and the model
43 self.table = tableClass()
44 self.table.decompile(reader, font)
56 """ Create a top-level OTFWriter for the GPOS/GSUB table.
57 Call the compile method for the the table
58 for each 'converter' record in the table converter list
62 - For Struct/Table/Subtable items, it add first adds new writer to the
65 each writer representing a table, and the writer.items list containing
71 Traverse the flat list of tables again, calling getData each get the data in the table, now that
85 self.table.compile(writer, font)
108 self.table.toXML2(writer, font)
112 if not hasattr(self, "table"):
114 self.table = tableClass()
115 self.table.fromXML(name, attrs, content, font)
120 """Helper class to retrieve data from an OpenType table."""
220 for table in tables:
221 table.pos = pos
222 pos = pos + table.getDataLength()
224 for table in extTables:
225 table.pos = pos
226 pos = pos + table.getDataLength()
230 for table in tables:
231 tableData = table.getData()
234 for table in extTables:
235 tableData = table.getData()
241 """Return the length of this table in bytes, without subtables."""
254 """Assemble the data for this writer/table, without subtables."""
273 # If we split the sub-table just before the current item, we may still suffer overflow.
274 # This is because duplicate table merging is done only within an Extension subTable tree;
278 def getDeepItemLength(table):
279 if hasattr(table, "getDataLength"):
281 for item in table.items:
284 length = len(table)
289 # Coverage is first in the item list, but last in the table list,
291 # table in the following test.
319 # collapse duplicate table references to a unique entry
351 # Convert table references in self.items tree to a flat
374 # add Coverage table if it is sorted last.
377 # Find coverage table
413 # interface for gathering data, as used by table.compile()
449 def writeCountReference(self, table, name):
450 ref = CountReference(table, name)
497 def __init__(self, table, name):
498 self.table = table
501 table = self.table
503 if table[name] is None:
504 table[name] = value
506 assert table[name] == value, (name, table[name], value)
508 return packUShort(self.table[self.name])
543 table = {}
544 self.__rawTable = table # for debugging
549 table["LookupType"])
552 table["ExtensionLookupType"])
557 if conv.repeat in table:
558 countValue = table[conv.repeat]
563 l.append(conv.read(reader, font, table))
564 table[conv.name] = l
566 if conv.aux and not eval(conv.aux, None, table):
568 table[conv.name] = conv.read(reader, font, table)
570 reader[conv.name] = table[conv.name]
572 self.postRead(table, font)
586 table = self.preWrite(font)
596 value = table.get(conv.name)
601 if conv.repeat in table:
602 CountReference(table, conv.repeat).setValue(countValue)
607 conv.write(writer, font, table, value[i], i)
613 # table. We will later store it here.
616 ref = writer.writeCountReference(table, conv.name)
617 table[conv.name] = None
621 ref = writer.writeCountReference(table, conv.name)
622 table[conv.name] = None
625 if conv.aux and not eval(conv.aux, None, table):
627 conv.write(writer, font, table, value)
637 def postRead(self, table, font):
638 self.__dict__.update(table)