Ejemplo n.º 1
0
def buildAttachPoint(points):
    """[4, 23, 41] --> otTables.AttachPoint"""
    if not points:
        return None
    self = ot.AttachPoint()
    self.PointIndex = sorted(set(points))
    self.PointCount = len(self.PointIndex)
    return self
Ejemplo n.º 2
0
def makeAttachList(points, font):
	self = ot.AttachList()
	self.Coverage = makeCoverage(points.keys(), font)
	records = []
	for glyph in self.Coverage.glyphs:
		record = ot.AttachPoint()
		record.PointIndex = sorted(set(points[glyph]))
		record.PointCount = len(record.PointIndex)
		records.append(record)
	self.AttachPoint = records
	self.GlyphCount = len(records)
	return self