[ot] Fix VariationStore evaluation algorithm
Ouch! Missing coords should still be evaluated as coord=0, which most of the time results in a factor of 0. We were skipping these, which was equivalent to a factor of 1. Fixes https://github.com/harfbuzz/harfbuzz/issues/652
This commit is contained in:
parent
a3afdd1e08
commit
54b2b93722
|
@ -1275,10 +1275,11 @@ struct VarRegionList
|
||||||
const VarRegionAxis *axes = axesZ + (region_index * axisCount);
|
const VarRegionAxis *axes = axesZ + (region_index * axisCount);
|
||||||
|
|
||||||
float v = 1.;
|
float v = 1.;
|
||||||
unsigned int count = MIN (coord_len, (unsigned int) axisCount);
|
unsigned int count = axisCount;
|
||||||
for (unsigned int i = 0; i < count; i++)
|
for (unsigned int i = 0; i < count; i++)
|
||||||
{
|
{
|
||||||
float factor = axes[i].evaluate (coords[i]);
|
int coord = i < coord_len ? coords[i] : 0;
|
||||||
|
float factor = axes[i].evaluate (coord);
|
||||||
if (factor == 0.)
|
if (factor == 0.)
|
||||||
return 0.;
|
return 0.;
|
||||||
v *= factor;
|
v *= factor;
|
||||||
|
|
Loading…
Reference in New Issue