[varStore] Another fix and test

This commit is contained in:
Behdad Esfahbod 2023-05-24 16:34:15 -06:00
parent ab510d1e7b
commit aeaf98a438
2 changed files with 23 additions and 2 deletions

View File

@ -382,7 +382,7 @@ class _Encoding(object):
"""Maximum possible byte gain from merging this into another
characteristic."""
count = len(self.items)
return max(0, self.overhead - count * (self.width + 1))
return max(0, self.overhead - count)
def sort_key(self):
return self.width, self.chars

View File

@ -135,8 +135,29 @@ def buildAxis(axisTag):
[10, 303, 0, 0, 20],
[10, 304, 0, 0, 20],
],
1,
200,
),
(
5,
[
[0, 11, 12, 0, 20],
[0, 13, 12, 0, 20],
[0, 14, 12, 0, 20],
[0, 15, 12, 0, 20],
[0, 16, 12, 0, 20],
[0, 17, 12, 0, 20],
[0, 18, 12, 0, 20],
[0, 19, 12, 0, 20],
[0, 20, 12, 0, 20],
[10, 300, 0, 0, 20],
[10, 301, 0, 0, 20],
[10, 302, 0, 0, 20],
[10, 303, 0, 0, 20],
[10, 304, 0, 0, 20],
],
2,
206,
218,
),
(
3,