fontreport.py 文件源码

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

项目:fontreport 作者: googlei18n 项目源码 文件源码
def XetexBody(self):
    data = ''
    uni = {}
    for code, name in self.font.chars.items():
      if name not in uni:
        uni[name] = []
      uni[name].append(code)
    for glyph in self.font.glyphs:
      if glyph.class_name:
        data += '\\rowcolor{%s}\n' % glyph.class_name
      if glyph.name in uni:
        chars = ', '.join('u%04X' % x for x in glyph.chars)
      else:
        chars = ''
      data += '%d & %s & %s & %d & %d & %d & %s\\\\\n' % (
          glyph.index, TexGlyph(glyph), TexEscape(glyph.name),
          glyph.advance_width, glyph.lsb, glyph.class_def, chars)
    return data
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号