Example #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
Example #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)
Example #3
0
 def build(self):
     subtable = otl.buildMultipleSubstSubtable(self.mapping)
     return self.buildLookup_([subtable])
Example #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)
Example #5
0
 def build(self):
     subtable = otl.buildMultipleSubstSubtable(self.mapping)
     return self.buildLookup_([subtable])