mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-22 15:31:05 +01:00
Match extlang subtags
If the second subtag of a BCP 47 tag is three letters long, it denotes an extended language. The tag converter ignores the language subtag and uses the extended language instead. There are some grandfathered exceptions, which are handled earlier.
This commit is contained in:
1 parent
2f1f961cc0
commit
7c7cb2a989
4 files changed
+38
-2
No files matched your search
@@ -369,9 +369,13 @@ test_ot_tag_language (void)
|
||||
test_tag_from_language ("ABC", "xyz-xy-x-hbotabc-zxc");
|
||||
|
||||
/* Unnormalized BCP 47 tags */
|
||||
test_tag_from_language ("ARA", "ar-aao");
|
||||
test_tag_from_language ("JBO", "art-lojban");
|
||||
test_tag_from_language ("KOK", "kok-gom");
|
||||
test_tag_from_language ("LTZ", "i-lux");
|
||||
test_tag_from_language ("MNG", "drh");
|
||||
test_tag_from_language ("MOR", "ar-ary");
|
||||
test_tag_from_language ("MOR", "ar-ary-DZ");
|
||||
test_tag_from_language ("NOR", "no-bok");
|
||||
test_tag_from_language ("NYN", "no-nyn");
|
||||
test_tag_from_language ("ZHS", "i-hak");
|
||||
@@ -379,6 +383,9 @@ test_ot_tag_language (void)
|
||||
test_tag_from_language ("ZHS", "zh-min");
|
||||
test_tag_from_language ("ZHS", "zh-min-nan");
|
||||
test_tag_from_language ("ZHS", "zh-xiang");
|
||||
|
||||
/* A UN M.49 region code, not an extended language subtag */
|
||||
test_tag_from_language ("ARA", "ar-001");
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
Reference in new issue
Block a user