otConverters

fontTools.ttLib.tables.otConverters.buildConverters(tableSpec, tableNamespace)

Given a table spec from otData.py, build a converter object for each field of the table. This is called for each table in otData.py, and the results are assigned to the corresponding class in otTables.py.

class fontTools.ttLib.tables.otConverters.BaseConverter(name, repeat, repeatOffset, tableClass)

Base class for converter objects. Apart from the constructor, this is an abstract class.

read(reader, font, tableStack)

Read a value from the reader.

write(writer, font, tableStack, value, repeatIndex=None)

Write a value to the writer.

xmlRead(attrs, content, font)

Read a value from XML.

xmlWrite(xmlWriter, font, value, name, attrs)

Write a value to XML.

class fontTools.ttLib.tables.otConverters.SimpleValue(name, repeat, repeatOffset, tableClass)

Bases: fontTools.ttLib.tables.otConverters.BaseConverter

xmlWrite(xmlWriter, font, value, name, attrs)
xmlRead(attrs, content, font)
class fontTools.ttLib.tables.otConverters.IntValue(name, repeat, repeatOffset, tableClass)

Bases: fontTools.ttLib.tables.otConverters.SimpleValue

xmlRead(attrs, content, font)
class fontTools.ttLib.tables.otConverters.Long(name, repeat, repeatOffset, tableClass)

Bases: fontTools.ttLib.tables.otConverters.IntValue

read(reader, font, tableStack)
write(writer, font, tableStack, value, repeatIndex=None)
class fontTools.ttLib.tables.otConverters.Fixed(name, repeat, repeatOffset, tableClass)

Bases: fontTools.ttLib.tables.otConverters.IntValue

read(reader, font, tableStack)
write(writer, font, tableStack, value, repeatIndex=None)
xmlRead(attrs, content, font)
class fontTools.ttLib.tables.otConverters.Short(name, repeat, repeatOffset, tableClass)

Bases: fontTools.ttLib.tables.otConverters.IntValue

read(reader, font, tableStack)
write(writer, font, tableStack, value, repeatIndex=None)
class fontTools.ttLib.tables.otConverters.UShort(name, repeat, repeatOffset, tableClass)

Bases: fontTools.ttLib.tables.otConverters.IntValue

read(reader, font, tableStack)
write(writer, font, tableStack, value, repeatIndex=None)
class fontTools.ttLib.tables.otConverters.Count(name, repeat, repeatOffset, tableClass)

Bases: fontTools.ttLib.tables.otConverters.Short

xmlWrite(xmlWriter, font, value, name, attrs)
class fontTools.ttLib.tables.otConverters.Tag(name, repeat, repeatOffset, tableClass)

Bases: fontTools.ttLib.tables.otConverters.SimpleValue

read(reader, font, tableStack)
write(writer, font, tableStack, value, repeatIndex=None)
class fontTools.ttLib.tables.otConverters.GlyphID(name, repeat, repeatOffset, tableClass)

Bases: fontTools.ttLib.tables.otConverters.SimpleValue

read(reader, font, tableStack)
write(writer, font, tableStack, value, repeatIndex=None)
class fontTools.ttLib.tables.otConverters.Struct(name, repeat, repeatOffset, tableClass)

Bases: fontTools.ttLib.tables.otConverters.BaseConverter

read(reader, font, tableStack)
write(writer, font, tableStack, value, repeatIndex=None)
xmlWrite(xmlWriter, font, value, name, attrs)
xmlRead(attrs, content, font)
class fontTools.ttLib.tables.otConverters.Table(name, repeat, repeatOffset, tableClass)

Bases: fontTools.ttLib.tables.otConverters.Struct

read(reader, font, tableStack)
write(writer, font, tableStack, value, repeatIndex=None)
class fontTools.ttLib.tables.otConverters.SubTable(name, repeat, repeatOffset, tableClass)

Bases: fontTools.ttLib.tables.otConverters.Table

getConverter(tableType, lookupType)
class fontTools.ttLib.tables.otConverters.ExtSubTable(name, repeat, repeatOffset, tableClass)

Bases: fontTools.ttLib.tables.otConverters.Table

getConverter(tableType, lookupType)
read(reader, font, tableStack)
write(writer, font, tableStack, value, repeatIndex=None)
class fontTools.ttLib.tables.otConverters.ValueFormat(name, repeat, repeatOffset, tableClass)

Bases: fontTools.ttLib.tables.otConverters.IntValue

read(reader, font, tableStack)
write(writer, font, tableStack, format, repeatIndex=None)
class fontTools.ttLib.tables.otConverters.ValueRecord(name, repeat, repeatOffset, tableClass)

Bases: fontTools.ttLib.tables.otConverters.ValueFormat

read(reader, font, tableStack)
write(writer, font, tableStack, value, repeatIndex=None)
xmlWrite(xmlWriter, font, value, name, attrs)
xmlRead(attrs, content, font)
class fontTools.ttLib.tables.otConverters.DeltaValue(name, repeat, repeatOffset, tableClass)

Bases: fontTools.ttLib.tables.otConverters.BaseConverter

read(reader, font, tableStack)
write(writer, font, tableStack, value, repeatIndex=None)
xmlWrite(xmlWriter, font, value, name, attrs)
xmlRead(attrs, content, font)