renamed LiteralCount to StaticCount
makes it clearer what it is
This commit is contained in:
parent
141ff20b37
commit
e8f5bbcc6a
@ -498,7 +498,7 @@ class OTTableWriter(object):
|
|||||||
return OverflowErrorRecord( (self.tableTag, LookupListIndex, SubTableIndex, itemName, itemIndex) )
|
return OverflowErrorRecord( (self.tableTag, LookupListIndex, SubTableIndex, itemName, itemIndex) )
|
||||||
|
|
||||||
|
|
||||||
class LiteralCount(int):
|
class StaticCount(int):
|
||||||
"""A count value that should be taken literally, rather than recomputed on compile."""
|
"""A count value that should be taken literally, rather than recomputed on compile."""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@ -695,9 +695,9 @@ class BaseTable(object):
|
|||||||
# table. We will later store it here.
|
# table. We will later store it here.
|
||||||
# We add a reference: by the time the data is assembled
|
# We add a reference: by the time the data is assembled
|
||||||
# the Count value will be filled in.
|
# the Count value will be filled in.
|
||||||
if not isinstance(value, LiteralCount):
|
if not isinstance(value, StaticCount):
|
||||||
# we ignore the current count value since it's being recomputed,
|
# we ignore the current count value since it's being recomputed,
|
||||||
# unless this is a LiteralCount, which is assumed to be already correct.
|
# unless this is of type StaticCount, which is assumed to be correct.
|
||||||
value = None
|
value = None
|
||||||
ref = writer.writeCountReference(table, conv.name, conv.staticSize, value)
|
ref = writer.writeCountReference(table, conv.name, conv.staticSize, value)
|
||||||
table[conv.name] = value
|
table[conv.name] = value
|
||||||
|
@ -7,7 +7,7 @@ converter objects from otConverters.py.
|
|||||||
"""
|
"""
|
||||||
from fontTools.misc.py23 import *
|
from fontTools.misc.py23 import *
|
||||||
from fontTools.misc.textTools import pad, safeEval
|
from fontTools.misc.textTools import pad, safeEval
|
||||||
from .otBase import BaseTable, FormatSwitchingBaseTable, ValueRecord, LiteralCount
|
from .otBase import BaseTable, FormatSwitchingBaseTable, ValueRecord, StaticCount
|
||||||
import logging
|
import logging
|
||||||
import struct
|
import struct
|
||||||
|
|
||||||
@ -699,7 +699,7 @@ class VarRegionList(BaseTable):
|
|||||||
# https://github.com/khaledhosny/ots/pull/192
|
# https://github.com/khaledhosny/ots/pull/192
|
||||||
fvarTable = font.get("fvar")
|
fvarTable = font.get("fvar")
|
||||||
if fvarTable:
|
if fvarTable:
|
||||||
self.RegionAxisCount = LiteralCount(len(fvarTable.axes))
|
self.RegionAxisCount = StaticCount(len(fvarTable.axes))
|
||||||
return self.__dict__.copy()
|
return self.__dict__.copy()
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user