[font] Fix design-coords

Ouch!
pull/3495/head
Behdad Esfahbod 3 years ago
parent efab763885
commit 473a5e5651
  1. 4
      src/hb-font.cc
  2. 6
      src/hb-ot-var-fvar-table.hh

@ -2387,6 +2387,10 @@ hb_font_set_variations (hb_font_t *font,
return;
}
/* Initialize design coords to default from fvar. */
for (unsigned int i = 0; i < coords_length; i++)
design_coords[i] = axes[i].get_default ();
for (unsigned int i = 0; i < variations_length; i++)
{
const auto tag = variations[i].tag;

@ -135,7 +135,6 @@ struct AxisRecord
return_trace (c->check_struct (this));
}
protected:
void get_coordinates (float &min, float &default_, float &max) const
{
default_ = defaultValue / 65536.f;
@ -144,6 +143,11 @@ struct AxisRecord
max = hb_max (default_, maxValue / 65536.f);
}
float get_default () const
{
return defaultValue / 65536.f;
}
public:
Tag axisTag; /* Tag identifying the design variation for the axis. */
protected:

Loading…
Cancel
Save