This commit is contained in:
Behdad Esfahbod 2016-12-30 19:18:15 -05:00
parent 36adb92f58
commit a0019a3e75

View File

@ -618,7 +618,7 @@ class ClassDefBuilder(object):
# we should determine the encoded size. If the glyphs in a large
# class form a contiguous range, the encoding is actually quite
# compact, whereas a non-contiguous set might need a lot of bytes
# in the output file. We don't get this right with key=len below.
# in the output file. We don't get this right with the key below.
result = sorted(self.classes_, key=lambda s: (len(s), s), reverse=True)
if not self.useClass0_:
result.insert(0, frozenset())