Revert "[varfonts] Use fvar data even if there's no variation in it"
This reverts commit 57764e3a36449da25bb829c34cb08c54e9e5de90. For regular font pattern we don't look into fvar, so it doesn't make sense to get non-variation from it either.
This commit is contained in:
parent
7e1b84100d
commit
5ee9c38df7
|
@ -1255,7 +1255,7 @@ FcFreeTypeQueryFace (const FT_Face face,
|
||||||
double max_value = master->axis[i].maximum / (double) (1 << 16);
|
double max_value = master->axis[i].maximum / (double) (1 << 16);
|
||||||
const char *elt = NULL;
|
const char *elt = NULL;
|
||||||
|
|
||||||
if (min_value > def_value || def_value > max_value)
|
if (min_value > def_value || def_value > max_value || min_value == max_value)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
switch (master->axis[i].tag)
|
switch (master->axis[i].tag)
|
||||||
|
@ -1264,32 +1264,25 @@ FcFreeTypeQueryFace (const FT_Face face,
|
||||||
elt = FC_WEIGHT;
|
elt = FC_WEIGHT;
|
||||||
min_value = FcWeightFromOpenType (min_value);
|
min_value = FcWeightFromOpenType (min_value);
|
||||||
max_value = FcWeightFromOpenType (max_value);
|
max_value = FcWeightFromOpenType (max_value);
|
||||||
variable_weight = FcTrue;
|
variable = variable_weight = FcTrue;
|
||||||
weight = 0; /* To stop looking for weight. */
|
weight = 0; /* To stop looking for weight. */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FT_MAKE_TAG ('w','d','t','h'):
|
case FT_MAKE_TAG ('w','d','t','h'):
|
||||||
elt = FC_WIDTH;
|
elt = FC_WIDTH;
|
||||||
/* Values in 'wdth' match Fontconfig FC_WIDTH_* scheme directly. */
|
/* Values in 'wdth' match Fontconfig FC_WIDTH_* scheme directly. */
|
||||||
variable_width = FcTrue;
|
variable = variable_width = FcTrue;
|
||||||
width = 0; /* To stop looking for width. */
|
width = 0; /* To stop looking for width. */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FT_MAKE_TAG ('o','p','s','z'):
|
case FT_MAKE_TAG ('o','p','s','z'):
|
||||||
elt = FC_SIZE;
|
elt = FC_SIZE;
|
||||||
/* Values in 'opsz' match Fontconfig FC_SIZE, both are in points. */
|
/* Values in 'opsz' match Fontconfig FC_SIZE, both are in points. */
|
||||||
variable_size = FcTrue;
|
variable = variable_size = FcTrue;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (elt)
|
if (elt)
|
||||||
{
|
|
||||||
if (min_value == max_value)
|
|
||||||
{
|
|
||||||
if (!FcPatternAddDouble (pat, elt, min_value))
|
|
||||||
goto bail1;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
FcRange *r = FcRangeCreateDouble (min_value, max_value);
|
FcRange *r = FcRangeCreateDouble (min_value, max_value);
|
||||||
if (!FcPatternAddRange (pat, elt, r))
|
if (!FcPatternAddRange (pat, elt, r))
|
||||||
|
@ -1298,8 +1291,6 @@ FcFreeTypeQueryFace (const FT_Face face,
|
||||||
goto bail1;
|
goto bail1;
|
||||||
}
|
}
|
||||||
FcRangeDestroy (r);
|
FcRangeDestroy (r);
|
||||||
variable = FcTrue;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue