[layout] Add tests for baseline 2 APIs

This commit is contained in:
Khaled Hosny 2023-05-21 19:01:04 +03:00
parent e047b1abbc
commit 0d354e0442

View file

@ -41,6 +41,12 @@ test_ot_layout_base (void)
&position));
g_assert_cmpint (46, ==, position);
g_assert (hb_ot_layout_get_baseline2 (font, HB_OT_LAYOUT_BASELINE_TAG_IDEO_FACE_BOTTOM_OR_LEFT, HB_DIRECTION_TTB,
HB_SCRIPT_HAN,
hb_language_from_string ("en", -1),
&position));
g_assert_cmpint (46, ==, position);
g_assert (!hb_ot_layout_get_baseline (font, HB_OT_LAYOUT_BASELINE_TAG_IDEO_EMBOX_TOP_OR_RIGHT, HB_DIRECTION_TTB,
HB_TAG ('h','a','n','i'),
HB_TAG ('E','N','G',' '),
@ -63,6 +69,12 @@ test_ot_layout_base_with_fallback (void)
&position);
g_assert_cmpint (46, ==, position);
hb_ot_layout_get_baseline_with_fallback2 (font, HB_OT_LAYOUT_BASELINE_TAG_IDEO_FACE_BOTTOM_OR_LEFT, HB_DIRECTION_TTB,
HB_SCRIPT_HAN,
hb_language_from_string ("en", -1),
&position);
g_assert_cmpint (46, ==, position);
hb_ot_layout_get_baseline_with_fallback (font, HB_OT_LAYOUT_BASELINE_TAG_IDEO_EMBOX_TOP_OR_RIGHT, HB_DIRECTION_TTB,
HB_TAG ('h','a','n','i'),
HB_TAG ('E','N','G',' '),