added flex extents test
This commit is contained in:
parent
8679d02b4b
commit
e555ed961e
Binary file not shown.
|
@ -91,6 +91,28 @@ test_extents_cff1_legacyops (void)
|
|||
hb_font_destroy (font);
|
||||
}
|
||||
|
||||
static void
|
||||
test_extents_cff1_flex (void)
|
||||
{
|
||||
hb_face_t *face = hb_subset_test_open_font ("fonts/cff1_flex.otf");
|
||||
g_assert (face);
|
||||
hb_font_t *font = hb_font_create (face);
|
||||
hb_face_destroy (face);
|
||||
g_assert (font);
|
||||
hb_ot_font_set_funcs (font);
|
||||
|
||||
hb_glyph_extents_t extents;
|
||||
hb_bool_t result = hb_font_get_glyph_extents (font, 1, &extents);
|
||||
g_assert (result);
|
||||
|
||||
g_assert_cmpint (extents.x_bearing, ==, -20);
|
||||
g_assert_cmpint (extents.y_bearing, ==, 520);
|
||||
g_assert_cmpint (extents.width, ==, 540);
|
||||
g_assert_cmpint (extents.height, ==, -540);
|
||||
|
||||
hb_font_destroy (font);
|
||||
}
|
||||
|
||||
static void
|
||||
test_extents_cff2 (void)
|
||||
{
|
||||
|
@ -162,6 +184,7 @@ main (int argc, char **argv)
|
|||
|
||||
hb_test_add (test_extents_cff1);
|
||||
hb_test_add (test_extents_cff1_legacyops);
|
||||
hb_test_add (test_extents_cff1_flex);
|
||||
hb_test_add (test_extents_cff2);
|
||||
hb_test_add (test_extents_cff2_vsindex);
|
||||
|
||||
|
|
Loading…
Reference in New Issue