[varLib] Towards sharing merge logic of MarkBasePos for MarkMarkPos
This commit is contained in:
parent
babc6d878a
commit
dfff5134e5
@ -533,8 +533,8 @@ def _MarkBasePosFormat1_merge(self, lst, merger):
|
|||||||
[l.BaseArray.BaseRecord for l in lst])
|
[l.BaseArray.BaseRecord for l in lst])
|
||||||
|
|
||||||
# MarkArray
|
# MarkArray
|
||||||
self.MarkArray = ot.MarkArray()
|
self.MarkArray = array = ot.MarkArray()
|
||||||
self.MarkArray.MarkRecord = records = []
|
array.MarkRecord = records = []
|
||||||
for g,glyphRecords in zip(self.MarkCoverage.glyphs, zip(*MarkRecords)):
|
for g,glyphRecords in zip(self.MarkCoverage.glyphs, zip(*MarkRecords)):
|
||||||
allClasses = [r.Class for r in glyphRecords if r is not None]
|
allClasses = [r.Class for r in glyphRecords if r is not None]
|
||||||
|
|
||||||
@ -565,11 +565,11 @@ def _MarkBasePosFormat1_merge(self, lst, merger):
|
|||||||
merger.mergeThings(anchor,
|
merger.mergeThings(anchor,
|
||||||
[None if r is None else r.MarkAnchor for r in glyphRecords])
|
[None if r is None else r.MarkAnchor for r in glyphRecords])
|
||||||
records.append(rec)
|
records.append(rec)
|
||||||
self.MarkArray.MarkCount = len(self.MarkArray.MarkRecord)
|
array.MarkCount = len(array.MarkRecord)
|
||||||
|
|
||||||
# BaseArray
|
# BaseArray
|
||||||
self.BaseArray = ot.BaseArray()
|
self.BaseArray = array = ot.BaseArray()
|
||||||
self.BaseArray.BaseRecord = records = []
|
array.BaseRecord = records = []
|
||||||
for g,glyphRecords in zip(self.BaseCoverage.glyphs, zip(*BaseRecords)):
|
for g,glyphRecords in zip(self.BaseCoverage.glyphs, zip(*BaseRecords)):
|
||||||
if allSameAs(None, glyphRecords):
|
if allSameAs(None, glyphRecords):
|
||||||
rec = None
|
rec = None
|
||||||
@ -588,7 +588,7 @@ def _MarkBasePosFormat1_merge(self, lst, merger):
|
|||||||
merger.mergeThings(anchor, allAnchors)
|
merger.mergeThings(anchor, allAnchors)
|
||||||
anchors.append(anchor)
|
anchors.append(anchor)
|
||||||
records.append(rec)
|
records.append(rec)
|
||||||
self.BaseArray.BaseCount = len(self.BaseArray.BaseRecord)
|
array.BaseCount = len(array.BaseRecord)
|
||||||
|
|
||||||
@AligningMerger.merger(ot.MarkBasePos)
|
@AligningMerger.merger(ot.MarkBasePos)
|
||||||
def merge(merger, self, lst):
|
def merge(merger, self, lst):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user