bug 1002425 - add a Gecko script code for "mathematical notation". r=smontagu
authorJonathan Kew <jkew@mozilla.com>
Mon, 28 Apr 2014 17:10:36 +0100
changeset 180565 24b67ba771ef33c2c180097f377acd41d12aa87b
parent 180564 83010e4989ca539d8e204ffaf76c87d26c068ead
child 180566 d14d29f8fee63d1aa9df6ab80e1520148cda7f8a
push id42816
push userjkew@mozilla.com
push dateMon, 28 Apr 2014 16:10:58 +0000
treeherdermozilla-inbound@24b67ba771ef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmontagu
bugs1002425
milestone31.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
bug 1002425 - add a Gecko script code for "mathematical notation". r=smontagu
intl/unicharutil/tools/genUnicodePropertyData.pl
intl/unicharutil/util/nsUnicodePropertyData.cpp
intl/unicharutil/util/nsUnicodeScriptCodes.h
--- a/intl/unicharutil/tools/genUnicodePropertyData.pl
+++ b/intl/unicharutil/tools/genUnicodePropertyData.pl
@@ -191,30 +191,61 @@ my %scriptCode = (
   MANDAIC => 95,
 # unicode 6.1 additions
   CHAKMA => 96,
   MEROITIC_CURSIVE => 97,
   MEROITIC_HIEROGLYPHS => 98,
   MIAO => 99,
   SHARADA => 100,
   SORA_SOMPENG => 101,
-  TAKRI => 102
+  TAKRI => 102,
+
+# Expected unicode 7.0 additions, not yet supported; re-check when enabling
+# by comparison with harfbuzz and with PangoScript values
+#  BASSA_VAH => 103,
+#  CAUCASIAN_ALBANIAN => 104,
+#  DUPLOYAN => 105,
+#  ELBASAN => 106,
+#  GRANTHA => 107,
+#  KHOJKI => 108,
+#  KHUDAWADI => 109,
+#  LINEAR_A => 110,
+#  MAHAJANI => 111,
+#  MANICHAEAN => 112,
+#  MENDE_KIKAKUI => 113,
+#  MODI => 114,
+#  MRO => 115,
+#  NABATAEAN => 116,
+#  OLD_NORTH_ARABIAN => 117,
+#  OLD_PERMIC => 118,
+#  PAHAWH_HMONG => 119,
+#  PALMYRENE => 120,
+#  PAU_CIN_HAU => 121,
+#  PSALTER_PAHLAVI => 122,
+#  SIDDHAM => 123,
+#  TIRHUTA => 124,
+#  WARANG_CITI => 125,
+
+# additional "script" code, not from Unicode (but matches ISO 15924's Zmth tag)
+# XXX need to update this when the Unicode 7.0 scripts are enabled above
+  MATHEMATICAL_NOTATION => 103,
 );
 
 my $sc = -1;
 my $cc = -1;
 my %catCode;
 my @scriptCodeToTag;
 my @scriptCodeToName;
 
 sub readHarfBuzzHeader
 {
     my $file = shift;
     open FH, "< $ARGV[0]/$file" or die "can't open harfbuzz header $ARGV[0]/$file\n";
     while (<FH>) {
+        s/CANADIAN_SYLLABICS/CANADIAN_ABORIGINAL/; # harfbuzz and unicode disagree on this name :(
         if (m/HB_SCRIPT_([A-Z_]+)\s*=\s*HB_TAG\s*\(('.','.','.','.')\)\s*,/) {
             unless (exists $scriptCode{$1}) {
                 warn "unknown script name $1 found in $file\n";
                 next;
             }
             $sc = $scriptCode{$1};
             $scriptCodeToTag[$sc] = $2;
             $scriptCodeToName[$sc] = $1;
@@ -228,16 +259,21 @@ sub readHarfBuzzHeader
 }
 
 &readHarfBuzzHeader("hb-common.h");
 &readHarfBuzzHeader("hb-unicode.h");
 
 die "didn't find HarfBuzz script codes\n" if $sc == -1;
 die "didn't find HarfBuzz category codes\n" if $cc == -1;
 
+# Additional code not present in HarfBuzz headers:
+$sc = $scriptCode{"MATHEMATICAL_NOTATION"};
+$scriptCodeToTag[$sc] = "'Z','m','t','h'";
+$scriptCodeToName[$sc] = "MATHEMATICAL_NOTATION";
+
 my %xidmodCode = (
 'inclusion'         => 0,
 'recommended'       => 1,
 'default-ignorable' => 2,
 'historic'          => 3,
 'limited-use'       => 4,
 'not-NFKC'          => 5,
 'not-xid'           => 6,
--- a/intl/unicharutil/util/nsUnicodePropertyData.cpp
+++ b/intl/unicharutil/util/nsUnicodePropertyData.cpp
@@ -6,17 +6,17 @@
 
 /*
  * Derived from the Unicode Character Database by genUnicodePropertyData.pl
  *
  * For Unicode terms of use, see http://www.unicode.org/terms_of_use.html
  */
 
 /*
- * Created on Mon Oct 21 16:33:35 2013 from UCD data files with version info:
+ * Created on Mon Apr 28 11:24:35 2014 from UCD data files with version info:
  *
 
 # Date: 2013-09-27, 23:05:00 GMT [KW]
 #
 # Unicode Character Database
 # Copyright (c) 1991-2013 Unicode, Inc.
 # For terms of use, see http://www.unicode.org/terms_of_use.html
 #
@@ -155,17 +155,18 @@ static const uint32_t sScriptCodeToTag[]
   HB_TAG('B','r','a','h'),
   HB_TAG('M','a','n','d'),
   HB_TAG('C','a','k','m'),
   HB_TAG('M','e','r','c'),
   HB_TAG('M','e','r','o'),
   HB_TAG('P','l','r','d'),
   HB_TAG('S','h','r','d'),
   HB_TAG('S','o','r','a'),
-  HB_TAG('T','a','k','r')
+  HB_TAG('T','a','k','r'),
+  HB_TAG('Z','m','t','h')
 };
 
 static const int16_t sMirrorOffsets[] = {
   0,
   1,
   -1,
   2,
   -2,
--- a/intl/unicharutil/util/nsUnicodeScriptCodes.h
+++ b/intl/unicharutil/util/nsUnicodeScriptCodes.h
@@ -6,17 +6,17 @@
 
 /*
  * Derived from the Unicode Character Database by genUnicodePropertyData.pl
  *
  * For Unicode terms of use, see http://www.unicode.org/terms_of_use.html
  */
 
 /*
- * Created on Mon Oct 21 16:33:35 2013 from UCD data files with version info:
+ * Created on Mon Apr 28 11:24:35 2014 from UCD data files with version info:
  *
 
 # Date: 2013-09-27, 23:05:00 GMT [KW]
 #
 # Unicode Character Database
 # Copyright (c) 1991-2013 Unicode, Inc.
 # For terms of use, see http://www.unicode.org/terms_of_use.html
 #
@@ -176,18 +176,19 @@ enum {
   MOZ_SCRIPT_MANDAIC = 95,
   MOZ_SCRIPT_CHAKMA = 96,
   MOZ_SCRIPT_MEROITIC_CURSIVE = 97,
   MOZ_SCRIPT_MEROITIC_HIEROGLYPHS = 98,
   MOZ_SCRIPT_MIAO = 99,
   MOZ_SCRIPT_SHARADA = 100,
   MOZ_SCRIPT_SORA_SOMPENG = 101,
   MOZ_SCRIPT_TAKRI = 102,
+  MOZ_SCRIPT_MATHEMATICAL_NOTATION = 103,
 
-  MOZ_NUM_SCRIPT_CODES = 103,
+  MOZ_NUM_SCRIPT_CODES = 104,
 
   MOZ_SCRIPT_INVALID = -1
 };
 
 #endif
 /*
  * * * * * This file contains MACHINE-GENERATED DATA, do not edit! * * * * *
  */