S__i_l_f.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:otRebuilder 作者: Pal3love 项目源码 文件源码
def fromXML(self, name, attrs, content, ttFont, version=2.0):
        if name == 'linearClasses':
            for element in content:
                if not isinstance(element, tuple): continue
                tag, attrs, subcontent = element
                if tag == 'linear':
                    l = content_string(subcontent).split()
                    self.linear.append(l)
        elif name == 'nonLinearClasses':
            for element in content:
                if not isinstance(element, tuple): continue
                tag, attrs, subcontent = element
                if tag =='nonLinear':
                    l = {}
                    for e in subcontent:
                        if not isinstance(e, tuple): continue
                        tag, attrs, subsubcontent = e
                        if tag == 'map':
                            l[attrs['glyph']] = int(safeEval(attrs['index']))
                    self.nonLinear.append(l)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号