EBLC: fix padding length calculation for Format 3 IndexSubTable
Fixes #1817
This commit is contained in:
parent
39b02fd224
commit
c5dfbab521
@ -482,7 +482,7 @@ def _createOffsetArrayIndexSubTableMixin(formatStringForDataType):
|
|||||||
dataList = [EblcIndexSubTable.compile(self, ttFont)]
|
dataList = [EblcIndexSubTable.compile(self, ttFont)]
|
||||||
dataList += [struct.pack(dataFormat, offsetValue) for offsetValue in offsetArray]
|
dataList += [struct.pack(dataFormat, offsetValue) for offsetValue in offsetArray]
|
||||||
# Take care of any padding issues. Only occurs in format 3.
|
# Take care of any padding issues. Only occurs in format 3.
|
||||||
if offsetDataSize * len(dataList) % 4 != 0:
|
if offsetDataSize * len(offsetArray) % 4 != 0:
|
||||||
dataList.append(struct.pack(dataFormat, 0))
|
dataList.append(struct.pack(dataFormat, 0))
|
||||||
return bytesjoin(dataList)
|
return bytesjoin(dataList)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user