From c06f296d87a12ce66afef8cc75d4918e0c3a6a22 Mon Sep 17 00:00:00 2001 From: "Reece H. Dunn" Date: Mon, 24 Dec 2012 21:34:34 +0000 Subject: [PATCH] tools/scripts.py: merge some script set ranges --- src/scripts.cpp | 9 ++------- tools/scripts.py | 9 ++------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/src/scripts.cpp b/src/scripts.cpp index dc783bdd..7ec114c1 100644 --- a/src/scripts.cpp +++ b/src/scripts.cpp @@ -3020,8 +3020,7 @@ ucd::script ucd::lookup_script(codepoint_t c) const uint8_t *table = scripts_000000_00D7FF[(c - 0x000000) / 256]; return (ucd::script)table[c % 256]; } - if (c <= 0x00DFFF) return Zzzz; // 00D800..00DFFF : Surrogates - if (c <= 0x00F8FF) return Zzzz; // 00E000..00F8FF : Private Use Area + if (c <= 0x00F8FF) return Zzzz; // 00D800..00F8FF : Surrogates / Private Use Area if (c <= 0x02FAFF) // 00F900..02FAFF { const uint8_t *table = scripts_00F900_02FAFF[(c - 0x00F900) / 256]; @@ -3033,10 +3032,6 @@ ucd::script ucd::lookup_script(codepoint_t c) const uint8_t *table = scripts_0E0000_0E01FF[(c - 0x0E0000) / 256]; return (ucd::script)table[c % 256]; } - if (c <= 0x0EFFFF) return Zzzz; // 0E0200..0EFFFF : Unassigned - if (c <= 0x0FFFFD) return Zzzz; // 0F0000..0FFFFD : Plane 15 Private Use - if (c <= 0x0FFFFF) return Zzzz; // 0FFFFE..0FFFFF : Plane 15 Private Use - if (c <= 0x10FFFD) return Zzzz; // 100000..10FFFD : Plane 16 Private Use - if (c <= 0x10FFFF) return Zzzz; // 10FFFE..10FFFF : Plane 16 Private Use + if (c <= 0x10FFFF) return Zzzz; // 0E0200..10FFFF : Unassigned return Zzzz; // Invalid Unicode Codepoint } diff --git a/tools/scripts.py b/tools/scripts.py index 41d5b83b..5bcdf910 100755 --- a/tools/scripts.py +++ b/tools/scripts.py @@ -34,16 +34,11 @@ for data in ucd.parse_ucd_data(ucd_rootdir, 'Scripts'): # need to be generated. script_sets = [ (ucd.CodeRange('000000..00D7FF'), None, 'Multiple Blocks'), - (ucd.CodeRange('00D800..00DFFF'), 'Zzzz', 'Surrogates'), - (ucd.CodeRange('00E000..00F8FF'), 'Zzzz', 'Private Use Area'), + (ucd.CodeRange('00D800..00F8FF'), 'Zzzz', 'Surrogates / Private Use Area'), (ucd.CodeRange('00F900..02FAFF'), None, 'Multiple Blocks'), (ucd.CodeRange('02FB00..0DFFFF'), 'Zzzz', 'Unassigned'), (ucd.CodeRange('0E0000..0E01FF'), None, 'Multiple Blocks'), - (ucd.CodeRange('0E0200..0EFFFF'), 'Zzzz', 'Unassigned'), - (ucd.CodeRange('0F0000..0FFFFD'), 'Zzzz', 'Plane 15 Private Use'), - (ucd.CodeRange('0FFFFE..0FFFFF'), 'Zzzz', 'Plane 15 Private Use'), - (ucd.CodeRange('100000..10FFFD'), 'Zzzz', 'Plane 16 Private Use'), - (ucd.CodeRange('10FFFE..10FFFF'), 'Zzzz', 'Plane 16 Private Use'), + (ucd.CodeRange('0E0200..10FFFF'), 'Zzzz', 'Unassigned'), ] # These scripts have many pages consisting of just this script: