[varLib.avar] Add peakLocation as well, oops
This commit is contained in:
parent
0127a235af
commit
e606adfffe
@ -36,14 +36,14 @@ def mappings_from_avar(font, denormalize=True):
|
|||||||
for varData in varStore.VarData:
|
for varData in varStore.VarData:
|
||||||
regionIndices = varData.VarRegionIndex
|
regionIndices = varData.VarRegionIndex
|
||||||
for regionIndex in regionIndices:
|
for regionIndex in regionIndices:
|
||||||
peakLocation = {}
|
peakLocation = []
|
||||||
corners = []
|
corners = []
|
||||||
region = regions[regionIndex]
|
region = regions[regionIndex]
|
||||||
for axisIndex, axis in enumerate(region.VarRegionAxis):
|
for axisIndex, axis in enumerate(region.VarRegionAxis):
|
||||||
if axis.PeakCoord == 0:
|
if axis.PeakCoord == 0:
|
||||||
continue
|
continue
|
||||||
axisTag = axisTags[axisIndex]
|
axisTag = axisTags[axisIndex]
|
||||||
peakLocation[axisTag] = axis.PeakCoord
|
peakLocation.append((axisTag, axis.PeakCoord))
|
||||||
corner = []
|
corner = []
|
||||||
if axis.StartCoord != 0:
|
if axis.StartCoord != 0:
|
||||||
corner.append((axisTag, axis.StartCoord))
|
corner.append((axisTag, axis.StartCoord))
|
||||||
@ -51,6 +51,7 @@ def mappings_from_avar(font, denormalize=True):
|
|||||||
corner.append((axisTag, axis.EndCoord))
|
corner.append((axisTag, axis.EndCoord))
|
||||||
corners.append(corner)
|
corners.append(corner)
|
||||||
corners = set(product(*corners))
|
corners = set(product(*corners))
|
||||||
|
inputLocations.add(tuple(peakLocation))
|
||||||
inputLocations.update(corners)
|
inputLocations.update(corners)
|
||||||
|
|
||||||
inputLocations = [
|
inputLocations = [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user