[baseline] Fix HB_NO_METRICS build

Fixes https://github.com/harfbuzz/harfbuzz/issues/3482
This commit is contained in:
Behdad Esfahbod 2022-03-15 10:49:29 -06:00
parent a8a89b80b4
commit cad2fe8e63
1 changed files with 3 additions and 1 deletions

View File

@ -2115,8 +2115,10 @@ hb_ot_layout_get_baseline_with_fallback (hb_font_t *font,
}
else
{
hb_position_t x_height = 0;
hb_position_t x_height = font->y_scale / 2;
#ifndef HB_NO_METRICS
hb_ot_metrics_get_position_with_fallback (font, HB_OT_METRICS_TAG_X_HEIGHT, &x_height);
#endif
*coord = x_height / 2;
}
}