Ejemplo n.º 1
0
    def overflow(self, itemName, itemRecord):
        from fontTools.otlLib.builder import buildMultipleSubstSubtable
        from fontTools.ttLib.tables.otBase import OverflowErrorRecord

        oldSubTable = buildMultipleSubstSubtable({
            'e': 1,
            'a': 2,
            'b': 3,
            'c': 4,
            'd': 5
        })
        newSubTable = otTables.MultipleSubst()

        ok = otTables.splitMultipleSubst(
            oldSubTable, newSubTable,
            OverflowErrorRecord((None, None, None, itemName, itemRecord)))

        assert ok
        return oldSubTable.mapping, newSubTable.mapping
Ejemplo n.º 2
0
def parseMultiple(lines, font, _lookupMap=None):
	mapping = {}
	for line in lines:
		line = makeGlyphs(line)
		mapping[line[0]] = line[1:]
	return otl.buildMultipleSubstSubtable(mapping)
Ejemplo n.º 3
0
 def build(self):
     subtable = otl.buildMultipleSubstSubtable(self.mapping)
     return self.buildLookup_([subtable])
Ejemplo n.º 4
0
def parseMultiple(lines, font, _lookupMap=None):
	mapping = {}
	for line in lines:
		line = makeGlyphs(line)
		mapping[line[0]] = line[1:]
	return otl.buildMultipleSubstSubtable(mapping)
Ejemplo n.º 5
0
 def build(self):
     subtable = otl.buildMultipleSubstSubtable(self.mapping)
     return self.buildLookup_([subtable])