提交 b67a7c73 编写于 作者: M Michiharu Ariza

drop dotsection as hint along with test case

上级 072c7aba
......@@ -857,6 +857,10 @@ struct SubrSubsetter
drop.ends_in_hint = true;
break;
case OpCode_dotsection:
str.values[pos].set_drop ();
break;
default:
/* NONE */
break;
......
......@@ -283,6 +283,7 @@ struct CFF1CSOpSet_Flatten : CFF1CSOpSet<CFF1CSOpSet_Flatten, FlattenParam>
case OpCode_vstemhm:
case OpCode_hintmask:
case OpCode_cntrmask:
case OpCode_dotsection:
if (param.drop_hints)
{
env.clear_args ();
......
......@@ -266,6 +266,26 @@ test_subset_cff1_seac (void)
hb_face_destroy (face);
}
static void
test_subset_cff1_dotsection (void)
{
hb_face_t *face = hb_test_open_font_file ("fonts/cff1_dotsect.otf");
hb_face_t *face_subset = hb_test_open_font_file ("fonts/cff1_dotsect.nohints.otf");
hb_set_t *codepoints = hb_set_create ();
hb_set_add (codepoints, 0x69); /* i */
hb_subset_input_t *input = hb_subset_test_create_input (codepoints);
hb_subset_input_set_drop_hints (input, true);
hb_face_t *face_test = hb_subset_test_create_subset (face, input);
hb_set_destroy (codepoints);
hb_subset_test_check (face_subset, face_test, HB_TAG ('C','F','F',' '));
hb_face_destroy (face_test);
hb_face_destroy (face_subset);
hb_face_destroy (face);
}
int
main (int argc, char **argv)
{
......@@ -282,6 +302,7 @@ main (int argc, char **argv)
hb_test_add (test_subset_cff1_j_desubr_strip_hints);
hb_test_add (test_subset_cff1_expert);
hb_test_add (test_subset_cff1_seac);
hb_test_add (test_subset_cff1_dotsection);
return hb_test_run ();
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册