[subset] update the test file for composite, fix an offset calculation
This commit is contained in:
parent
c8b230e437
commit
ffcb5cbf71
|
@ -412,7 +412,7 @@ struct glyf
|
||||||
} while (composite_it.move_to_next());
|
} while (composite_it.move_to_next());
|
||||||
|
|
||||||
if ( (uint16_t) last->flags & CompositeGlyphHeader::WE_HAVE_INSTRUCTIONS)
|
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
|
else
|
||||||
*instruction_start = end_offset;
|
*instruction_start = end_offset;
|
||||||
*instruction_end = end_offset;
|
*instruction_end = end_offset;
|
||||||
|
|
Binary file not shown.
|
@ -143,12 +143,11 @@ test_subset_glyf_strip_hints_simple (void)
|
||||||
hb_face_destroy (face_ac);
|
hb_face_destroy (face_ac);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO(rsheeter): test strip hints from composite
|
|
||||||
static void
|
static void
|
||||||
test_subset_glyf_strip_hints_composite (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_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_t *codepoints = hb_set_create();
|
||||||
hb_set_add (codepoints, 0x1fc);
|
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 ('g','l','y','f'));
|
||||||
hb_subset_test_check (face_subset, face_generated_subset, HB_TAG ('l','o','c', 'a'));
|
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_generated_subset);
|
||||||
hb_face_destroy (face_subset);
|
hb_face_destroy (face_subset);
|
||||||
|
|
Loading…
Reference in New Issue