[glib: 1/2] Add G_UNICODE_SCRIPT_MATH to GUnicodeScript




commit e85a085ca4c6bda8861888fe71d6cba842d5dcd7
Author: Alexis King <lexi lambda gmail com>
Date:   Fri Feb 11 12:42:55 2022 +0000

    Add G_UNICODE_SCRIPT_MATH to GUnicodeScript

 glib/gunicode.h      | 4 ++++
 glib/guniprop.c      | 3 +++
 glib/tests/unicode.c | 1 +
 3 files changed, 8 insertions(+)
---
diff --git a/glib/gunicode.h b/glib/gunicode.h
index b5278e316..15972a68e 100644
--- a/glib/gunicode.h
+++ b/glib/gunicode.h
@@ -435,6 +435,7 @@ typedef enum
  * @G_UNICODE_SCRIPT_TANGSA:               Tangsa. Since: 2.72
  * @G_UNICODE_SCRIPT_TOTO:                 Toto. Since: 2.72
  * @G_UNICODE_SCRIPT_VITHKUQI:             Vithkuqi. Since: 2.72
+ * @G_UNICODE_SCRIPT_MATH:                 Mathematical notation. Since: 2.72
  *
  * The #GUnicodeScript enumeration identifies different writing
  * systems. The values correspond to the names as defined in the
@@ -640,6 +641,9 @@ typedef enum
   G_UNICODE_SCRIPT_TANGSA,                 /* Tnsa */
   G_UNICODE_SCRIPT_TOTO,                   /* Toto */
   G_UNICODE_SCRIPT_VITHKUQI,               /* Vith */
+
+  /* not really a Unicode script, but part of ISO 15924 */
+  G_UNICODE_SCRIPT_MATH,                   /* Zmth */
 } GUnicodeScript;
 
 GLIB_AVAILABLE_IN_ALL
diff --git a/glib/guniprop.c b/glib/guniprop.c
index daf31677e..aac833bc8 100644
--- a/glib/guniprop.c
+++ b/glib/guniprop.c
@@ -1501,6 +1501,9 @@ static const guint32 iso15924_tags[] =
     PACK ('T', 'o', 't', 'o'), /* G_UNICODE_SCRIPT_TOTO */
     PACK ('V', 'i', 't', 'h'), /* G_UNICODE_SCRIPT_VITHKUQI */
 
+  /* not really a Unicode script, but part of ISO 15924 */
+    PACK ('Z', 'm', 't', 'h'), /* G_UNICODE_SCRIPT_MATH */
+
 #undef PACK
 };
 
diff --git a/glib/tests/unicode.c b/glib/tests/unicode.c
index 81564cece..5ba167e56 100644
--- a/glib/tests/unicode.c
+++ b/glib/tests/unicode.c
@@ -1587,6 +1587,7 @@ test_iso15924 (void)
   } data[] = {
     { G_UNICODE_SCRIPT_COMMON,             "Zyyy" },
     { G_UNICODE_SCRIPT_INHERITED,          "Zinh" },
+    { G_UNICODE_SCRIPT_MATH,               "Zmth" },
     { G_UNICODE_SCRIPT_ARABIC,             "Arab" },
     { G_UNICODE_SCRIPT_ARMENIAN,           "Armn" },
     { G_UNICODE_SCRIPT_BENGALI,            "Beng" },


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]