From 7fc4f5ece21690c3e2601b8b73a492b2a454b4af Mon Sep 17 00:00:00 2001 From: "Reece H. Dunn" Date: Mon, 17 Apr 2017 17:35:26 +0100 Subject: [PATCH] ucd-tools: Ellipsis eSpeakNG extended property support. --- src/ucd-tools/data/espeak-ng/PropList.txt | 10 ++++++++++ src/ucd-tools/src/include/ucd/ucd.h | 1 + src/ucd-tools/src/proplist.c | 8 ++++++-- src/ucd-tools/tools/printdata.py | 1 + 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/ucd-tools/data/espeak-ng/PropList.txt b/src/ucd-tools/data/espeak-ng/PropList.txt index 1210697c..80866d6a 100644 --- a/src/ucd-tools/data/espeak-ng/PropList.txt +++ b/src/ucd-tools/data/espeak-ng/PropList.txt @@ -159,3 +159,13 @@ FF1B ; Semi_Colon # Po FULLWIDTH SEMICOLON E003B ; Semi_Colon # Cf TAG SEMICOLON # Total code points: 13 + +# ================================================ + +0EAF ; Ellipsis # Lo LAO ELLIPSIS +1801 ; Ellipsis # Po MONGOLIAN ELLIPSIS +2026 ; Ellipsis # Po HORIZONTAL ELLIPSIS +22EE..22F1 ; Ellipsis # Sm [4] VERTICAL ELLIPSIS..DOWN RIGHT DIAGONAL ELLIPSIS +FE19 ; Ellipsis # Po PRESENTATION FORM FOR VERTICAL HORIZONTAL ELLIPSIS + +# Total code points: 8 diff --git a/src/ucd-tools/src/include/ucd/ucd.h b/src/ucd-tools/src/include/ucd/ucd.h index 3117d755..fbdd6ce8 100644 --- a/src/ucd-tools/src/include/ucd/ucd.h +++ b/src/ucd-tools/src/include/ucd/ucd.h @@ -363,6 +363,7 @@ static const ucd_property UCD_PROPERTY_PATTERN_SYNTAX = 0x00 static const ucd_property UCD_PROPERTY_PREPENDED_CONCATENATION_MARK = 0x0000000100000000ull; /**< @brief Prepended_Concatenation_Mark */ // eSpeak NG extended properties: +static const ucd_property ESPEAKNG_PROPERTY_ELLIPSIS = 0x0200000000000000ull; /**< @brief Ellipsis */ static const ucd_property ESPEAKNG_PROPERTY_SEMI_COLON = 0x0400000000000000ull; /**< @brief Semi_Colon */ static const ucd_property ESPEAKNG_PROPERTY_COLON = 0x0800000000000000ull; /**< @brief Colon */ static const ucd_property ESPEAKNG_PROPERTY_COMMA = 0x1000000000000000ull; /**< @brief Comma */ diff --git a/src/ucd-tools/src/proplist.c b/src/ucd-tools/src/proplist.c index 82f1be7e..d0d20265 100644 --- a/src/ucd-tools/src/proplist.c +++ b/src/ucd-tools/src/proplist.c @@ -350,6 +350,7 @@ static ucd_property properties_Lo(codepoint_t c) break; case 0x0E00: if (c >= 0x0E40 && c <= 0x0E44) return UCD_PROPERTY_LOGICAL_ORDER_EXCEPTION; + if (c == 0x0EAF) return ESPEAKNG_PROPERTY_ELLIPSIS; if (c >= 0x0EC0 && c <= 0x0EC4) return UCD_PROPERTY_LOGICAL_ORDER_EXCEPTION; break; case 0x1100: @@ -1417,9 +1418,9 @@ static ucd_property properties_Po(codepoint_t c) if (c == 0x17DA) return UCD_PROPERTY_TERMINAL_PUNCTUATION; break; case 0x1800: - if (c == 0x1803) return UCD_PROPERTY_TERMINAL_PUNCTUATION | UCD_PROPERTY_SENTENCE_TERMINAL | ESPEAKNG_PROPERTY_FULL_STOP; + if (c == 0x1801) return ESPEAKNG_PROPERTY_ELLIPSIS; if (c == 0x1802) return UCD_PROPERTY_TERMINAL_PUNCTUATION | ESPEAKNG_PROPERTY_COMMA; - if (c == 0x1803) return UCD_PROPERTY_TERMINAL_PUNCTUATION; + if (c == 0x1803) return UCD_PROPERTY_TERMINAL_PUNCTUATION | UCD_PROPERTY_SENTENCE_TERMINAL | ESPEAKNG_PROPERTY_FULL_STOP; if (c == 0x1804) return UCD_PROPERTY_TERMINAL_PUNCTUATION | ESPEAKNG_PROPERTY_COLON; if (c == 0x1805) return UCD_PROPERTY_TERMINAL_PUNCTUATION; if (c == 0x1808) return UCD_PROPERTY_TERMINAL_PUNCTUATION | ESPEAKNG_PROPERTY_COMMA; @@ -1447,6 +1448,7 @@ static ucd_property properties_Po(codepoint_t c) case 0x2000: if (c == 0x2016) return UCD_PROPERTY_OTHER_MATH | UCD_PROPERTY_PATTERN_SYNTAX; if (c == 0x2017) return UCD_PROPERTY_PATTERN_SYNTAX; + if (c == 0x2026) return UCD_PROPERTY_PATTERN_SYNTAX | ESPEAKNG_PROPERTY_ELLIPSIS; if (c >= 0x2020 && c <= 0x2027) return UCD_PROPERTY_PATTERN_SYNTAX; if (c >= 0x2032 && c <= 0x2034) return UCD_PROPERTY_PATTERN_SYNTAX | UCD_PROPERTY_OTHER_MATH; if (c >= 0x2030 && c <= 0x2038) return UCD_PROPERTY_PATTERN_SYNTAX; @@ -1520,6 +1522,7 @@ static ucd_property properties_Po(codepoint_t c) if (c == 0xFE14) return ESPEAKNG_PROPERTY_SEMI_COLON; if (c == 0xFE15) return ESPEAKNG_PROPERTY_EXCLAMATION_MARK; if (c == 0xFE16) return ESPEAKNG_PROPERTY_QUESTION_MARK; + if (c == 0xFE19) return ESPEAKNG_PROPERTY_ELLIPSIS; if (c >= 0xFE45 && c <= 0xFE46) return UCD_PROPERTY_PATTERN_SYNTAX; if (c >= 0xFE50 && c <= 0xFE51) return UCD_PROPERTY_TERMINAL_PUNCTUATION | ESPEAKNG_PROPERTY_COMMA; if (c == 0xFE52) return UCD_PROPERTY_TERMINAL_PUNCTUATION | UCD_PROPERTY_SENTENCE_TERMINAL | ESPEAKNG_PROPERTY_FULL_STOP; @@ -1754,6 +1757,7 @@ static ucd_property properties_Sm(codepoint_t c) break; case 0x2200: if (c == 0x2212) return UCD_PROPERTY_DASH | UCD_PROPERTY_PATTERN_SYNTAX; + if (c >= 0x22EE && c <= 0x22F1) return UCD_PROPERTY_PATTERN_SYNTAX | ESPEAKNG_PROPERTY_ELLIPSIS; return UCD_PROPERTY_PATTERN_SYNTAX; case 0x2300: case 0x2500: diff --git a/src/ucd-tools/tools/printdata.py b/src/ucd-tools/tools/printdata.py index 6948cd89..2482087b 100755 --- a/src/ucd-tools/tools/printdata.py +++ b/src/ucd-tools/tools/printdata.py @@ -161,6 +161,7 @@ def properties(data): props += (2 ** 31) * data.get('Pattern_Syntax', 0) props += (2 ** 32) * data.get('Prepended_Concatenation_Mark', 0) # eSpeak NG extended properties: + props += (2 ** 57) * data.get('Ellipsis', 0) props += (2 ** 58) * data.get('Semi_Colon', 0) props += (2 ** 59) * data.get('Colon', 0) props += (2 ** 60) * data.get('Comma', 0)