提交 ffcb5cbf 编写于 作者: R Rod Sheeter

[subset] update the test file for composite, fix an offset calculation

上级 c8b230e4
......@@ -412,7 +412,7 @@ struct glyf
} while (composite_it.move_to_next());
if ( (uint16_t) last->flags & CompositeGlyphHeader::WE_HAVE_INSTRUCTIONS)
*instruction_start = start_offset + ((char *) last - (char *) glyf_table->dataX) + last->get_size();
*instruction_start = ((char *) last - (char *) glyf_table->dataX) + last->get_size();
else
*instruction_start = end_offset;
*instruction_end = end_offset;
......
......@@ -143,12 +143,11 @@ test_subset_glyf_strip_hints_simple (void)
hb_face_destroy (face_ac);
}
// TODO(rsheeter): test strip hints from composite
static void
test_subset_glyf_strip_hints_composite (void)
{
hb_face_t *face_components = hb_subset_test_open_font ("fonts/Roboto-Regular.components.ttf");
hb_face_t *face_subset = hb_subset_test_open_font ("fonts/Roboto-Regular.components.subset.ttf");
hb_face_t *face_subset = hb_subset_test_open_font ("fonts/Roboto-Regular.components.1fc.nohints.ttf");
hb_set_t *codepoints = hb_set_create();
hb_set_add (codepoints, 0x1fc);
......@@ -160,7 +159,7 @@ test_subset_glyf_strip_hints_composite (void)
hb_subset_test_check (face_subset, face_generated_subset, HB_TAG ('g','l','y','f'));
hb_subset_test_check (face_subset, face_generated_subset, HB_TAG ('l','o','c', 'a'));
check_maxp_num_glyphs(face_generated_subset, 4);
check_maxp_num_glyphs(face_generated_subset, 4, false);
hb_face_destroy (face_generated_subset);
hb_face_destroy (face_subset);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册