Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(284)

Unified Diff: third_party/harfbuzz-ng/src/hb-ot-tag.cc

Issue 2318273003: Roll HarfBuzz to 1.3.1 (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/harfbuzz-ng/src/hb-ot-map.cc ('k') | third_party/harfbuzz-ng/src/hb-set-private.hh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/harfbuzz-ng/src/hb-ot-tag.cc
diff --git a/third_party/harfbuzz-ng/src/hb-ot-tag.cc b/third_party/harfbuzz-ng/src/hb-ot-tag.cc
index 04835576da80cf75b26b71106f16d1736fbe7add..5f21ac096775b7ca18f320901760cfbd9f41e25c 100644
--- a/third_party/harfbuzz-ng/src/hb-ot-tag.cc
+++ b/third_party/harfbuzz-ng/src/hb-ot-tag.cc
@@ -826,16 +826,19 @@ static const LangTag ot_languages[] = {
};
typedef struct {
- char language[8];
+ char language[11];
hb_tag_t tag;
} LangTagLong;
static const LangTagLong ot_languages_zh[] = {
+ /* Store longest-first, if one is a prefix of another. */
{"zh-cn", HB_TAG('Z','H','S',' ')}, /* Chinese (China) */
{"zh-hk", HB_TAG('Z','H','H',' ')}, /* Chinese (Hong Kong) */
- {"zh-mo", HB_TAG('Z','H','T',' ')}, /* Chinese (Macao) */
+ {"zh-mo", HB_TAG('Z','H','H',' ')}, /* Chinese (Macao) */
{"zh-sg", HB_TAG('Z','H','S',' ')}, /* Chinese (Singapore) */
{"zh-tw", HB_TAG('Z','H','T',' ')}, /* Chinese (Taiwan) */
{"zh-hans", HB_TAG('Z','H','S',' ')}, /* Chinese (Simplified) */
+ {"zh-hant-hk",HB_TAG('Z','H','H',' ')}, /* Chinese (Hong Kong) */
+ {"zh-hant-mo",HB_TAG('Z','H','H',' ')}, /* Chinese (Macao) */
{"zh-hant", HB_TAG('Z','H','T',' ')}, /* Chinese (Traditional) */
};
@@ -889,13 +892,21 @@ hb_ot_tag_from_language (hb_language_t language)
}
/*
- * The International Phonetic Alphabet is a variant tag in BCP-47,
- * which can be applied to any language.
+ * "fonipa" is a variant tag in BCP-47, meaning the International Phonetic Alphabet.
+ * It can be applied to any language.
*/
if (strstr (lang_str, "-fonipa")) {
return HB_TAG('I','P','P','H'); /* Phonetic transcription—IPA conventions */
}
+ /*
+ * "fonnapa" is a variant tag in BCP-47, meaning the North American Phonetic Alphabet
+ * also known as Americanist Phonetic Notation. It can be applied to any language.
+ */
+ if (strstr (lang_str, "-fonnapa")) {
+ return HB_TAG('A','P','P','H'); /* Phonetic transcription—Americanist conventions */
+ }
+
/* Find a language matching in the first component */
{
const LangTag *lang_tag;
@@ -967,6 +978,8 @@ hb_ot_tag_to_language (hb_tag_t tag)
/* struct LangTag has only room for 3-letter language tags. */
switch (tag) {
+ case HB_TAG('A','P','P','H'): /* Phonetic transcription—Americanist conventions */
+ return hb_language_from_string ("und-fonnapa", -1);
case HB_TAG('I','P','P','H'): /* Phonetic transcription—IPA conventions */
return hb_language_from_string ("und-fonipa", -1);
}
« no previous file with comments | « third_party/harfbuzz-ng/src/hb-ot-map.cc ('k') | third_party/harfbuzz-ng/src/hb-set-private.hh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698