[designspaceLib/avar2] Warn if input location missing for an output axis
https://github.com/fonttools/fonttools/pull/3123#issuecomment-1568852694
This commit is contained in:
parent
588cbc982d
commit
246d539e29
@ -215,6 +215,8 @@ def _add_avar(font, axes, mappings, axisTags):
|
|||||||
if mappings:
|
if mappings:
|
||||||
interesting = True
|
interesting = True
|
||||||
|
|
||||||
|
hiddenAxes = [axis for axis in axes.values() if axis.hidden]
|
||||||
|
|
||||||
inputLocations = [
|
inputLocations = [
|
||||||
{
|
{
|
||||||
axes[name].tag: models.normalizeValue(v, vals_triples[axes[name].tag])
|
axes[name].tag: models.normalizeValue(v, vals_triples[axes[name].tag])
|
||||||
@ -240,6 +242,12 @@ def _add_avar(font, axes, mappings, axisTags):
|
|||||||
if t not in vo:
|
if t not in vo:
|
||||||
masterValues.append(0)
|
masterValues.append(0)
|
||||||
continue
|
continue
|
||||||
|
if t not in vi and t not in hiddenAxes:
|
||||||
|
log.warning(
|
||||||
|
"No input location specified for non-hidden axis '%s' in axis mapping %s",
|
||||||
|
t,
|
||||||
|
vi,
|
||||||
|
)
|
||||||
v = vo[t] - vi.get(t, 0)
|
v = vo[t] - vi.get(t, 0)
|
||||||
masterValues.append(fl2fi(v, 14))
|
masterValues.append(fl2fi(v, 14))
|
||||||
varIdxes[t] = builder.storeMasters(masterValues)[1]
|
varIdxes[t] = builder.storeMasters(masterValues)[1]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user