def __init__(self, ttFont):
        self.ttFont = ttFont
        self.cmap = getBestCmap(ttFont)
        axes = []
        fvar = self.ttFont["fvar"]
        for a in fvar.axes:
            nameRecord = self.ttFont["name"].getName(a.axisNameID, 3, 1)
            if nameRecord is None:
                nameRecord = self.ttFont["name"].getName(a.axisNameID, 1, 0)
            name = nameRecord.toUnicode()
            axes.append(Axis(name, a.minValue, a.defaultValue, a.maxValue, a.axisTag))

        super(TTVarFontDesignSpace, self).__init__(axes)
        self.glyphSet = TTVarFontGlyphSet(ttFont)
예제 #2
0
 def charSet(self):
     cmap = getBestCmap(self.ttFont)
     return sorted(cmap.keys())