diff --git a/src/gen-tag-table.py b/src/gen-tag-table.py index 3ce871204..7e374a0e4 100755 --- a/src/gen-tag-table.py +++ b/src/gen-tag-table.py @@ -1103,8 +1103,8 @@ def verify_disambiguation_dict (): '%s is not a valid disambiguation for %s' % (disambiguation[ot_tag], ot_tag)) elif ot_tag not in disambiguation: disambiguation[ot_tag] = macrolanguages[0] - different_primary_tags = sorted (t for t in primary_tags if not same_tag (t, ot.from_bcp_47.get (t))) - if different_primary_tags and disambiguation[ot_tag] == different_primary_tags[0] and '-' not in disambiguation[ot_tag]: + different_bcp_47_tags = sorted (t for t in bcp_47_tags if not same_tag (t, ot.from_bcp_47.get (t))) + if different_bcp_47_tags and disambiguation[ot_tag] == different_bcp_47_tags[0] and '-' not in disambiguation[ot_tag]: del disambiguation[ot_tag] for ot_tag in disambiguation.keys (): expect (ot_tag in ot.to_bcp_47, 'unknown OT tag: %s' % ot_tag) diff --git a/src/hb-ot-tag-table.hh b/src/hb-ot-tag-table.hh index f784a21c1..930061f88 100644 --- a/src/hb-ot-tag-table.hh +++ b/src/hb-ot-tag-table.hh @@ -2125,6 +2125,8 @@ hb_ot_ambiguous_tag_to_language (hb_tag_t tag) return hb_language_from_string ("ms", -1); /* Malay [macrolanguage] */ case HB_TAG('M','N','G',' '): /* Mongolian */ return hb_language_from_string ("mn", -1); /* Mongolian [macrolanguage] */ + case HB_TAG('M','N','K',' '): /* Maninka */ + return hb_language_from_string ("man", -1); /* Mandingo [macrolanguage] */ case HB_TAG('M','O','L',' '): /* Moldavian */ return hb_language_from_string ("ro-MD", -1); /* Romanian; Moldova */ case HB_TAG('N','E','P',' '): /* Nepali */ diff --git a/test/api/test-ot-tag.c b/test/api/test-ot-tag.c index 6669ea948..a0df6a4db 100644 --- a/test/api/test-ot-tag.c +++ b/test/api/test-ot-tag.c @@ -335,6 +335,8 @@ test_ot_tag_language (void) test_language_two_way ("FAR", "fa"); test_tag_from_language ("FAR", "fa_IR"); + test_language_two_way ("MNK", "man"); /* Mandingo [macrolanguage] */ + test_language_two_way ("SWA", "aii"); /* Swadaya Aramaic */ test_language_two_way ("SYR", "syr"); /* Syriac [macrolanguage] */