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
评论列表
文章目录