switch ((unsigned int) metrics_tag)
{
#ifndef HB_NO_VAR
-#define GET_VAR face->table.MVAR->get_var (metrics_tag, nullptr, 0)
+#define GET_VAR face->table.MVAR->get_var (metrics_tag, font->coords, font->num_coords)
#else
#define GET_VAR .0f
#endif
{
const OT::GaspRange& range = face->table.gasp->get_gasp_range (metrics_tag - HB_TAG ('g','s','p','0'));
if (&range == &Null (OT::GaspRange)) return false;
- if (result) *result = range.rangeMaxPPEM + face->table.MVAR->get_var (metrics_tag, nullptr, 0);
+ if (result) *result = range.rangeMaxPPEM + font->face->table.MVAR->get_var (metrics_tag, font->coords, font->num_coords);
return true;
}
#endif
case HB_OT_METRICS_VERTICAL_DESCENDER:
case HB_OT_METRICS_VERTICAL_LINE_GAP: return _hb_ot_metrics_get_position_common (font, metrics_tag, position);
#ifndef HB_NO_VAR
-#define GET_VAR hb_ot_metrics_get_variation (face, metrics_tag)
+#define GET_VAR hb_ot_metrics_get_variation (font, metrics_tag)
#else
#define GET_VAR 0
#endif
#ifndef HB_NO_VAR
/**
* hb_ot_metrics_get_variation:
- * @face:
+ * @font:
* @metrics_tag:
*
* Returns:
* Since: REPLACEME
**/
float
-hb_ot_metrics_get_variation (hb_face_t *face, hb_ot_metrics_t metrics_tag)
+hb_ot_metrics_get_variation (hb_font_t *font, hb_ot_metrics_t metrics_tag)
{
- return face->table.MVAR->get_var (metrics_tag, nullptr, 0);
+ return font->face->table.MVAR->get_var (metrics_tag, font->coords, font->num_coords);
}
/**
hb_position_t
hb_ot_metrics_get_x_variation (hb_font_t *font, hb_ot_metrics_t metrics_tag)
{
- return font->em_scalef_x (hb_ot_metrics_get_variation (font->face, metrics_tag));
+ return font->em_scalef_x (hb_ot_metrics_get_variation (font, metrics_tag));
}
/**
hb_position_t
hb_ot_metrics_get_y_variation (hb_font_t *font, hb_ot_metrics_t metrics_tag)
{
- return font->em_scalef_y (hb_ot_metrics_get_variation (font->face, metrics_tag));
+ return font->em_scalef_y (hb_ot_metrics_get_variation (font, metrics_tag));
}
#endif
g_assert_cmpint (value, ==, 1000);
g_assert_cmpint (hb_ot_metrics_get_x_variation (font, HB_OT_METRICS_HORIZONTAL_ASCENDER), ==, 0);
g_assert_cmpint (hb_ot_metrics_get_y_variation (font, HB_OT_METRICS_HORIZONTAL_ASCENDER), ==, 0);
- // g_assert_cmpint ((int) hb_ot_metrics_get_variation (face, HB_OT_METRICS_HORIZONTAL_ASCENDER), ==, 0);
+ // g_assert_cmpint ((int) hb_ot_metrics_get_variation (font, HB_OT_METRICS_HORIZONTAL_ASCENDER), ==, 0);
hb_font_destroy (font);
hb_face_destroy (face);
}