diff --git a/test/api/fonts/NotoColorEmoji.cmap.38,AE,2049.ttf b/test/api/fonts/NotoColorEmoji.cmap.38,AE,2049.ttf new file mode 100644 index 000000000..94efc6aa7 Binary files /dev/null and b/test/api/fonts/NotoColorEmoji.cmap.38,AE,2049.ttf differ diff --git a/test/api/fonts/NotoColorEmoji.cmap.ttf b/test/api/fonts/NotoColorEmoji.cmap.ttf new file mode 100644 index 000000000..c1dd86915 Binary files /dev/null and b/test/api/fonts/NotoColorEmoji.cmap.ttf differ diff --git a/test/api/test-subset-cmap.c b/test/api/test-subset-cmap.c index a6c24fccf..e16400ea5 100644 --- a/test/api/test-subset-cmap.c +++ b/test/api/test-subset-cmap.c @@ -133,6 +133,48 @@ test_subset_cmap_empty_tables (void) hb_face_destroy (face_empty); } +static void +test_subset_cmap_noto_color_emoji_noop (void) +{ + hb_face_t *face = hb_test_open_font_file ("fonts/NotoColorEmoji.cmap.ttf"); + + hb_set_t *codepoints = hb_set_create (); + hb_face_t *face_subset; + hb_set_add (codepoints, 0x38); + hb_set_add (codepoints, 0x39); + hb_set_add (codepoints, 0xAE); + hb_set_add (codepoints, 0x2049); + hb_set_add (codepoints, 0x20E3); + face_subset = hb_subset_test_create_subset (face, hb_subset_test_create_input (codepoints)); + hb_set_destroy (codepoints); + + hb_subset_test_check (face, face_subset, HB_TAG ('c','m','a','p')); + + hb_face_destroy (face_subset); + hb_face_destroy (face); +} + +static void +test_subset_cmap_noto_color_emoji_non_consecutive_glyphs (void) +{ + hb_face_t *face = hb_test_open_font_file ("fonts/NotoColorEmoji.cmap.ttf"); + hb_face_t *face_expected = hb_test_open_font_file ("fonts/NotoColorEmoji.cmap.38,AE,2049.ttf"); + + hb_set_t *codepoints = hb_set_create (); + hb_face_t *face_subset; + hb_set_add (codepoints, 0x38); + hb_set_add (codepoints, 0xAE); + hb_set_add (codepoints, 0x2049); + face_subset = hb_subset_test_create_subset (face, hb_subset_test_create_input (codepoints)); + hb_set_destroy (codepoints); + + hb_subset_test_check (face_expected, face_subset, HB_TAG ('c','m','a','p')); + + hb_face_destroy (face_subset); + hb_face_destroy (face_expected); + hb_face_destroy (face); +} + // TODO(rsheeter) test cmap to no codepoints int @@ -145,6 +187,8 @@ main (int argc, char **argv) hb_test_add (test_subset_cmap_non_consecutive_glyphs); hb_test_add (test_subset_cmap4_no_exceeding_maximum_codepoint); hb_test_add (test_subset_cmap_empty_tables); + hb_test_add (test_subset_cmap_noto_color_emoji_noop); + hb_test_add (test_subset_cmap_noto_color_emoji_non_consecutive_glyphs); return hb_test_run(); } diff --git a/test/subset/data/expected/cmap14/cmap14_font2.default.4E00,4E02,4E03.otf b/test/subset/data/expected/cmap14/cmap14_font2.default.4E00,4E02,4E03.otf new file mode 100644 index 000000000..460e81bcf Binary files /dev/null and b/test/subset/data/expected/cmap14/cmap14_font2.default.4E00,4E02,4E03.otf differ diff --git a/test/subset/data/expected/cmap14/cmap14_font2.default.4E00,4E03.otf b/test/subset/data/expected/cmap14/cmap14_font2.default.4E00,4E03.otf new file mode 100644 index 000000000..f6df4cf38 Binary files /dev/null and b/test/subset/data/expected/cmap14/cmap14_font2.default.4E00,4E03.otf differ diff --git a/test/subset/data/expected/cmap14/cmap14_font2.default.4E00,4E05,4E07.otf b/test/subset/data/expected/cmap14/cmap14_font2.default.4E00,4E05,4E07.otf new file mode 100644 index 000000000..5d15cd7a6 Binary files /dev/null and b/test/subset/data/expected/cmap14/cmap14_font2.default.4E00,4E05,4E07.otf differ diff --git a/test/subset/data/expected/cmap14/cmap14_font2.default.4E02,4E03,4E08.otf b/test/subset/data/expected/cmap14/cmap14_font2.default.4E02,4E03,4E08.otf new file mode 100644 index 000000000..71bc4d6fa Binary files /dev/null and b/test/subset/data/expected/cmap14/cmap14_font2.default.4E02,4E03,4E08.otf differ diff --git a/test/subset/data/expected/cmap14/cmap14_font2.default.4E02.otf b/test/subset/data/expected/cmap14/cmap14_font2.default.4E02.otf new file mode 100644 index 000000000..f28bd1d68 Binary files /dev/null and b/test/subset/data/expected/cmap14/cmap14_font2.default.4E02.otf differ diff --git a/test/subset/data/expected/cmap14/cmap14_font2.default.4E03.otf b/test/subset/data/expected/cmap14/cmap14_font2.default.4E03.otf new file mode 100644 index 000000000..d4401c73c Binary files /dev/null and b/test/subset/data/expected/cmap14/cmap14_font2.default.4E03.otf differ diff --git a/test/subset/data/expected/cmap14/cmap14_font2.default.4E05,4E07,4E08,4E09.otf b/test/subset/data/expected/cmap14/cmap14_font2.default.4E05,4E07,4E08,4E09.otf new file mode 100644 index 000000000..65c74c4ae Binary files /dev/null and b/test/subset/data/expected/cmap14/cmap14_font2.default.4E05,4E07,4E08,4E09.otf differ diff --git a/test/subset/data/expected/cmap14/cmap14_font2.default.4E08,4E09.otf b/test/subset/data/expected/cmap14/cmap14_font2.default.4E08,4E09.otf new file mode 100644 index 000000000..97942772c Binary files /dev/null and b/test/subset/data/expected/cmap14/cmap14_font2.default.4E08,4E09.otf differ diff --git a/test/subset/data/expected/cmap14/cmap14_font2.default.4E08.otf b/test/subset/data/expected/cmap14/cmap14_font2.default.4E08.otf new file mode 100644 index 000000000..dea9124d1 Binary files /dev/null and b/test/subset/data/expected/cmap14/cmap14_font2.default.4E08.otf differ diff --git a/test/subset/data/expected/cmap14/cmap14_font2.default.retain-all-codepoint.otf b/test/subset/data/expected/cmap14/cmap14_font2.default.retain-all-codepoint.otf new file mode 100644 index 000000000..12365f452 Binary files /dev/null and b/test/subset/data/expected/cmap14/cmap14_font2.default.retain-all-codepoint.otf differ diff --git a/test/subset/data/expected/cmap14/cmap14_font2.drop-hints-retain-gids.4E00,4E02,4E03.otf b/test/subset/data/expected/cmap14/cmap14_font2.drop-hints-retain-gids.4E00,4E02,4E03.otf new file mode 100644 index 000000000..f7679f5fe Binary files /dev/null and b/test/subset/data/expected/cmap14/cmap14_font2.drop-hints-retain-gids.4E00,4E02,4E03.otf differ diff --git a/test/subset/data/expected/cmap14/cmap14_font2.drop-hints-retain-gids.4E00,4E03.otf b/test/subset/data/expected/cmap14/cmap14_font2.drop-hints-retain-gids.4E00,4E03.otf new file mode 100644 index 000000000..327f83f59 Binary files /dev/null and b/test/subset/data/expected/cmap14/cmap14_font2.drop-hints-retain-gids.4E00,4E03.otf differ diff --git a/test/subset/data/expected/cmap14/cmap14_font2.drop-hints-retain-gids.4E00,4E05,4E07.otf b/test/subset/data/expected/cmap14/cmap14_font2.drop-hints-retain-gids.4E00,4E05,4E07.otf new file mode 100644 index 000000000..a3289fd5f Binary files /dev/null and b/test/subset/data/expected/cmap14/cmap14_font2.drop-hints-retain-gids.4E00,4E05,4E07.otf differ diff --git a/test/subset/data/expected/cmap14/cmap14_font2.drop-hints-retain-gids.4E02,4E03,4E08.otf b/test/subset/data/expected/cmap14/cmap14_font2.drop-hints-retain-gids.4E02,4E03,4E08.otf new file mode 100644 index 000000000..d0ba8604f Binary files /dev/null and b/test/subset/data/expected/cmap14/cmap14_font2.drop-hints-retain-gids.4E02,4E03,4E08.otf differ diff --git a/test/subset/data/expected/cmap14/cmap14_font2.drop-hints-retain-gids.4E02.otf b/test/subset/data/expected/cmap14/cmap14_font2.drop-hints-retain-gids.4E02.otf new file mode 100644 index 000000000..9707490cc Binary files /dev/null and b/test/subset/data/expected/cmap14/cmap14_font2.drop-hints-retain-gids.4E02.otf differ diff --git a/test/subset/data/expected/cmap14/cmap14_font2.drop-hints-retain-gids.4E03.otf b/test/subset/data/expected/cmap14/cmap14_font2.drop-hints-retain-gids.4E03.otf new file mode 100644 index 000000000..f5de51927 Binary files /dev/null and b/test/subset/data/expected/cmap14/cmap14_font2.drop-hints-retain-gids.4E03.otf differ diff --git a/test/subset/data/expected/cmap14/cmap14_font2.drop-hints-retain-gids.4E05,4E07,4E08,4E09.otf b/test/subset/data/expected/cmap14/cmap14_font2.drop-hints-retain-gids.4E05,4E07,4E08,4E09.otf new file mode 100644 index 000000000..9203411cc Binary files /dev/null and b/test/subset/data/expected/cmap14/cmap14_font2.drop-hints-retain-gids.4E05,4E07,4E08,4E09.otf differ diff --git a/test/subset/data/expected/cmap14/cmap14_font2.drop-hints-retain-gids.4E08,4E09.otf b/test/subset/data/expected/cmap14/cmap14_font2.drop-hints-retain-gids.4E08,4E09.otf new file mode 100644 index 000000000..d7b13afc5 Binary files /dev/null and b/test/subset/data/expected/cmap14/cmap14_font2.drop-hints-retain-gids.4E08,4E09.otf differ diff --git a/test/subset/data/expected/cmap14/cmap14_font2.drop-hints-retain-gids.4E08.otf b/test/subset/data/expected/cmap14/cmap14_font2.drop-hints-retain-gids.4E08.otf new file mode 100644 index 000000000..ae141a6d2 Binary files /dev/null and b/test/subset/data/expected/cmap14/cmap14_font2.drop-hints-retain-gids.4E08.otf differ diff --git a/test/subset/data/expected/cmap14/cmap14_font2.drop-hints-retain-gids.retain-all-codepoint.otf b/test/subset/data/expected/cmap14/cmap14_font2.drop-hints-retain-gids.retain-all-codepoint.otf new file mode 100644 index 000000000..646ed6f64 Binary files /dev/null and b/test/subset/data/expected/cmap14/cmap14_font2.drop-hints-retain-gids.retain-all-codepoint.otf differ diff --git a/test/subset/data/expected/cmap14/cmap14_font2.drop-hints.4E00,4E02,4E03.otf b/test/subset/data/expected/cmap14/cmap14_font2.drop-hints.4E00,4E02,4E03.otf new file mode 100644 index 000000000..04934520e Binary files /dev/null and b/test/subset/data/expected/cmap14/cmap14_font2.drop-hints.4E00,4E02,4E03.otf differ diff --git a/test/subset/data/expected/cmap14/cmap14_font2.drop-hints.4E00,4E03.otf b/test/subset/data/expected/cmap14/cmap14_font2.drop-hints.4E00,4E03.otf new file mode 100644 index 000000000..2322e5d2f Binary files /dev/null and b/test/subset/data/expected/cmap14/cmap14_font2.drop-hints.4E00,4E03.otf differ diff --git a/test/subset/data/expected/cmap14/cmap14_font2.drop-hints.4E00,4E05,4E07.otf b/test/subset/data/expected/cmap14/cmap14_font2.drop-hints.4E00,4E05,4E07.otf new file mode 100644 index 000000000..6b9edac0f Binary files /dev/null and b/test/subset/data/expected/cmap14/cmap14_font2.drop-hints.4E00,4E05,4E07.otf differ diff --git a/test/subset/data/expected/cmap14/cmap14_font2.drop-hints.4E02,4E03,4E08.otf b/test/subset/data/expected/cmap14/cmap14_font2.drop-hints.4E02,4E03,4E08.otf new file mode 100644 index 000000000..9f243b8eb Binary files /dev/null and b/test/subset/data/expected/cmap14/cmap14_font2.drop-hints.4E02,4E03,4E08.otf differ diff --git a/test/subset/data/expected/cmap14/cmap14_font2.drop-hints.4E02.otf b/test/subset/data/expected/cmap14/cmap14_font2.drop-hints.4E02.otf new file mode 100644 index 000000000..8954cd74e Binary files /dev/null and b/test/subset/data/expected/cmap14/cmap14_font2.drop-hints.4E02.otf differ diff --git a/test/subset/data/expected/cmap14/cmap14_font2.drop-hints.4E03.otf b/test/subset/data/expected/cmap14/cmap14_font2.drop-hints.4E03.otf new file mode 100644 index 000000000..e62392863 Binary files /dev/null and b/test/subset/data/expected/cmap14/cmap14_font2.drop-hints.4E03.otf differ diff --git a/test/subset/data/expected/cmap14/cmap14_font2.drop-hints.4E05,4E07,4E08,4E09.otf b/test/subset/data/expected/cmap14/cmap14_font2.drop-hints.4E05,4E07,4E08,4E09.otf new file mode 100644 index 000000000..51237ad2f Binary files /dev/null and b/test/subset/data/expected/cmap14/cmap14_font2.drop-hints.4E05,4E07,4E08,4E09.otf differ diff --git a/test/subset/data/expected/cmap14/cmap14_font2.drop-hints.4E08,4E09.otf b/test/subset/data/expected/cmap14/cmap14_font2.drop-hints.4E08,4E09.otf new file mode 100644 index 000000000..e219c39cc Binary files /dev/null and b/test/subset/data/expected/cmap14/cmap14_font2.drop-hints.4E08,4E09.otf differ diff --git a/test/subset/data/expected/cmap14/cmap14_font2.drop-hints.4E08.otf b/test/subset/data/expected/cmap14/cmap14_font2.drop-hints.4E08.otf new file mode 100644 index 000000000..9fc0bda2d Binary files /dev/null and b/test/subset/data/expected/cmap14/cmap14_font2.drop-hints.4E08.otf differ diff --git a/test/subset/data/expected/cmap14/cmap14_font2.drop-hints.retain-all-codepoint.otf b/test/subset/data/expected/cmap14/cmap14_font2.drop-hints.retain-all-codepoint.otf new file mode 100644 index 000000000..02232eaee Binary files /dev/null and b/test/subset/data/expected/cmap14/cmap14_font2.drop-hints.retain-all-codepoint.otf differ diff --git a/test/subset/data/expected/cmap14/cmap14_font2.name-ids.4E00,4E02,4E03.otf b/test/subset/data/expected/cmap14/cmap14_font2.name-ids.4E00,4E02,4E03.otf new file mode 100644 index 000000000..021c9805b Binary files /dev/null and b/test/subset/data/expected/cmap14/cmap14_font2.name-ids.4E00,4E02,4E03.otf differ diff --git a/test/subset/data/expected/cmap14/cmap14_font2.name-ids.4E00,4E03.otf b/test/subset/data/expected/cmap14/cmap14_font2.name-ids.4E00,4E03.otf new file mode 100644 index 000000000..cf3a5b3f4 Binary files /dev/null and b/test/subset/data/expected/cmap14/cmap14_font2.name-ids.4E00,4E03.otf differ diff --git a/test/subset/data/expected/cmap14/cmap14_font2.name-ids.4E00,4E05,4E07.otf b/test/subset/data/expected/cmap14/cmap14_font2.name-ids.4E00,4E05,4E07.otf new file mode 100644 index 000000000..7c537c13a Binary files /dev/null and b/test/subset/data/expected/cmap14/cmap14_font2.name-ids.4E00,4E05,4E07.otf differ diff --git a/test/subset/data/expected/cmap14/cmap14_font2.name-ids.4E02,4E03,4E08.otf b/test/subset/data/expected/cmap14/cmap14_font2.name-ids.4E02,4E03,4E08.otf new file mode 100644 index 000000000..f24488b37 Binary files /dev/null and b/test/subset/data/expected/cmap14/cmap14_font2.name-ids.4E02,4E03,4E08.otf differ diff --git a/test/subset/data/expected/cmap14/cmap14_font2.name-ids.4E02.otf b/test/subset/data/expected/cmap14/cmap14_font2.name-ids.4E02.otf new file mode 100644 index 000000000..8d9e65a38 Binary files /dev/null and b/test/subset/data/expected/cmap14/cmap14_font2.name-ids.4E02.otf differ diff --git a/test/subset/data/expected/cmap14/cmap14_font2.name-ids.4E03.otf b/test/subset/data/expected/cmap14/cmap14_font2.name-ids.4E03.otf new file mode 100644 index 000000000..f2f5ba03a Binary files /dev/null and b/test/subset/data/expected/cmap14/cmap14_font2.name-ids.4E03.otf differ diff --git a/test/subset/data/expected/cmap14/cmap14_font2.name-ids.4E05,4E07,4E08,4E09.otf b/test/subset/data/expected/cmap14/cmap14_font2.name-ids.4E05,4E07,4E08,4E09.otf new file mode 100644 index 000000000..aef4bd390 Binary files /dev/null and b/test/subset/data/expected/cmap14/cmap14_font2.name-ids.4E05,4E07,4E08,4E09.otf differ diff --git a/test/subset/data/expected/cmap14/cmap14_font2.name-ids.4E08,4E09.otf b/test/subset/data/expected/cmap14/cmap14_font2.name-ids.4E08,4E09.otf new file mode 100644 index 000000000..f24ad1fd5 Binary files /dev/null and b/test/subset/data/expected/cmap14/cmap14_font2.name-ids.4E08,4E09.otf differ diff --git a/test/subset/data/expected/cmap14/cmap14_font2.name-ids.4E08.otf b/test/subset/data/expected/cmap14/cmap14_font2.name-ids.4E08.otf new file mode 100644 index 000000000..00c466f26 Binary files /dev/null and b/test/subset/data/expected/cmap14/cmap14_font2.name-ids.4E08.otf differ diff --git a/test/subset/data/expected/cmap14/cmap14_font2.name-ids.retain-all-codepoint.otf b/test/subset/data/expected/cmap14/cmap14_font2.name-ids.retain-all-codepoint.otf new file mode 100644 index 000000000..86fe67b15 Binary files /dev/null and b/test/subset/data/expected/cmap14/cmap14_font2.name-ids.retain-all-codepoint.otf differ diff --git a/test/subset/data/expected/cmap14/cmap14_font2.retain-gids.4E00,4E02,4E03.otf b/test/subset/data/expected/cmap14/cmap14_font2.retain-gids.4E00,4E02,4E03.otf new file mode 100644 index 000000000..0bc930a9d Binary files /dev/null and b/test/subset/data/expected/cmap14/cmap14_font2.retain-gids.4E00,4E02,4E03.otf differ diff --git a/test/subset/data/expected/cmap14/cmap14_font2.retain-gids.4E00,4E03.otf b/test/subset/data/expected/cmap14/cmap14_font2.retain-gids.4E00,4E03.otf new file mode 100644 index 000000000..9746b4559 Binary files /dev/null and b/test/subset/data/expected/cmap14/cmap14_font2.retain-gids.4E00,4E03.otf differ diff --git a/test/subset/data/expected/cmap14/cmap14_font2.retain-gids.4E00,4E05,4E07.otf b/test/subset/data/expected/cmap14/cmap14_font2.retain-gids.4E00,4E05,4E07.otf new file mode 100644 index 000000000..2d378d85a Binary files /dev/null and b/test/subset/data/expected/cmap14/cmap14_font2.retain-gids.4E00,4E05,4E07.otf differ diff --git a/test/subset/data/expected/cmap14/cmap14_font2.retain-gids.4E02,4E03,4E08.otf b/test/subset/data/expected/cmap14/cmap14_font2.retain-gids.4E02,4E03,4E08.otf new file mode 100644 index 000000000..42ada2ee9 Binary files /dev/null and b/test/subset/data/expected/cmap14/cmap14_font2.retain-gids.4E02,4E03,4E08.otf differ diff --git a/test/subset/data/expected/cmap14/cmap14_font2.retain-gids.4E02.otf b/test/subset/data/expected/cmap14/cmap14_font2.retain-gids.4E02.otf new file mode 100644 index 000000000..7e4cf58f0 Binary files /dev/null and b/test/subset/data/expected/cmap14/cmap14_font2.retain-gids.4E02.otf differ diff --git a/test/subset/data/expected/cmap14/cmap14_font2.retain-gids.4E03.otf b/test/subset/data/expected/cmap14/cmap14_font2.retain-gids.4E03.otf new file mode 100644 index 000000000..846fee5c5 Binary files /dev/null and b/test/subset/data/expected/cmap14/cmap14_font2.retain-gids.4E03.otf differ diff --git a/test/subset/data/expected/cmap14/cmap14_font2.retain-gids.4E05,4E07,4E08,4E09.otf b/test/subset/data/expected/cmap14/cmap14_font2.retain-gids.4E05,4E07,4E08,4E09.otf new file mode 100644 index 000000000..018805cd0 Binary files /dev/null and b/test/subset/data/expected/cmap14/cmap14_font2.retain-gids.4E05,4E07,4E08,4E09.otf differ diff --git a/test/subset/data/expected/cmap14/cmap14_font2.retain-gids.4E08,4E09.otf b/test/subset/data/expected/cmap14/cmap14_font2.retain-gids.4E08,4E09.otf new file mode 100644 index 000000000..1945b0b28 Binary files /dev/null and b/test/subset/data/expected/cmap14/cmap14_font2.retain-gids.4E08,4E09.otf differ diff --git a/test/subset/data/expected/cmap14/cmap14_font2.retain-gids.4E08.otf b/test/subset/data/expected/cmap14/cmap14_font2.retain-gids.4E08.otf new file mode 100644 index 000000000..f45fda15b Binary files /dev/null and b/test/subset/data/expected/cmap14/cmap14_font2.retain-gids.4E08.otf differ diff --git a/test/subset/data/expected/cmap14/cmap14_font2.retain-gids.retain-all-codepoint.otf b/test/subset/data/expected/cmap14/cmap14_font2.retain-gids.retain-all-codepoint.otf new file mode 100644 index 000000000..ac622b63c Binary files /dev/null and b/test/subset/data/expected/cmap14/cmap14_font2.retain-gids.retain-all-codepoint.otf differ diff --git a/test/subset/data/fonts/cmap14_font2.otf b/test/subset/data/fonts/cmap14_font2.otf new file mode 100644 index 000000000..4a7da8041 Binary files /dev/null and b/test/subset/data/fonts/cmap14_font2.otf differ diff --git a/test/subset/data/tests/cmap14.tests b/test/subset/data/tests/cmap14.tests index 657587010..abb22cf12 100644 --- a/test/subset/data/tests/cmap14.tests +++ b/test/subset/data/tests/cmap14.tests @@ -1,5 +1,6 @@ FONTS: cmap14_font1.otf +cmap14_font2.otf PROFILES: default.txt