From 461c2b20044359b80df8217a7565c7b8a60a1f0b Mon Sep 17 00:00:00 2001 From: Konstantin Ritt Date: Fri, 18 Jul 2014 03:13:19 +0300 Subject: Update bundled HarfBuzz-NG copy to 0.9.32 - Unicode 7.0 support - New shapers - Multiple improvements in Arabic, Indic, and Hebrew shapers - Build fixes, optimizations, etc. Change-Id: I0ba14b619c3e6fb35cddd9d65e694af41197d6ae Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/3rdparty/harfbuzz-ng/src/config.h | 14 - src/3rdparty/harfbuzz-ng/src/hb-atomic-private.hh | 14 +- src/3rdparty/harfbuzz-ng/src/hb-blob.cc | 2 + src/3rdparty/harfbuzz-ng/src/hb-blob.h | 7 +- src/3rdparty/harfbuzz-ng/src/hb-buffer-private.hh | 1 + .../harfbuzz-ng/src/hb-buffer-serialize.cc | 2 +- src/3rdparty/harfbuzz-ng/src/hb-buffer.cc | 87 +- src/3rdparty/harfbuzz-ng/src/hb-buffer.h | 23 +- src/3rdparty/harfbuzz-ng/src/hb-common.cc | 28 +- src/3rdparty/harfbuzz-ng/src/hb-common.h | 27 +- src/3rdparty/harfbuzz-ng/src/hb-coretext.cc | 200 +- src/3rdparty/harfbuzz-ng/src/hb-coretext.h | 6 +- .../harfbuzz-ng/src/hb-open-file-private.hh | 12 +- .../harfbuzz-ng/src/hb-open-type-private.hh | 125 +- src/3rdparty/harfbuzz-ng/src/hb-ot-cmap-table.hh | 517 ++++++ src/3rdparty/harfbuzz-ng/src/hb-ot-font.cc | 289 +++ src/3rdparty/harfbuzz-ng/src/hb-ot-font.h | 41 + src/3rdparty/harfbuzz-ng/src/hb-ot-head-table.hh | 6 +- src/3rdparty/harfbuzz-ng/src/hb-ot-hhea-table.hh | 4 +- src/3rdparty/harfbuzz-ng/src/hb-ot-hmtx-table.hh | 2 +- .../harfbuzz-ng/src/hb-ot-layout-common-private.hh | 37 +- .../harfbuzz-ng/src/hb-ot-layout-gdef-table.hh | 10 +- .../harfbuzz-ng/src/hb-ot-layout-gpos-table.hh | 28 +- .../harfbuzz-ng/src/hb-ot-layout-gsub-table.hh | 58 +- .../src/hb-ot-layout-gsubgpos-private.hh | 57 +- .../harfbuzz-ng/src/hb-ot-layout-jstf-table.hh | 2 +- .../harfbuzz-ng/src/hb-ot-layout-private.hh | 64 +- src/3rdparty/harfbuzz-ng/src/hb-ot-layout.cc | 34 +- src/3rdparty/harfbuzz-ng/src/hb-ot-layout.h | 14 +- src/3rdparty/harfbuzz-ng/src/hb-ot-map-private.hh | 18 +- src/3rdparty/harfbuzz-ng/src/hb-ot-map.cc | 54 +- src/3rdparty/harfbuzz-ng/src/hb-ot-maxp-table.hh | 4 +- src/3rdparty/harfbuzz-ng/src/hb-ot-name-table.hh | 2 +- .../src/hb-ot-shape-complex-arabic-fallback.hh | 2 +- .../src/hb-ot-shape-complex-arabic-table.hh | 1239 ++++--------- .../harfbuzz-ng/src/hb-ot-shape-complex-arabic.cc | 150 +- .../harfbuzz-ng/src/hb-ot-shape-complex-hangul.cc | 36 +- .../harfbuzz-ng/src/hb-ot-shape-complex-hebrew.cc | 136 +- .../src/hb-ot-shape-complex-indic-machine.hh | 1920 ++++++++++---------- .../src/hb-ot-shape-complex-indic-private.hh | 111 +- .../src/hb-ot-shape-complex-indic-table.cc | 721 ++++---- .../harfbuzz-ng/src/hb-ot-shape-complex-indic.cc | 334 ++-- .../src/hb-ot-shape-complex-myanmar-machine.hh | 14 +- .../harfbuzz-ng/src/hb-ot-shape-complex-myanmar.cc | 73 +- .../harfbuzz-ng/src/hb-ot-shape-complex-private.hh | 4 + .../harfbuzz-ng/src/hb-ot-shape-complex-sea.cc | 15 +- .../harfbuzz-ng/src/hb-ot-shape-complex-thai.cc | 89 +- .../harfbuzz-ng/src/hb-ot-shape-fallback.cc | 70 +- .../harfbuzz-ng/src/hb-ot-shape-private.hh | 2 + src/3rdparty/harfbuzz-ng/src/hb-ot-shape.cc | 98 +- src/3rdparty/harfbuzz-ng/src/hb-ot-shape.h | 21 +- src/3rdparty/harfbuzz-ng/src/hb-ot-tag.cc | 62 +- src/3rdparty/harfbuzz-ng/src/hb-ot.h | 1 + src/3rdparty/harfbuzz-ng/src/hb-private.hh | 186 +- src/3rdparty/harfbuzz-ng/src/hb-shape-plan.cc | 4 +- src/3rdparty/harfbuzz-ng/src/hb-shaper-list.hh | 12 +- src/3rdparty/harfbuzz-ng/src/hb-unicode-private.hh | 111 +- src/3rdparty/harfbuzz-ng/src/hb-unicode.cc | 11 +- src/3rdparty/harfbuzz-ng/src/hb-utf-private.hh | 319 ++-- src/3rdparty/harfbuzz-ng/src/hb-version.h | 14 +- src/3rdparty/harfbuzz-ng/src/hb-warning.cc | 11 - 61 files changed, 4162 insertions(+), 3393 deletions(-) delete mode 100644 src/3rdparty/harfbuzz-ng/src/config.h create mode 100644 src/3rdparty/harfbuzz-ng/src/hb-ot-cmap-table.hh create mode 100644 src/3rdparty/harfbuzz-ng/src/hb-ot-font.cc create mode 100644 src/3rdparty/harfbuzz-ng/src/hb-ot-font.h (limited to 'src/3rdparty/harfbuzz-ng/src') diff --git a/src/3rdparty/harfbuzz-ng/src/config.h b/src/3rdparty/harfbuzz-ng/src/config.h deleted file mode 100644 index 9abb5df7f1..0000000000 --- a/src/3rdparty/harfbuzz-ng/src/config.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef HB_CONFIG_H -#define HB_CONFIG_H - -#define HAVE_OT -#define HAVE_ATEXIT - -#define HB_NO_UNICODE_FUNCS - -#define HB_DISABLE_DEPRECATED - -// because strdup() is not part of strict Posix, declare it here -extern "C" char *strdup(const char *src); - -#endif /* HB_CONFIG_H */ diff --git a/src/3rdparty/harfbuzz-ng/src/hb-atomic-private.hh b/src/3rdparty/harfbuzz-ng/src/hb-atomic-private.hh index b5d64853ea..60cbcf91be 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-atomic-private.hh +++ b/src/3rdparty/harfbuzz-ng/src/hb-atomic-private.hh @@ -47,18 +47,22 @@ #define WIN32_LEAN_AND_MEAN #include -#if defined(__MINGW32__) && !defined(MemoryBarrier) +/* MinGW has a convoluted history of supporting MemoryBarrier + * properly. As such, define a function to wrap the whole + * thing. */ static inline void _HBMemoryBarrier (void) { +#if !defined(MemoryBarrier) long dummy = 0; InterlockedExchange (&dummy, 1); -} -# define MemoryBarrier _HBMemoryBarrier +#else + MemoryBarrier (); #endif +} typedef LONG hb_atomic_int_t; #define hb_atomic_int_add(AI, V) InterlockedExchangeAdd (&(AI), (V)) -#define hb_atomic_ptr_get(P) (MemoryBarrier (), (void *) *(P)) +#define hb_atomic_ptr_get(P) (_HBMemoryBarrier (), (void *) *(P)) #define hb_atomic_ptr_cmpexch(P,O,N) (InterlockedCompareExchangePointer ((void **) (P), (void *) (N), (void *) (O)) == (void *) (O)) @@ -78,7 +82,7 @@ typedef int32_t hb_atomic_int_t; #if (MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_4 || __IPHONE_VERSION_MIN_REQUIRED >= 20100) #define hb_atomic_ptr_cmpexch(P,O,N) OSAtomicCompareAndSwapPtrBarrier ((void *) (O), (void *) (N), (void **) (P)) #else -#if __ppc64__ || __x86_64__ || __arm64__ +#if __ppc64__ || __x86_64__ || __aarch64__ #define hb_atomic_ptr_cmpexch(P,O,N) OSAtomicCompareAndSwap64Barrier ((int64_t) (O), (int64_t) (N), (int64_t*) (P)) #else #define hb_atomic_ptr_cmpexch(P,O,N) OSAtomicCompareAndSwap32Barrier ((int32_t) (O), (int32_t) (N), (int32_t*) (P)) diff --git a/src/3rdparty/harfbuzz-ng/src/hb-blob.cc b/src/3rdparty/harfbuzz-ng/src/hb-blob.cc index d6acca0fca..b82b4b2a3a 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-blob.cc +++ b/src/3rdparty/harfbuzz-ng/src/hb-blob.cc @@ -25,7 +25,9 @@ */ /* http://www.oracle.com/technetwork/articles/servers-storage-dev/standardheaderfiles-453865.html */ +#ifndef _POSIX_C_SOURCE #define _POSIX_C_SOURCE 199309L +#endif #include "hb-private.hh" diff --git a/src/3rdparty/harfbuzz-ng/src/hb-blob.h b/src/3rdparty/harfbuzz-ng/src/hb-blob.h index d3d0f41b11..b2419abfd2 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-blob.h +++ b/src/3rdparty/harfbuzz-ng/src/hb-blob.h @@ -47,14 +47,13 @@ HB_BEGIN_DECLS * - Use MODE_READONLY otherse, unless you really really * really know what you are doing, * - * - MODE_WRITABLE is appropriate if you relaly made a + * - MODE_WRITABLE is appropriate if you really made a * copy of data solely for the purpose of passing to * HarfBuzz and doing that just once (no reuse!), * * - If the font is mmap()ed, it's ok to use - * READONLY_MAY_MAKE_WRITABLE, however, there were - * design problems with that mode, so HarfBuzz do not - * really use it anymore. If not sure, use MODE_READONLY. + * READONLY_MAY_MAKE_WRITABLE, however, using that mode + * correctly is very tricky. Use MODE_READONLY instead. */ typedef enum { HB_MEMORY_MODE_DUPLICATE, diff --git a/src/3rdparty/harfbuzz-ng/src/hb-buffer-private.hh b/src/3rdparty/harfbuzz-ng/src/hb-buffer-private.hh index 3a2b9ab481..5eccd3c31f 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-buffer-private.hh +++ b/src/3rdparty/harfbuzz-ng/src/hb-buffer-private.hh @@ -52,6 +52,7 @@ struct hb_buffer_t { hb_unicode_funcs_t *unicode; /* Unicode functions */ hb_segment_properties_t props; /* Script, language, direction */ hb_buffer_flags_t flags; /* BOT / EOT / etc. */ + hb_codepoint_t replacement; /* U+FFFD or something else. */ /* Buffer contents */ diff --git a/src/3rdparty/harfbuzz-ng/src/hb-buffer-serialize.cc b/src/3rdparty/harfbuzz-ng/src/hb-buffer-serialize.cc index 263bc81dc4..406d69db75 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-buffer-serialize.cc +++ b/src/3rdparty/harfbuzz-ng/src/hb-buffer-serialize.cc @@ -63,7 +63,7 @@ hb_buffer_serialize_format_t hb_buffer_serialize_format_from_string (const char *str, int len) { /* Upper-case it. */ - return (hb_buffer_serialize_format_t) (hb_tag_from_string (str, len) & ~0x20202020); + return (hb_buffer_serialize_format_t) (hb_tag_from_string (str, len) & ~0x20202020u); } /** diff --git a/src/3rdparty/harfbuzz-ng/src/hb-buffer.cc b/src/3rdparty/harfbuzz-ng/src/hb-buffer.cc index d6c6fcb8e6..2377ba40da 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-buffer.cc +++ b/src/3rdparty/harfbuzz-ng/src/hb-buffer.cc @@ -178,6 +178,7 @@ hb_buffer_t::reset (void) hb_unicode_funcs_destroy (unicode); unicode = hb_unicode_funcs_get_default (); + replacement = HB_BUFFER_REPLACEMENT_CODEPOINT_DEFAULT; clear (); } @@ -500,6 +501,10 @@ void hb_buffer_t::merge_clusters (unsigned int start, unsigned int end) { +#ifdef HB_NO_MERGE_CLUSTERS + return; +#endif + if (unlikely (end - start < 2)) return; @@ -528,6 +533,10 @@ void hb_buffer_t::merge_out_clusters (unsigned int start, unsigned int end) { +#ifdef HB_NO_MERGE_CLUSTERS + return; +#endif + if (unlikely (end - start < 2)) return; @@ -695,6 +704,7 @@ hb_buffer_get_empty (void) const_cast (&_hb_unicode_funcs_nil), HB_SEGMENT_PROPERTIES_DEFAULT, HB_BUFFER_FLAG_DEFAULT, + HB_BUFFER_REPLACEMENT_CODEPOINT_DEFAULT, HB_BUFFER_CONTENT_TYPE_INVALID, true, /* in_error */ @@ -1039,6 +1049,42 @@ hb_buffer_get_flags (hb_buffer_t *buffer) } +/** + * hb_buffer_set_replacement_codepoint: + * @buffer: a buffer. + * @replacement: + * + * + * + * Since: 1.0 + **/ +void +hb_buffer_set_replacement_codepoint (hb_buffer_t *buffer, + hb_codepoint_t replacement) +{ + if (unlikely (hb_object_is_inert (buffer))) + return; + + buffer->replacement = replacement; +} + +/** + * hb_buffer_get_replacement_codepoint: + * @buffer: a buffer. + * + * + * + * Return value: + * + * Since: 1.0 + **/ +hb_codepoint_t +hb_buffer_get_replacement_codepoint (hb_buffer_t *buffer) +{ + return buffer->replacement; +} + + /** * hb_buffer_reset: * @buffer: a buffer. @@ -1282,7 +1328,7 @@ hb_buffer_guess_segment_properties (hb_buffer_t *buffer) buffer->guess_segment_properties (); } -template +template static inline void hb_buffer_add_utf (hb_buffer_t *buffer, const T *text, @@ -1290,6 +1336,9 @@ hb_buffer_add_utf (hb_buffer_t *buffer, unsigned int item_offset, int item_length) { + typedef hb_utf_t utf_t; + const hb_codepoint_t replacement = buffer->replacement; + assert (buffer->content_type == HB_BUFFER_CONTENT_TYPE_UNICODE || (!buffer->len && buffer->content_type == HB_BUFFER_CONTENT_TYPE_INVALID)); @@ -1297,7 +1346,7 @@ hb_buffer_add_utf (hb_buffer_t *buffer, return; if (text_length == -1) - text_length = hb_utf_strlen (text); + text_length = utf_t::strlen (text); if (item_length == -1) item_length = text_length - item_offset; @@ -1320,7 +1369,7 @@ hb_buffer_add_utf (hb_buffer_t *buffer, while (start < prev && buffer->context_len[0] < buffer->CONTEXT_LENGTH) { hb_codepoint_t u; - prev = hb_utf_prev (prev, start, &u); + prev = utf_t::prev (prev, start, &u, replacement); buffer->context[0][buffer->context_len[0]++] = u; } } @@ -1331,7 +1380,7 @@ hb_buffer_add_utf (hb_buffer_t *buffer, { hb_codepoint_t u; const T *old_next = next; - next = hb_utf_next (next, end, &u); + next = utf_t::next (next, end, &u, replacement); buffer->add (u, old_next - (const T *) text); } @@ -1341,7 +1390,7 @@ hb_buffer_add_utf (hb_buffer_t *buffer, while (next < end && buffer->context_len[1] < buffer->CONTEXT_LENGTH) { hb_codepoint_t u; - next = hb_utf_next (next, end, &u); + next = utf_t::next (next, end, &u, replacement); buffer->context[1][buffer->context_len[1]++] = u; } @@ -1367,7 +1416,7 @@ hb_buffer_add_utf8 (hb_buffer_t *buffer, unsigned int item_offset, int item_length) { - hb_buffer_add_utf (buffer, (const uint8_t *) text, text_length, item_offset, item_length); + hb_buffer_add_utf (buffer, (const uint8_t *) text, text_length, item_offset, item_length); } /** @@ -1389,7 +1438,7 @@ hb_buffer_add_utf16 (hb_buffer_t *buffer, unsigned int item_offset, int item_length) { - hb_buffer_add_utf (buffer, text, text_length, item_offset, item_length); + hb_buffer_add_utf (buffer, text, text_length, item_offset, item_length); } /** @@ -1411,7 +1460,29 @@ hb_buffer_add_utf32 (hb_buffer_t *buffer, unsigned int item_offset, int item_length) { - hb_buffer_add_utf (buffer, text, text_length, item_offset, item_length); + hb_buffer_add_utf (buffer, text, text_length, item_offset, item_length); +} + +/** + * hb_buffer_add_codepoints: + * @buffer: a buffer. + * @text: (array length=text_length): + * @text_length: + * @item_offset: + * @item_length: + * + * + * + * Since: 1.0 + **/ +void +hb_buffer_add_codepoints (hb_buffer_t *buffer, + const hb_codepoint_t *text, + int text_length, + unsigned int item_offset, + int item_length) +{ + hb_buffer_add_utf (buffer, text, text_length, item_offset, item_length); } diff --git a/src/3rdparty/harfbuzz-ng/src/hb-buffer.h b/src/3rdparty/harfbuzz-ng/src/hb-buffer.h index 3086851b01..7b0c920468 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-buffer.h +++ b/src/3rdparty/harfbuzz-ng/src/hb-buffer.h @@ -186,12 +186,25 @@ hb_buffer_flags_t hb_buffer_get_flags (hb_buffer_t *buffer); + +#define HB_BUFFER_REPLACEMENT_CODEPOINT_DEFAULT 0xFFFDu + +/* Sets codepoint used to replace invalid UTF-8/16/32 entries. + * Default is 0xFFFDu. */ +void +hb_buffer_set_replacement_codepoint (hb_buffer_t *buffer, + hb_codepoint_t replacement); + +hb_codepoint_t +hb_buffer_get_replacement_codepoint (hb_buffer_t *buffer); + + /* Resets the buffer. Afterwards it's as if it was just created, * except that it has a larger buffer allocated perhaps... */ void hb_buffer_reset (hb_buffer_t *buffer); -/* Like reset, but does NOT clear unicode_funcs. */ +/* Like reset, but does NOT clear unicode_funcs and replacement_codepoint. */ void hb_buffer_clear_contents (hb_buffer_t *buffer); @@ -240,6 +253,14 @@ hb_buffer_add_utf32 (hb_buffer_t *buffer, unsigned int item_offset, int item_length); +/* Like add_utf32 but does NOT check for invalid Unicode codepoints. */ +void +hb_buffer_add_codepoints (hb_buffer_t *buffer, + const hb_codepoint_t *text, + int text_length, + unsigned int item_offset, + int item_length); + /* Clears any new items added at the end */ hb_bool_t diff --git a/src/3rdparty/harfbuzz-ng/src/hb-common.cc b/src/3rdparty/harfbuzz-ng/src/hb-common.cc index 0fd790bc04..a089e52cd2 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-common.cc +++ b/src/3rdparty/harfbuzz-ng/src/hb-common.cc @@ -234,6 +234,7 @@ struct hb_language_item_t { static hb_language_item_t *langs; +#ifdef HAVE_ATEXIT static inline void free_langs (void) { @@ -244,6 +245,7 @@ void free_langs (void) langs = next; } } +#endif static hb_language_item_t * lang_find_or_insert (const char *key) @@ -297,9 +299,11 @@ hb_language_from_string (const char *str, int len) if (len >= 0) { + /* NUL-terminate it. */ len = MIN (len, (int) sizeof (strbuf) - 1); - str = (char *) memcpy (strbuf, str, len); + memcpy (strbuf, str, len); strbuf[len] = '\0'; + str = strbuf; } hb_language_item_t *item = lang_find_or_insert (str); @@ -367,7 +371,7 @@ hb_script_from_iso15924_tag (hb_tag_t tag) return HB_SCRIPT_INVALID; /* Be lenient, adjust case (one capital letter followed by three small letters) */ - tag = (tag & 0xDFDFDFDF) | 0x00202020; + tag = (tag & 0xDFDFDFDFu) | 0x00202020u; switch (tag) { @@ -387,7 +391,7 @@ hb_script_from_iso15924_tag (hb_tag_t tag) } /* If it looks right, just use the tag as a script */ - if (((uint32_t) tag & 0xE0E0E0E0) == 0x40606060) + if (((uint32_t) tag & 0xE0E0E0E0u) == 0x40606060u) return (hb_script_t) tag; /* Otherwise, return unknown */ @@ -480,6 +484,14 @@ hb_script_get_horizontal_direction (hb_script_t script) case HB_SCRIPT_MEROITIC_CURSIVE: case HB_SCRIPT_MEROITIC_HIEROGLYPHS: + /* Unicode-7.0 additions */ + case HB_SCRIPT_MANICHAEAN: + case HB_SCRIPT_MENDE_KIKAKUI: + case HB_SCRIPT_NABATAEAN: + case HB_SCRIPT_OLD_NORTH_ARABIAN: + case HB_SCRIPT_PALMYRENE: + case HB_SCRIPT_PSALTER_PAHLAVI: + return HB_DIRECTION_RTL; } @@ -557,7 +569,7 @@ hb_version_string (void) } /** - * hb_version_check: + * hb_version_atleast: * @major: * @minor: * @micro: @@ -569,9 +581,9 @@ hb_version_string (void) * Since: 1.0 **/ hb_bool_t -hb_version_check (unsigned int major, - unsigned int minor, - unsigned int micro) +hb_version_atleast (unsigned int major, + unsigned int minor, + unsigned int micro) { - return HB_VERSION_CHECK (major, minor, micro); + return HB_VERSION_ATLEAST (major, minor, micro); } diff --git a/src/3rdparty/harfbuzz-ng/src/hb-common.h b/src/3rdparty/harfbuzz-ng/src/hb-common.h index c8bfd8825a..b24cbb33ba 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-common.h +++ b/src/3rdparty/harfbuzz-ng/src/hb-common.h @@ -270,17 +270,6 @@ typedef enum /*6.1*/ HB_SCRIPT_SORA_SOMPENG = HB_TAG ('S','o','r','a'), /*6.1*/ HB_SCRIPT_TAKRI = HB_TAG ('T','a','k','r'), - /* No script set. */ - /*---*/ HB_SCRIPT_INVALID = HB_TAG_NONE, - - /* Dummy value to ensure any hb_tag_t value can be passed/stored as hb_script_t - * without risking undefined behavior. */ - /*---*/ _HB_SCRIPT_MAX_VALUE = HB_TAG_MAX - -} hb_script_t; - -/* These are moved out of hb_script_t because glib-mkenums chokes otherwise. */ -#if 0 /*7.0*/ HB_SCRIPT_BASSA_VAH = HB_TAG ('B','a','s','s'), /*7.0*/ HB_SCRIPT_CAUCASIAN_ALBANIAN = HB_TAG ('A','g','h','b'), /*7.0*/ HB_SCRIPT_DUPLOYAN = HB_TAG ('D','u','p','l'), @@ -292,19 +281,27 @@ typedef enum /*7.0*/ HB_SCRIPT_MAHAJANI = HB_TAG ('M','a','h','j'), /*7.0*/ HB_SCRIPT_MANICHAEAN = HB_TAG ('M','a','n','i'), /*7.0*/ HB_SCRIPT_MENDE_KIKAKUI = HB_TAG ('M','e','n','d'), - /*7.0*/ HB_SCRIPT_MODI = ??? + /*7.0*/ HB_SCRIPT_MODI = HB_TAG ('M','o','d','i'), /*7.0*/ HB_SCRIPT_MRO = HB_TAG ('M','r','o','o'), /*7.0*/ HB_SCRIPT_NABATAEAN = HB_TAG ('N','b','a','t'), /*7.0*/ HB_SCRIPT_OLD_NORTH_ARABIAN = HB_TAG ('N','a','r','b'), /*7.0*/ HB_SCRIPT_OLD_PERMIC = HB_TAG ('P','e','r','m'), /*7.0*/ HB_SCRIPT_PAHAWH_HMONG = HB_TAG ('H','m','n','g'), /*7.0*/ HB_SCRIPT_PALMYRENE = HB_TAG ('P','a','l','m'), - /*7.0*/ HB_SCRIPT_PAU_CIN_HAU = ??? + /*7.0*/ HB_SCRIPT_PAU_CIN_HAU = HB_TAG ('P','a','u','c'), /*7.0*/ HB_SCRIPT_PSALTER_PAHLAVI = HB_TAG ('P','h','l','p'), - /*7.0*/ HB_SCRIPT_SIDDHAM = ??? + /*7.0*/ HB_SCRIPT_SIDDHAM = HB_TAG ('S','i','d','d'), /*7.0*/ HB_SCRIPT_TIRHUTA = HB_TAG ('T','i','r','h'), /*7.0*/ HB_SCRIPT_WARANG_CITI = HB_TAG ('W','a','r','a'), -#endif + + /* No script set. */ + /*---*/ HB_SCRIPT_INVALID = HB_TAG_NONE, + + /* Dummy value to ensure any hb_tag_t value can be passed/stored as hb_script_t + * without risking undefined behavior. */ + /*---*/ _HB_SCRIPT_MAX_VALUE = HB_TAG_MAX + +} hb_script_t; /* Script functions */ diff --git a/src/3rdparty/harfbuzz-ng/src/hb-coretext.cc b/src/3rdparty/harfbuzz-ng/src/hb-coretext.cc index 2507cd1d9f..e2cd2777ed 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-coretext.cc +++ b/src/3rdparty/harfbuzz-ng/src/hb-coretext.cc @@ -31,18 +31,12 @@ #include "hb-coretext.h" -#include "hb-face-private.hh" - #ifndef HB_DEBUG_CORETEXT #define HB_DEBUG_CORETEXT (HB_DEBUG+0) #endif -HB_SHAPER_DATA_ENSURE_DECLARE(coretext, face) -HB_SHAPER_DATA_ENSURE_DECLARE(coretext, font) - - typedef bool (*qt_get_font_table_func_t) (void *user_data, unsigned int tag, unsigned char *buffer, unsigned int *length); struct FontEngineFaceData { @@ -56,6 +50,42 @@ struct CoreTextFontEngineData { }; +static void +release_table_data (void *user_data) +{ + CFDataRef cf_data = reinterpret_cast (user_data); + CFRelease(cf_data); +} + +static hb_blob_t * +reference_table (hb_face_t *face HB_UNUSED, hb_tag_t tag, void *user_data) +{ + CGFontRef cg_font = reinterpret_cast (user_data); + CFDataRef cf_data = CGFontCopyTableForTag (cg_font, tag); + if (unlikely (!cf_data)) + return NULL; + + const char *data = reinterpret_cast (CFDataGetBytePtr (cf_data)); + const size_t length = CFDataGetLength (cf_data); + if (!data || !length) + return NULL; + + return hb_blob_create (data, length, HB_MEMORY_MODE_READONLY, + reinterpret_cast (const_cast<__CFData *> (cf_data)), + release_table_data); +} + +hb_face_t * +hb_coretext_face_create (CGFontRef cg_font) +{ + return hb_face_create_for_tables (reference_table, CGFontRetain (cg_font), (hb_destroy_func_t) CGFontRelease); +} + + +HB_SHAPER_DATA_ENSURE_DECLARE(coretext, face) +HB_SHAPER_DATA_ENSURE_DECLARE(coretext, font) + + /* * shaper face data */ @@ -76,31 +106,33 @@ release_data (void *info, const void *data, size_t size) hb_coretext_shaper_face_data_t * _hb_coretext_shaper_face_data_create (hb_face_t *face) { - hb_blob_t *mort_blob = face->reference_table (HB_CORETEXT_TAG_MORT); - /* Umm, we just reference the table to check whether it exists. - * Maybe add better API for this? */ - if (!hb_blob_get_length (mort_blob)) - { - hb_blob_destroy (mort_blob); - mort_blob = face->reference_table (HB_CORETEXT_TAG_MORX); - if (!hb_blob_get_length (mort_blob)) - { - hb_blob_destroy (mort_blob); - return NULL; - } - } - hb_blob_destroy (mort_blob); - hb_coretext_shaper_face_data_t *data = (hb_coretext_shaper_face_data_t *) calloc (1, sizeof (hb_coretext_shaper_face_data_t)); if (unlikely (!data)) return NULL; - +#if 0 + if (face->destroy == (hb_destroy_func_t) CGFontRelease) + { + data->cg_font = CGFontRetain ((CGFontRef) face->user_data); + } + else + { + hb_blob_t *blob = hb_face_reference_blob (face); + unsigned int blob_length; + const char *blob_data = hb_blob_get_data (blob, &blob_length); + if (unlikely (!blob_length)) + DEBUG_MSG (CORETEXT, face, "Face has empty blob"); + + CGDataProviderRef provider = CGDataProviderCreateWithData (blob, blob_data, blob_length, &release_data); + data->cg_font = CGFontCreateWithDataProvider (provider); + CGDataProviderRelease (provider); + } +#else FontEngineFaceData *fontEngineFaceData = (FontEngineFaceData *) face->user_data; CoreTextFontEngineData *coreTextFontEngineData = (CoreTextFontEngineData *) fontEngineFaceData->user_data; data->cg_font = coreTextFontEngineData->cgFont; if (likely (data->cg_font)) CFRetain (data->cg_font); - +#endif if (unlikely (!data->cg_font)) { DEBUG_MSG (CORETEXT, face, "Face CGFontCreateWithDataProvider() failed"); free (data); @@ -144,13 +176,17 @@ _hb_coretext_shaper_font_data_create (hb_font_t *font) return NULL; hb_face_t *face = font->face; +#if 0 + hb_coretext_shaper_face_data_t *face_data = HB_SHAPER_DATA_GET (face); + data->ct_font = CTFontCreateWithGraphicsFont (face_data->cg_font, font->y_scale, NULL, NULL); +#else FontEngineFaceData *fontEngineFaceData = (FontEngineFaceData *) face->user_data; CoreTextFontEngineData *coreTextFontEngineData = (CoreTextFontEngineData *) fontEngineFaceData->user_data; data->ct_font = coreTextFontEngineData->ctFont; if (likely (data->ct_font)) CFRetain (data->ct_font); - +#endif if (unlikely (!data->ct_font)) { DEBUG_MSG (CORETEXT, font, "Font CTFontCreateWithGraphicsFont() failed"); free (data); @@ -468,7 +504,7 @@ _hb_coretext_shape (hb_shape_plan_t *shape_plan, event->start = false; event->feature = feature; } - feature_events.sort (); + feature_events.qsort (); /* Add a strategic final event. */ { active_feature_t feature; @@ -498,14 +534,12 @@ _hb_coretext_shape (hb_shape_plan_t *shape_plan, if (unlikely (!range)) goto fail_features; - unsigned int offset = feature_records.len; - if (active_features.len) { CFMutableArrayRef features_array = CFArrayCreateMutable(kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks); /* TODO sort and resolve conflicting features? */ - /* active_features.sort (); */ + /* active_features.qsort (); */ for (unsigned int j = 0; j < active_features.len; j++) { CFStringRef keys[2] = { @@ -603,13 +637,13 @@ _hb_coretext_shape (hb_shape_plan_t *shape_plan, for (unsigned int i = 0; i < buffer->len; i++) { hb_codepoint_t c = buffer->info[i].codepoint; buffer->info[i].utf16_index() = chars_len; - if (likely (c < 0x10000)) + if (likely (c <= 0xFFFFu)) pchars[chars_len++] = c; - else if (unlikely (c >= 0x110000)) - pchars[chars_len++] = 0xFFFD; + else if (unlikely (c > 0x10FFFFu)) + pchars[chars_len++] = 0xFFFDu; else { - pchars[chars_len++] = 0xD800 + ((c - 0x10000) >> 10); - pchars[chars_len++] = 0xDC00 + ((c - 0x10000) & ((1 << 10) - 1)); + pchars[chars_len++] = 0xD800u + ((c - 0x10000u) >> 10); + pchars[chars_len++] = 0xDC00u + ((c - 0x10000u) & ((1 << 10) - 1)); } } @@ -635,7 +669,7 @@ _hb_coretext_shape (hb_shape_plan_t *shape_plan, hb_codepoint_t c = buffer->info[i].codepoint; unsigned int cluster = buffer->info[i].cluster; log_clusters[chars_len++] = cluster; - if (c >= 0x10000 && c < 0x110000) + if (hb_in_range (c, 0x10000u, 0x10FFFFu)) log_clusters[chars_len++] = cluster; /* Surrogates. */ } @@ -705,10 +739,10 @@ _hb_coretext_shape (hb_shape_plan_t *shape_plan, for (CFIndex j = range.location; j < range.location + range.length; j++) { UniChar ch = CFStringGetCharacterAtIndex (string_ref, j); - if (hb_in_range (ch, 0xDC00, 0xDFFF) && range.location < j) + if (hb_in_range (ch, 0xDC00u, 0xDFFFu) && range.location < j) { ch = CFStringGetCharacterAtIndex (string_ref, j - 1); - if (hb_in_range (ch, 0xD800, 0xDBFF)) + if (hb_in_range (ch, 0xD800u, 0xDBFFu)) /* This is the second of a surrogate pair. Don't need .notdef * for this one. */ continue; @@ -866,3 +900,97 @@ _hb_coretext_shape (hb_shape_plan_t *shape_plan, return true; } + + +/* + * AAT shaper + */ + +HB_SHAPER_DATA_ENSURE_DECLARE(coretext_aat, face) +HB_SHAPER_DATA_ENSURE_DECLARE(coretext_aat, font) + + +/* + * shaper face data + */ + +struct hb_coretext_aat_shaper_face_data_t {}; + +hb_coretext_aat_shaper_face_data_t * +_hb_coretext_aat_shaper_face_data_create (hb_face_t *face) +{ + hb_blob_t *mort_blob = face->reference_table (HB_CORETEXT_TAG_MORT); + /* Umm, we just reference the table to check whether it exists. + * Maybe add better API for this? */ + if (!hb_blob_get_length (mort_blob)) + { + hb_blob_destroy (mort_blob); + mort_blob = face->reference_table (HB_CORETEXT_TAG_MORX); + if (!hb_blob_get_length (mort_blob)) + { + hb_blob_destroy (mort_blob); + return NULL; + } + } + hb_blob_destroy (mort_blob); + + return hb_coretext_shaper_face_data_ensure (face) ? (hb_coretext_aat_shaper_face_data_t *) HB_SHAPER_DATA_SUCCEEDED : NULL; +} + +void +_hb_coretext_aat_shaper_face_data_destroy (hb_coretext_aat_shaper_face_data_t *data HB_UNUSED) +{ +} + + +/* + * shaper font data + */ + +struct hb_coretext_aat_shaper_font_data_t {}; + +hb_coretext_aat_shaper_font_data_t * +_hb_coretext_aat_shaper_font_data_create (hb_font_t *font) +{ + return hb_coretext_shaper_font_data_ensure (font) ? (hb_coretext_aat_shaper_font_data_t *) HB_SHAPER_DATA_SUCCEEDED : NULL; +} + +void +_hb_coretext_aat_shaper_font_data_destroy (hb_coretext_aat_shaper_font_data_t *data HB_UNUSED) +{ +} + + +/* + * shaper shape_plan data + */ + +struct hb_coretext_aat_shaper_shape_plan_data_t {}; + +hb_coretext_aat_shaper_shape_plan_data_t * +_hb_coretext_aat_shaper_shape_plan_data_create (hb_shape_plan_t *shape_plan HB_UNUSED, + const hb_feature_t *user_features HB_UNUSED, + unsigned int num_user_features HB_UNUSED) +{ + return (hb_coretext_aat_shaper_shape_plan_data_t *) HB_SHAPER_DATA_SUCCEEDED; +} + +void +_hb_coretext_aat_shaper_shape_plan_data_destroy (hb_coretext_aat_shaper_shape_plan_data_t *data HB_UNUSED) +{ +} + + +/* + * shaper + */ + +hb_bool_t +_hb_coretext_aat_shape (hb_shape_plan_t *shape_plan, + hb_font_t *font, + hb_buffer_t *buffer, + const hb_feature_t *features, + unsigned int num_features) +{ + return _hb_coretext_shape (shape_plan, font, buffer, features, num_features); +} diff --git a/src/3rdparty/harfbuzz-ng/src/hb-coretext.h b/src/3rdparty/harfbuzz-ng/src/hb-coretext.h index aa4bf69a52..25267bc978 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-coretext.h +++ b/src/3rdparty/harfbuzz-ng/src/hb-coretext.h @@ -30,7 +30,7 @@ #include "hb.h" #include -#if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE +#if TARGET_OS_IPHONE # include # include #else @@ -44,6 +44,10 @@ HB_BEGIN_DECLS #define HB_CORETEXT_TAG_MORX HB_TAG('m','o','r','x') +hb_face_t * +hb_coretext_face_create (CGFontRef cg_font); + + CGFontRef hb_coretext_face_get_cg_font (hb_face_t *face); diff --git a/src/3rdparty/harfbuzz-ng/src/hb-open-file-private.hh b/src/3rdparty/harfbuzz-ng/src/hb-open-file-private.hh index 250504ae20..57db59db84 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-open-file-private.hh +++ b/src/3rdparty/harfbuzz-ng/src/hb-open-file-private.hh @@ -110,9 +110,9 @@ typedef struct OffsetTable protected: Tag sfnt_version; /* '\0\001\0\00' if TrueType / 'OTTO' if CFF */ USHORT numTables; /* Number of tables. */ - USHORT searchRange; /* (Maximum power of 2 <= numTables) x 16 */ - USHORT entrySelector; /* Log2(maximum power of 2 <= numTables). */ - USHORT rangeShift; /* NumTables x 16-searchRange. */ + USHORT searchRangeZ; /* (Maximum power of 2 <= numTables) x 16 */ + USHORT entrySelectorZ; /* Log2(maximum power of 2 <= numTables). */ + USHORT rangeShiftZ; /* NumTables x 16-searchRange. */ TableRecord tables[VAR]; /* TableRecord entries. numTables items */ public: DEFINE_SIZE_ARRAY (12, tables); @@ -138,8 +138,8 @@ struct TTCHeaderVersion1 protected: Tag ttcTag; /* TrueType Collection ID string: 'ttcf' */ FixedVersion version; /* Version of the TTC Header (1.0), - * 0x00010000 */ - LongOffsetLongArrayOf + * 0x00010000u */ + ArrayOf, ULONG> table; /* Array of offsets to the OffsetTable for each font * from the beginning of the file */ public: @@ -184,7 +184,7 @@ struct TTCHeader struct { Tag ttcTag; /* TrueType Collection ID string: 'ttcf' */ FixedVersion version; /* Version of the TTC Header (1.0 or 2.0), - * 0x00010000 or 0x00020000 */ + * 0x00010000u or 0x00020000u */ } header; TTCHeaderVersion1 version1; } u; diff --git a/src/3rdparty/harfbuzz-ng/src/hb-open-type-private.hh b/src/3rdparty/harfbuzz-ng/src/hb-open-type-private.hh index 558103a8ec..046df97659 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-open-type-private.hh +++ b/src/3rdparty/harfbuzz-ng/src/hb-open-type-private.hh @@ -42,36 +42,36 @@ namespace OT { /* Cast to struct T, reference to reference */ template -inline const Type& CastR(const TObject &X) +static inline const Type& CastR(const TObject &X) { return reinterpret_cast (X); } template -inline Type& CastR(TObject &X) +static inline Type& CastR(TObject &X) { return reinterpret_cast (X); } /* Cast to struct T, pointer to pointer */ template -inline const Type* CastP(const TObject *X) +static inline const Type* CastP(const TObject *X) { return reinterpret_cast (X); } template -inline Type* CastP(TObject *X) +static inline Type* CastP(TObject *X) { return reinterpret_cast (X); } /* StructAtOffset(P,Ofs) returns the struct T& that is placed at memory * location pointed to by P plus Ofs bytes. */ template -inline const Type& StructAtOffset(const void *P, unsigned int offset) +static inline const Type& StructAtOffset(const void *P, unsigned int offset) { return * reinterpret_cast ((const char *) P + offset); } template -inline Type& StructAtOffset(void *P, unsigned int offset) +static inline Type& StructAtOffset(void *P, unsigned int offset) { return * reinterpret_cast ((char *) P + offset); } /* StructAfter(X) returns the struct T& that is placed after X. * Works with X of variable size also. X must implement get_size() */ template -inline const Type& StructAfter(const TObject &X) +static inline const Type& StructAfter(const TObject &X) { return StructAtOffset(&X, X.get_size()); } template -inline Type& StructAfter(TObject &X) +static inline Type& StructAfter(TObject &X) { return StructAtOffset(&X, X.get_size()); } @@ -132,7 +132,7 @@ inline Type& StructAfter(TObject &X) /* Global nul-content Null pool. Enlarge as necessary. */ /* TODO This really should be a extern HB_INTERNAL and defined somewhere... */ -static const void *_NullPool[64 / sizeof (void *)]; +static const void *_NullPool[(256+8) / sizeof (void *)]; /* Generic nul-content Null objects. */ template @@ -145,7 +145,7 @@ static inline const Type& Null (void) { #define DEFINE_NULL_DATA(Type, data) \ static const char _Null##Type[sizeof (Type) + 1] = data; /* +1 is for nul-termination in data */ \ template <> \ -inline const Type& Null (void) { \ +/*static*/ inline const Type& Null (void) { \ return *CastP (_Null##Type); \ } /* The following line really exists such that we end in a place needing semicolon */ \ ASSERT_STATIC (Type::min_size + 1 <= sizeof (_Null##Type)) @@ -266,6 +266,15 @@ struct hb_sanitize_context_t return TRACE_RETURN (this->writable); } + template + inline bool try_set (Type *obj, const ValueType &v) { + if (this->may_edit (obj, obj->static_size)) { + obj->set (v); + return true; + } + return false; + } + mutable unsigned int debug_depth; const char *start, *end; bool writable; @@ -572,6 +581,7 @@ struct IntType DEFINE_SIZE_STATIC (Size); }; +typedef uint8_t BYTE; /* 8-bit unsigned integer. */ typedef IntType USHORT; /* 16-bit unsigned integer. */ typedef IntType SHORT; /* 16-bit signed integer. */ typedef IntType ULONG; /* 32-bit unsigned integer. */ @@ -616,24 +626,17 @@ typedef USHORT GlyphID; /* Script/language-system/feature index */ struct Index : USHORT { - static const unsigned int NOT_FOUND_INDEX = 0xFFFF; + static const unsigned int NOT_FOUND_INDEX = 0xFFFFu; }; DEFINE_NULL_DATA (Index, "\xff\xff"); -/* Offset to a table, same as uint16 (length = 16 bits), Null offset = 0x0000 */ -struct Offset : USHORT +/* Offset, Null offset = 0 */ +template +struct Offset : Type { inline bool is_null (void) const { return 0 == *this; } public: - DEFINE_SIZE_STATIC (2); -}; - -/* LongOffset to a table, same as uint32 (length = 32 bits), Null offset = 0x00000000 */ -struct LongOffset : ULONG -{ - inline bool is_null (void) const { return 0 == *this; } - public: - DEFINE_SIZE_STATIC (4); + DEFINE_SIZE_STATIC (sizeof(Type)); }; @@ -682,12 +685,12 @@ struct FixedVersion /* - * Template subclasses of Offset and LongOffset that do the dereferencing. + * Template subclasses of Offset that do the dereferencing. * Use: (base+offset) */ -template -struct GenericOffsetTo : OffsetType +template +struct OffsetTo : Offset { inline const Type& operator () (const void *base) const { @@ -721,40 +724,25 @@ struct GenericOffsetTo : OffsetType return TRACE_RETURN (likely (obj.sanitize (c, user_data)) || neuter (c)); } - inline bool try_set (hb_sanitize_context_t *c, const OffsetType &v) { - if (c->may_edit (this, this->static_size)) { - this->set (v); - return true; - } - return false; - } /* Set the offset to Null */ inline bool neuter (hb_sanitize_context_t *c) { - if (c->may_edit (this, this->static_size)) { - this->set (0); /* 0 is Null offset */ - return true; - } - return false; + return c->try_set (this, 0); } + DEFINE_SIZE_STATIC (sizeof(OffsetType)); }; template -inline const Type& operator + (const Base &base, const GenericOffsetTo &offset) { return offset (base); } +static inline const Type& operator + (const Base &base, const OffsetTo &offset) { return offset (base); } template -inline Type& operator + (Base &base, GenericOffsetTo &offset) { return offset (base); } - -template -struct OffsetTo : GenericOffsetTo {}; - -template -struct LongOffsetTo : GenericOffsetTo {}; +static inline Type& operator + (Base &base, OffsetTo &offset) { return offset (base); } /* * Array Types */ -template -struct GenericArrayOf +/* An array with a number of elements. */ +template +struct ArrayOf { const Type *sub_array (unsigned int start_offset, unsigned int *pcount /* IN/OUT */) const { @@ -837,6 +825,16 @@ struct GenericArrayOf return TRACE_RETURN (true); } + template + inline int lsearch (const SearchType &x) const + { + unsigned int count = len; + for (unsigned int i = 0; i < count; i++) + if (!this->array[i].cmp (x)) + return i; + return -1; + } + private: inline bool sanitize_shallow (hb_sanitize_context_t *c) { TRACE_SANITIZE (this); @@ -850,26 +848,10 @@ struct GenericArrayOf DEFINE_SIZE_ARRAY (sizeof (LenType), array); }; -/* An array with a USHORT number of elements. */ -template -struct ArrayOf : GenericArrayOf {}; - -/* An array with a ULONG number of elements. */ -template -struct LongArrayOf : GenericArrayOf {}; - /* Array of Offset's */ template struct OffsetArrayOf : ArrayOf > {}; -/* Array of LongOffset's */ -template -struct LongOffsetArrayOf : ArrayOf > {}; - -/* LongArray of LongOffset's */ -template -struct LongOffsetLongArrayOf : LongArrayOf > {}; - /* Array of offsets relative to the beginning of the array itself. */ template struct OffsetListOf : OffsetArrayOf @@ -892,9 +874,8 @@ struct OffsetListOf : OffsetArrayOf }; -/* An array with a USHORT number of elements, - * starting at second element. */ -template +/* An array starting at second element. */ +template struct HeadlessArrayOf { inline const Type& operator [] (unsigned int i) const @@ -941,19 +922,19 @@ struct HeadlessArrayOf return TRACE_RETURN (true); } - USHORT len; + LenType len; Type array[VAR]; public: - DEFINE_SIZE_ARRAY (sizeof (USHORT), array); + DEFINE_SIZE_ARRAY (sizeof (LenType), array); }; /* An array with sorted elements. Supports binary searching. */ -template -struct SortedArrayOf : ArrayOf { - +template +struct SortedArrayOf : ArrayOf +{ template - inline int search (const SearchType &x) const + inline int bsearch (const SearchType &x) const { /* Hand-coded bsearch here since this is in the hot inner loop. */ int min = 0, max = (int) this->len - 1; diff --git a/src/3rdparty/harfbuzz-ng/src/hb-ot-cmap-table.hh b/src/3rdparty/harfbuzz-ng/src/hb-ot-cmap-table.hh new file mode 100644 index 0000000000..d53141157d --- /dev/null +++ b/src/3rdparty/harfbuzz-ng/src/hb-ot-cmap-table.hh @@ -0,0 +1,517 @@ +/* + * Copyright © 2014 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_OT_CMAP_TABLE_HH +#define HB_OT_CMAP_TABLE_HH + +#include "hb-open-type-private.hh" + + +namespace OT { + + +/* + * cmap -- Character To Glyph Index Mapping Table + */ + +#define HB_OT_TAG_cmap HB_TAG('c','m','a','p') + + +struct CmapSubtableFormat0 +{ + inline bool get_glyph (hb_codepoint_t codepoint, hb_codepoint_t *glyph) const + { + hb_codepoint_t gid = codepoint < 256 ? glyphIdArray[codepoint] : 0; + if (!gid) + return false; + *glyph = gid; + return true; + } + + inline bool sanitize (hb_sanitize_context_t *c) { + TRACE_SANITIZE (this); + return TRACE_RETURN (c->check_struct (this)); + } + + protected: + USHORT format; /* Format number is set to 0. */ + USHORT lengthZ; /* Byte length of this subtable. */ + USHORT languageZ; /* Ignore. */ + BYTE glyphIdArray[256];/* An array that maps character + * code to glyph index values. */ + public: + DEFINE_SIZE_STATIC (6 + 256); +}; + +struct CmapSubtableFormat4 +{ + inline bool get_glyph (hb_codepoint_t codepoint, hb_codepoint_t *glyph) const + { + unsigned int segCount; + const USHORT *endCount; + const USHORT *startCount; + const USHORT *idDelta; + const USHORT *idRangeOffset; + const USHORT *glyphIdArray; + unsigned int glyphIdArrayLength; + + segCount = this->segCountX2 / 2; + endCount = this->values; + startCount = endCount + segCount + 1; + idDelta = startCount + segCount; + idRangeOffset = idDelta + segCount; + glyphIdArray = idRangeOffset + segCount; + glyphIdArrayLength = (this->length - 16 - 8 * segCount) / 2; + + /* Custom two-array bsearch. */ + int min = 0, max = (int) segCount - 1; + unsigned int i; + while (min <= max) + { + int mid = (min + max) / 2; + if (codepoint < startCount[mid]) + max = mid - 1; + else if (codepoint > endCount[mid]) + min = mid + 1; + else + { + i = mid; + goto found; + } + } + return false; + + found: + hb_codepoint_t gid; + unsigned int rangeOffset = idRangeOffset[i]; + if (rangeOffset == 0) + gid = codepoint + idDelta[i]; + else + { + /* Somebody has been smoking... */ + unsigned int index = rangeOffset / 2 + (codepoint - startCount[i]) + i - segCount; + if (unlikely (index >= glyphIdArrayLength)) + return false; + gid = glyphIdArray[index]; + if (unlikely (!gid)) + return false; + gid += idDelta[i]; + } + + *glyph = gid & 0xFFFFu; + return true; + } + + inline bool sanitize (hb_sanitize_context_t *c) + { + TRACE_SANITIZE (this); + if (unlikely (!c->check_struct (this))) + return TRACE_RETURN (false); + + if (unlikely (!c->check_range (this, length))) + { + /* Some broken fonts have too long of a "length" value. + * If that is the case, just change the value to truncate + * the subtable at the end of the blob. */ + uint16_t new_length = (uint16_t) MIN ((uintptr_t) 65535, + (uintptr_t) (c->end - + (char *) this)); + if (!c->try_set (&length, new_length)) + return TRACE_RETURN (false); + } + + return TRACE_RETURN (16 + 4 * (unsigned int) segCountX2 <= length); + } + + protected: + USHORT format; /* Format number is set to 4. */ + USHORT length; /* This is the length in bytes of the + * subtable. */ + USHORT languageZ; /* Ignore. */ + USHORT segCountX2; /* 2 x segCount. */ + USHORT searchRangeZ; /* 2 * (2**floor(log2(segCount))) */ + USHORT entrySelectorZ; /* log2(searchRange/2) */ + USHORT rangeShiftZ; /* 2 x segCount - searchRange */ + + USHORT values[VAR]; +#if 0 + USHORT endCount[segCount]; /* End characterCode for each segment, + * last=0xFFFFu. */ + USHORT reservedPad; /* Set to 0. */ + USHORT startCount[segCount]; /* Start character code for each segment. */ + SHORT idDelta[segCount]; /* Delta for all character codes in segment. */ + USHORT idRangeOffset[segCount];/* Offsets into glyphIdArray or 0 */ + USHORT glyphIdArray[VAR]; /* Glyph index array (arbitrary length) */ +#endif + + public: + DEFINE_SIZE_ARRAY (14, values); +}; + +struct CmapSubtableLongGroup +{ + friend struct CmapSubtableFormat12; + friend struct CmapSubtableFormat13; + + int cmp (hb_codepoint_t codepoint) const + { + if (codepoint < startCharCode) return -1; + if (codepoint > endCharCode) return +1; + return 0; + } + + inline bool sanitize (hb_sanitize_context_t *c) { + TRACE_SANITIZE (this); + return TRACE_RETURN (c->check_struct (this)); + } + + private: + ULONG startCharCode; /* First character code in this group. */ + ULONG endCharCode; /* Last character code in this group. */ + ULONG glyphID; /* Glyph index; interpretation depends on + * subtable format. */ + public: + DEFINE_SIZE_STATIC (12); +}; + +template +struct CmapSubtableTrimmed +{ + inline bool get_glyph (hb_codepoint_t codepoint, hb_codepoint_t *glyph) const + { + /* Rely on our implicit array bound-checking. */ + hb_codepoint_t gid = glyphIdArray[codepoint - startCharCode]; + if (!gid) + return false; + *glyph = gid; + return true; + } + + inline bool sanitize (hb_sanitize_context_t *c) { + TRACE_SANITIZE (this); + return TRACE_RETURN (c->check_struct (this) && glyphIdArray.sanitize (c)); + } + + protected: + UINT formatReserved; /* Subtable format and (maybe) padding. */ + UINT lengthZ; /* Byte length of this subtable. */ + UINT languageZ; /* Ignore. */ + UINT startCharCode; /* First character code covered. */ + ArrayOf + glyphIdArray; /* Array of glyph index values for character + * codes in the range. */ + public: + DEFINE_SIZE_ARRAY (5 * sizeof (UINT), glyphIdArray); +}; + +struct CmapSubtableFormat6 : CmapSubtableTrimmed {}; +struct CmapSubtableFormat10 : CmapSubtableTrimmed {}; + +template +struct CmapSubtableLongSegmented +{ + inline bool get_glyph (hb_codepoint_t codepoint, hb_codepoint_t *glyph) const + { + int i = groups.bsearch (codepoint); + if (i == -1) + return false; + *glyph = T::group_get_glyph (groups[i], codepoint); + return true; + } + + inline bool sanitize (hb_sanitize_context_t *c) { + TRACE_SANITIZE (this); + return TRACE_RETURN (c->check_struct (this) && groups.sanitize (c)); + } + + protected: + USHORT format; /* Subtable format; set to 12. */ + USHORT reservedZ; /* Reserved; set to 0. */ + ULONG lengthZ; /* Byte length of this subtable. */ + ULONG languageZ; /* Ignore. */ + SortedArrayOf + groups; /* Groupings. */ + public: + DEFINE_SIZE_ARRAY (16, groups); +}; + +struct CmapSubtableFormat12 : CmapSubtableLongSegmented +{ + static inline hb_codepoint_t group_get_glyph (const CmapSubtableLongGroup &group, + hb_codepoint_t u) + { return group.glyphID + (u - group.startCharCode); } +}; + +struct CmapSubtableFormat13 : CmapSubtableLongSegmented +{ + static inline hb_codepoint_t group_get_glyph (const CmapSubtableLongGroup &group, + hb_codepoint_t u HB_UNUSED) + { return group.glyphID; } +}; + +typedef enum +{ + GLYPH_VARIANT_NOT_FOUND = 0, + GLYPH_VARIANT_FOUND = 1, + GLYPH_VARIANT_USE_DEFAULT = 2 +} glyph_variant_t; + +struct UnicodeValueRange +{ + inline int cmp (const hb_codepoint_t &codepoint) const + { + if (codepoint < startUnicodeValue) return -1; + if (codepoint > startUnicodeValue + additionalCount) return +1; + return 0; + } + + inline bool sanitize (hb_sanitize_context_t *c) { + TRACE_SANITIZE (this); + return TRACE_RETURN (c->check_struct (this)); + } + + UINT24 startUnicodeValue; /* First value in this range. */ + BYTE additionalCount; /* Number of additional values in this + * range. */ + public: + DEFINE_SIZE_STATIC (4); +}; + +typedef SortedArrayOf DefaultUVS; + +struct UVSMapping +{ + inline int cmp (const hb_codepoint_t &codepoint) const + { + return unicodeValue.cmp (codepoint); + } + + inline bool sanitize (hb_sanitize_context_t *c) { + TRACE_SANITIZE (this); + return TRACE_RETURN (c->check_struct (this)); + } + + UINT24 unicodeValue; /* Base Unicode value of the UVS */ + GlyphID glyphID; /* Glyph ID of the UVS */ + public: + DEFINE_SIZE_STATIC (5); +}; + +typedef SortedArrayOf NonDefaultUVS; + +struct VariationSelectorRecord +{ + inline glyph_variant_t get_glyph (hb_codepoint_t codepoint, + hb_codepoint_t *glyph, + const void *base) const + { + int i; + const DefaultUVS &defaults = base+defaultUVS; + i = defaults.bsearch (codepoint); + if (i != -1) + return GLYPH_VARIANT_USE_DEFAULT; + const NonDefaultUVS &nonDefaults = base+nonDefaultUVS; + i = nonDefaults.bsearch (codepoint); + if (i != -1) + { + *glyph = nonDefaults[i].glyphID; + return GLYPH_VARIANT_FOUND; + } + return GLYPH_VARIANT_NOT_FOUND; + } + + inline int cmp (const hb_codepoint_t &variation_selector) const + { + return varSelector.cmp (variation_selector); + } + + inline bool sanitize (hb_sanitize_context_t *c, void *base) { + TRACE_SANITIZE (this); + return TRACE_RETURN (c->check_struct (this) && + defaultUVS.sanitize (c, base) && + nonDefaultUVS.sanitize (c, base)); + } + + UINT24 varSelector; /* Variation selector. */ + OffsetTo + defaultUVS; /* Offset to Default UVS Table. May be 0. */ + OffsetTo + nonDefaultUVS; /* Offset to Non-Default UVS Table. May be 0. */ + public: + DEFINE_SIZE_STATIC (11); +}; + +struct CmapSubtableFormat14 +{ + inline glyph_variant_t get_glyph_variant (hb_codepoint_t codepoint, + hb_codepoint_t variation_selector, + hb_codepoint_t *glyph) const + { + return record[record.bsearch(variation_selector)].get_glyph (codepoint, glyph, this); + } + + inline bool sanitize (hb_sanitize_context_t *c) { + TRACE_SANITIZE (this); + return TRACE_RETURN (c->check_struct (this) && + record.sanitize (c, this)); + } + + protected: + USHORT format; /* Format number is set to 0. */ + ULONG lengthZ; /* Byte length of this subtable. */ + SortedArrayOf + record; /* Variation selector records; sorted + * in increasing order of `varSelector'. */ + public: + DEFINE_SIZE_ARRAY (10, record); +}; + +struct CmapSubtable +{ + /* Note: We intentionally do NOT implement subtable formats 2 and 8. */ + + inline bool get_glyph (hb_codepoint_t codepoint, + hb_codepoint_t *glyph) const + { + switch (u.format) { + case 0: return u.format0 .get_glyph(codepoint, glyph); + case 4: return u.format4 .get_glyph(codepoint, glyph); + case 6: return u.format6 .get_glyph(codepoint, glyph); + case 10: return u.format10.get_glyph(codepoint, glyph); + case 12: return u.format12.get_glyph(codepoint, glyph); + case 13: return u.format13.get_glyph(codepoint, glyph); + case 14: + default: return false; + } + } + + inline glyph_variant_t get_glyph_variant (hb_codepoint_t codepoint, + hb_codepoint_t variation_selector, + hb_codepoint_t *glyph) const + { + switch (u.format) { + case 14: return u.format14.get_glyph_variant(codepoint, variation_selector, glyph); + default: return GLYPH_VARIANT_NOT_FOUND; + } + } + + inline bool sanitize (hb_sanitize_context_t *c) { + TRACE_SANITIZE (this); + if (!u.format.sanitize (c)) return TRACE_RETURN (false); + switch (u.format) { + case 0: return TRACE_RETURN (u.format0 .sanitize (c)); + case 4: return TRACE_RETURN (u.format4 .sanitize (c)); + case 6: return TRACE_RETURN (u.format6 .sanitize (c)); + case 10: return TRACE_RETURN (u.format10.sanitize (c)); + case 12: return TRACE_RETURN (u.format12.sanitize (c)); + case 13: return TRACE_RETURN (u.format13.sanitize (c)); + case 14: return TRACE_RETURN (u.format14.sanitize (c)); + default:return TRACE_RETURN (true); + } + } + + protected: + union { + USHORT format; /* Format identifier */ + CmapSubtableFormat0 format0; + CmapSubtableFormat4 format4; + CmapSubtableFormat6 format6; + CmapSubtableFormat10 format10; + CmapSubtableFormat12 format12; + CmapSubtableFormat13 format13; + CmapSubtableFormat14 format14; + } u; + public: + DEFINE_SIZE_UNION (2, format); +}; + + +struct EncodingRecord +{ + inline int cmp (const EncodingRecord &other) const + { + int ret; + ret = platformID.cmp (other.platformID); + if (ret) return ret; + ret = encodingID.cmp (other.encodingID); + if (ret) return ret; + return 0; + } + + inline bool sanitize (hb_sanitize_context_t *c, void *base) { + TRACE_SANITIZE (this); + return TRACE_RETURN (c->check_struct (this) && + subtable.sanitize (c, base)); + } + + USHORT platformID; /* Platform ID. */ + USHORT encodingID; /* Platform-specific encoding ID. */ + OffsetTo + subtable; /* Byte offset from beginning of table to the subtable for this encoding. */ + public: + DEFINE_SIZE_STATIC (8); +}; + +struct cmap +{ + static const hb_tag_t tableTag = HB_OT_TAG_cmap; + + inline const CmapSubtable *find_subtable (unsigned int platform_id, + unsigned int encoding_id) const + { + EncodingRecord key; + key.platformID.set (platform_id); + key.encodingID.set (encoding_id); + + /* Note: We can use bsearch, but since it has no performance + * implications, we use lsearch and as such accept fonts with + * unsorted subtable list. */ + int result = encodingRecord./*bsearch*/lsearch (key); + if (result == -1 || !encodingRecord[result].subtable) + return NULL; + + return &(this+encodingRecord[result].subtable); + } + + inline bool sanitize (hb_sanitize_context_t *c) { + TRACE_SANITIZE (this); + return TRACE_RETURN (c->check_struct (this) && + likely (version == 0) && + encodingRecord.sanitize (c, this)); + } + + USHORT version; /* Table version number (0). */ + SortedArrayOf + encodingRecord; /* Encoding tables. */ + public: + DEFINE_SIZE_ARRAY (4, encodingRecord); +}; + + +} /* namespace OT */ + + +#endif /* HB_OT_CMAP_TABLE_HH */ diff --git a/src/3rdparty/harfbuzz-ng/src/hb-ot-font.cc b/src/3rdparty/harfbuzz-ng/src/hb-ot-font.cc new file mode 100644 index 0000000000..c9890c5922 --- /dev/null +++ b/src/3rdparty/harfbuzz-ng/src/hb-ot-font.cc @@ -0,0 +1,289 @@ +/* + * Copyright © 2011,2014 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Google Author(s): Behdad Esfahbod, Roozbeh Pournader + */ + +#include "hb-private.hh" + +#include "hb-ot.h" + +#include "hb-font-private.hh" + +#include "hb-ot-cmap-table.hh" +#include "hb-ot-hhea-table.hh" +#include "hb-ot-hmtx-table.hh" + + + +struct hb_ot_font_t +{ + unsigned int num_glyphs; + unsigned int num_hmetrics; + const OT::hmtx *hmtx; + hb_blob_t *hmtx_blob; + + const OT::CmapSubtable *cmap; + const OT::CmapSubtable *cmap_uvs; + hb_blob_t *cmap_blob; +}; + + +static hb_ot_font_t * +_hb_ot_font_create (hb_font_t *font) +{ + hb_ot_font_t *ot_font = (hb_ot_font_t *) calloc (1, sizeof (hb_ot_font_t)); + + if (unlikely (!ot_font)) + return NULL; + + ot_font->num_glyphs = font->face->get_num_glyphs (); + + { + hb_blob_t *hhea_blob = OT::Sanitizer::sanitize (font->face->reference_table (HB_OT_TAG_hhea)); + const OT::hhea *hhea = OT::Sanitizer::lock_instance (hhea_blob); + ot_font->num_hmetrics = hhea->numberOfHMetrics; + hb_blob_destroy (hhea_blob); + } + ot_font->hmtx_blob = OT::Sanitizer::sanitize (font->face->reference_table (HB_OT_TAG_hmtx)); + if (unlikely (!ot_font->num_hmetrics || + 2 * (ot_font->num_hmetrics + ot_font->num_glyphs) < hb_blob_get_length (ot_font->hmtx_blob))) + { + hb_blob_destroy (ot_font->hmtx_blob); + free (ot_font); + return NULL; + } + ot_font->hmtx = OT::Sanitizer::lock_instance (ot_font->hmtx_blob); + + ot_font->cmap_blob = OT::Sanitizer::sanitize (font->face->reference_table (HB_OT_TAG_cmap)); + const OT::cmap *cmap = OT::Sanitizer::lock_instance (ot_font->cmap_blob); + const OT::CmapSubtable *subtable = NULL; + const OT::CmapSubtable *subtable_uvs = NULL; + + /* 32-bit subtables. */ + if (!subtable) subtable = cmap->find_subtable (0, 6); + if (!subtable) subtable = cmap->find_subtable (0, 4); + if (!subtable) subtable = cmap->find_subtable (3, 10); + /* 16-bit subtables. */ + if (!subtable) subtable = cmap->find_subtable (0, 3); + if (!subtable) subtable = cmap->find_subtable (3, 1); + /* Meh. */ + if (!subtable) subtable = &OT::Null(OT::CmapSubtable); + + /* UVS subtable. */ + if (!subtable_uvs) subtable_uvs = cmap->find_subtable (0, 5); + /* Meh. */ + if (!subtable_uvs) subtable_uvs = &OT::Null(OT::CmapSubtable); + + ot_font->cmap = subtable; + ot_font->cmap_uvs = subtable_uvs; + + return ot_font; +} + +static void +_hb_ot_font_destroy (hb_ot_font_t *ot_font) +{ + hb_blob_destroy (ot_font->cmap_blob); + hb_blob_destroy (ot_font->hmtx_blob); + + free (ot_font); +} + + +static hb_bool_t +hb_ot_get_glyph (hb_font_t *font HB_UNUSED, + void *font_data, + hb_codepoint_t unicode, + hb_codepoint_t variation_selector, + hb_codepoint_t *glyph, + void *user_data HB_UNUSED) + +{ + const hb_ot_font_t *ot_font = (const hb_ot_font_t *) font_data; + + if (unlikely (variation_selector)) + { + switch (ot_font->cmap_uvs->get_glyph_variant (unicode, + variation_selector, + glyph)) + { + case OT::GLYPH_VARIANT_NOT_FOUND: return false; + case OT::GLYPH_VARIANT_FOUND: return true; + case OT::GLYPH_VARIANT_USE_DEFAULT: break; + } + } + + return ot_font->cmap->get_glyph (unicode, glyph); +} + +static hb_position_t +hb_ot_get_glyph_h_advance (hb_font_t *font HB_UNUSED, + void *font_data, + hb_codepoint_t glyph, + void *user_data HB_UNUSED) +{ + const hb_ot_font_t *ot_font = (const hb_ot_font_t *) font_data; + + if (unlikely (glyph >= ot_font->num_glyphs)) + return 0; /* Maybe better to return notdef's advance instead? */ + + if (glyph >= ot_font->num_hmetrics) + glyph = ot_font->num_hmetrics - 1; + + return font->em_scale_x (ot_font->hmtx->longHorMetric[glyph].advanceWidth); +} + +static hb_position_t +hb_ot_get_glyph_v_advance (hb_font_t *font HB_UNUSED, + void *font_data, + hb_codepoint_t glyph, + void *user_data HB_UNUSED) +{ + /* TODO */ + return 0; +} + +static hb_bool_t +hb_ot_get_glyph_h_origin (hb_font_t *font HB_UNUSED, + void *font_data HB_UNUSED, + hb_codepoint_t glyph HB_UNUSED, + hb_position_t *x HB_UNUSED, + hb_position_t *y HB_UNUSED, + void *user_data HB_UNUSED) +{ + /* We always work in the horizontal coordinates. */ + return true; +} + +static hb_bool_t +hb_ot_get_glyph_v_origin (hb_font_t *font HB_UNUSED, + void *font_data, + hb_codepoint_t glyph, + hb_position_t *x, + hb_position_t *y, + void *user_data HB_UNUSED) +{ + /* TODO */ + return false; +} + +static hb_position_t +hb_ot_get_glyph_h_kerning (hb_font_t *font, + void *font_data, + hb_codepoint_t left_glyph, + hb_codepoint_t right_glyph, + void *user_data HB_UNUSED) +{ + /* TODO */ + return 0; +} + +static hb_position_t +hb_ot_get_glyph_v_kerning (hb_font_t *font HB_UNUSED, + void *font_data HB_UNUSED, + hb_codepoint_t top_glyph HB_UNUSED, + hb_codepoint_t bottom_glyph HB_UNUSED, + void *user_data HB_UNUSED) +{ + return 0; +} + +static hb_bool_t +hb_ot_get_glyph_extents (hb_font_t *font HB_UNUSED, + void *font_data, + hb_codepoint_t glyph, + hb_glyph_extents_t *extents, + void *user_data HB_UNUSED) +{ + /* TODO */ + return false; +} + +static hb_bool_t +hb_ot_get_glyph_contour_point (hb_font_t *font HB_UNUSED, + void *font_data, + hb_codepoint_t glyph, + unsigned int point_index, + hb_position_t *x, + hb_position_t *y, + void *user_data HB_UNUSED) +{ + /* TODO */ + return false; +} + +static hb_bool_t +hb_ot_get_glyph_name (hb_font_t *font HB_UNUSED, + void *font_data, + hb_codepoint_t glyph, + char *name, unsigned int size, + void *user_data HB_UNUSED) +{ + /* TODO */ + return false; +} + +static hb_bool_t +hb_ot_get_glyph_from_name (hb_font_t *font HB_UNUSED, + void *font_data, + const char *name, int len, /* -1 means nul-terminated */ + hb_codepoint_t *glyph, + void *user_data HB_UNUSED) +{ + /* TODO */ + return false; +} + + +static hb_font_funcs_t * +_hb_ot_get_font_funcs (void) +{ + static const hb_font_funcs_t ot_ffuncs = { + HB_OBJECT_HEADER_STATIC, + + true, /* immutable */ + + { +#define HB_FONT_FUNC_IMPLEMENT(name) hb_ot_get_##name, + HB_FONT_FUNCS_IMPLEMENT_CALLBACKS +#undef HB_FONT_FUNC_IMPLEMENT + } + }; + + return const_cast (&ot_ffuncs); +} + + +void +hb_ot_font_set_funcs (hb_font_t *font) +{ + hb_ot_font_t *ot_font = _hb_ot_font_create (font); + if (unlikely (!ot_font)) + return; + + hb_font_set_funcs (font, + _hb_ot_get_font_funcs (), + ot_font, + (hb_destroy_func_t) _hb_ot_font_destroy); +} diff --git a/src/3rdparty/harfbuzz-ng/src/hb-ot-font.h b/src/3rdparty/harfbuzz-ng/src/hb-ot-font.h new file mode 100644 index 0000000000..7a8c04ac33 --- /dev/null +++ b/src/3rdparty/harfbuzz-ng/src/hb-ot-font.h @@ -0,0 +1,41 @@ +/* + * Copyright © 2014 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Google Author(s): Behdad Esfahbod, Roozbeh Pournader + */ + +#ifndef HB_OT_FONT_H +#define HB_OT_FONT_H + +#include "hb.h" + +HB_BEGIN_DECLS + + +void +hb_ot_font_set_funcs (hb_font_t *font); + + +HB_END_DECLS + +#endif /* HB_OT_FONT_H */ diff --git a/src/3rdparty/harfbuzz-ng/src/hb-ot-head-table.hh b/src/3rdparty/harfbuzz-ng/src/hb-ot-head-table.hh index 0285f0cf31..ec4e8c9d45 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-ot-head-table.hh +++ b/src/3rdparty/harfbuzz-ng/src/hb-ot-head-table.hh @@ -58,12 +58,12 @@ struct head protected: FixedVersion version; /* Version of the head table--currently - * 0x00010000 for version 1.0. */ + * 0x00010000u for version 1.0. */ FixedVersion fontRevision; /* Set by font manufacturer. */ ULONG checkSumAdjustment; /* To compute: set it to 0, sum the * entire font as ULONG, then store - * 0xB1B0AFBA - sum. */ - ULONG magicNumber; /* Set to 0x5F0F3CF5. */ + * 0xB1B0AFBAu - sum. */ + ULONG magicNumber; /* Set to 0x5F0F3CF5u. */ USHORT flags; /* Bit 0: Baseline for font at y=0; * Bit 1: Left sidebearing point at x=0; * Bit 2: Instructions may depend on point size; diff --git a/src/3rdparty/harfbuzz-ng/src/hb-ot-hhea-table.hh b/src/3rdparty/harfbuzz-ng/src/hb-ot-hhea-table.hh index 611de8a666..d433200165 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-ot-hhea-table.hh +++ b/src/3rdparty/harfbuzz-ng/src/hb-ot-hhea-table.hh @@ -49,8 +49,8 @@ struct hhea return TRACE_RETURN (c->check_struct (this) && likely (version.major == 1)); } - protected: - FixedVersion version; /* 0x00010000 for version 1.0. */ + public: + FixedVersion version; /* 0x00010000u for version 1.0. */ FWORD ascender; /* Typographic ascent. * (Distance from baseline of highest diff --git a/src/3rdparty/harfbuzz-ng/src/hb-ot-hmtx-table.hh b/src/3rdparty/harfbuzz-ng/src/hb-ot-hmtx-table.hh index d107cf990a..e918e3b3f4 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-ot-hmtx-table.hh +++ b/src/3rdparty/harfbuzz-ng/src/hb-ot-hmtx-table.hh @@ -59,7 +59,7 @@ struct hmtx return TRACE_RETURN (true); } - protected: + public: LongHorMetric longHorMetric[VAR]; /* Paired advance width and left side * bearing values for each glyph. The * value numOfHMetrics comes from diff --git a/src/3rdparty/harfbuzz-ng/src/hb-ot-layout-common-private.hh b/src/3rdparty/harfbuzz-ng/src/hb-ot-layout-common-private.hh index 02d0d0f87c..abd063c896 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-ot-layout-common-private.hh +++ b/src/3rdparty/harfbuzz-ng/src/hb-ot-layout-common-private.hh @@ -103,7 +103,8 @@ struct RecordArrayOf : SortedArrayOf > { } inline bool find_index (hb_tag_t tag, unsigned int *index) const { - int i = this->search (tag); + /* If we want to allow non-sorted data, we can lsearch(). */ + int i = this->/*lsearch*/bsearch (tag); if (i != -1) { if (index) *index = i; return true; @@ -189,10 +190,10 @@ struct LangSys unsigned int *feature_indexes /* OUT */) const { return featureIndex.get_indexes (start_offset, feature_count, feature_indexes); } - inline bool has_required_feature (void) const { return reqFeatureIndex != 0xffff; } + inline bool has_required_feature (void) const { return reqFeatureIndex != 0xFFFFu; } inline unsigned int get_required_feature_index (void) const { - if (reqFeatureIndex == 0xffff) + if (reqFeatureIndex == 0xFFFFu) return Index::NOT_FOUND_INDEX; return reqFeatureIndex;; } @@ -203,11 +204,11 @@ struct LangSys return TRACE_RETURN (c->check_struct (this) && featureIndex.sanitize (c)); } - Offset lookupOrder; /* = Null (reserved for an offset to a + Offset<> lookupOrderZ; /* = Null (reserved for an offset to a * reordering table) */ USHORT reqFeatureIndex;/* Index of a feature required for this * language system--if no required features - * = 0xFFFF */ + * = 0xFFFFu */ IndexArray featureIndex; /* Array of indices into the FeatureList */ public: DEFINE_SIZE_ARRAY (6, featureIndex); @@ -447,9 +448,9 @@ struct FeatureParams TRACE_SANITIZE (this); if (tag == HB_TAG ('s','i','z','e')) return TRACE_RETURN (u.size.sanitize (c)); - if ((tag & 0xFFFF0000) == HB_TAG ('s','s','\0','\0')) /* ssXX */ + if ((tag & 0xFFFF0000u) == HB_TAG ('s','s','\0','\0')) /* ssXX */ return TRACE_RETURN (u.stylisticSet.sanitize (c)); - if ((tag & 0xFFFF0000) == HB_TAG ('c','v','\0','\0')) /* cvXX */ + if ((tag & 0xFFFF0000u) == HB_TAG ('c','v','\0','\0')) /* cvXX */ return TRACE_RETURN (u.characterVariants.sanitize (c)); return TRACE_RETURN (true); } @@ -501,11 +502,11 @@ struct Feature * Adobe tools, only the 'size' feature had FeatureParams defined. */ - Offset orig_offset = featureParams; + OffsetTo orig_offset = featureParams; if (unlikely (!featureParams.sanitize (c, this, closure ? closure->tag : HB_TAG_NONE))) return TRACE_RETURN (false); - if (likely (!orig_offset)) + if (likely (orig_offset.is_null ())) return TRACE_RETURN (true); if (featureParams == 0 && closure && @@ -513,13 +514,13 @@ struct Feature closure->list_base && closure->list_base < this) { unsigned int new_offset_int = (unsigned int) orig_offset - - ((char *) this - (char *) closure->list_base); + (((char *) this) - ((char *) closure->list_base)); - Offset new_offset; + OffsetTo new_offset; /* Check that it did not overflow. */ new_offset.set (new_offset_int); if (new_offset == new_offset_int && - featureParams.try_set (c, new_offset) && + c->try_set (&featureParams, new_offset) && !featureParams.sanitize (c, this, closure ? closure->tag : HB_TAG_NONE)) return TRACE_RETURN (false); } @@ -584,7 +585,7 @@ struct Lookup TRACE_SERIALIZE (this); if (unlikely (!c->extend_min (*this))) return TRACE_RETURN (false); lookupType.set (lookup_type); - lookupFlag.set (lookup_props & 0xFFFF); + lookupFlag.set (lookup_props & 0xFFFFu); if (unlikely (!subTable.serialize (c, num_subtables))) return TRACE_RETURN (false); if (lookupFlag & LookupFlag::UseMarkFilteringSet) { @@ -608,7 +609,7 @@ struct Lookup USHORT lookupType; /* Different enumerations for GSUB and GPOS */ USHORT lookupFlag; /* Lookup qualifiers */ - ArrayOf + ArrayOf > subTable; /* Array of SubTables */ USHORT markFilteringSetX[VAR]; /* Index (base 0) into GDEF mark glyph sets * structure. This field is only present if bit @@ -631,7 +632,7 @@ struct CoverageFormat1 private: inline unsigned int get_coverage (hb_codepoint_t glyph_id) const { - int i = glyphArray.search (glyph_id); + int i = glyphArray.bsearch (glyph_id); ASSERT_STATIC (((unsigned int) -1) == NOT_COVERED); return i; } @@ -696,7 +697,7 @@ struct CoverageFormat2 private: inline unsigned int get_coverage (hb_codepoint_t glyph_id) const { - int i = rangeRecord.search (glyph_id); + int i = rangeRecord.bsearch (glyph_id); if (i != -1) { const RangeRecord &range = rangeRecord[i]; return (unsigned int) range.value + (glyph_id - range.start); @@ -992,7 +993,7 @@ struct ClassDefFormat2 private: inline unsigned int get_class (hb_codepoint_t glyph_id) const { - int i = rangeRecord.search (glyph_id); + int i = rangeRecord.bsearch (glyph_id); if (i != -1) return rangeRecord[i].value; return 0; @@ -1130,7 +1131,7 @@ struct Device unsigned int byte = deltaValue[s >> (4 - f)]; unsigned int bits = (byte >> (16 - (((s & ((1 << (4 - f)) - 1)) + 1) << f))); - unsigned int mask = (0xFFFF >> (16 - (1 << f))); + unsigned int mask = (0xFFFFu >> (16 - (1 << f))); int delta = bits & mask; diff --git a/src/3rdparty/harfbuzz-ng/src/hb-ot-layout-gdef-table.hh b/src/3rdparty/harfbuzz-ng/src/hb-ot-layout-gdef-table.hh index 389cbb9e39..84a5e797c6 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-ot-layout-gdef-table.hh +++ b/src/3rdparty/harfbuzz-ng/src/hb-ot-layout-gdef-table.hh @@ -282,7 +282,7 @@ struct MarkGlyphSetsFormat1 protected: USHORT format; /* Format identifier--format = 1 */ - LongOffsetArrayOf + ArrayOf > coverage; /* Array of long offsets to mark set * coverage tables */ public: @@ -360,9 +360,9 @@ struct GDEF hb_position_t *caret_array /* OUT */) const { return (this+ligCaretList).get_lig_carets (font, direction, glyph_id, start_offset, caret_count, caret_array); } - inline bool has_mark_sets (void) const { return version.to_int () >= 0x00010002 && markGlyphSetsDef[0] != 0; } + inline bool has_mark_sets (void) const { return version.to_int () >= 0x00010002u && markGlyphSetsDef[0] != 0; } inline bool mark_set_covers (unsigned int set_index, hb_codepoint_t glyph_id) const - { return version.to_int () >= 0x00010002 && (this+markGlyphSetsDef[0]).covers (set_index, glyph_id); } + { return version.to_int () >= 0x00010002u && (this+markGlyphSetsDef[0]).covers (set_index, glyph_id); } inline bool sanitize (hb_sanitize_context_t *c) { TRACE_SANITIZE (this); @@ -372,7 +372,7 @@ struct GDEF attachList.sanitize (c, this) && ligCaretList.sanitize (c, this) && markAttachClassDef.sanitize (c, this) && - (version.to_int () < 0x00010002 || markGlyphSetsDef[0].sanitize (c, this))); + (version.to_int () < 0x00010002u || markGlyphSetsDef[0].sanitize (c, this))); } @@ -400,7 +400,7 @@ struct GDEF protected: FixedVersion version; /* Version of the GDEF table--currently - * 0x00010002 */ + * 0x00010002u */ OffsetTo glyphClassDef; /* Offset to class definition table * for glyph type--from beginning of diff --git a/src/3rdparty/harfbuzz-ng/src/hb-ot-layout-gpos-table.hh b/src/3rdparty/harfbuzz-ng/src/hb-ot-layout-gpos-table.hh index 7c0a4ea666..d8e3e6e11d 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-ot-layout-gpos-table.hh +++ b/src/3rdparty/harfbuzz-ng/src/hb-ot-layout-gpos-table.hh @@ -49,18 +49,18 @@ typedef Value ValueRecord[VAR]; struct ValueFormat : USHORT { enum Flags { - xPlacement = 0x0001, /* Includes horizontal adjustment for placement */ - yPlacement = 0x0002, /* Includes vertical adjustment for placement */ - xAdvance = 0x0004, /* Includes horizontal adjustment for advance */ - yAdvance = 0x0008, /* Includes vertical adjustment for advance */ - xPlaDevice = 0x0010, /* Includes horizontal Device table for placement */ - yPlaDevice = 0x0020, /* Includes vertical Device table for placement */ - xAdvDevice = 0x0040, /* Includes horizontal Device table for advance */ - yAdvDevice = 0x0080, /* Includes vertical Device table for advance */ - ignored = 0x0F00, /* Was used in TrueType Open for MM fonts */ - reserved = 0xF000, /* For future use */ - - devices = 0x00F0 /* Mask for having any Device table */ + xPlacement = 0x0001u, /* Includes horizontal adjustment for placement */ + yPlacement = 0x0002u, /* Includes vertical adjustment for placement */ + xAdvance = 0x0004u, /* Includes horizontal adjustment for advance */ + yAdvance = 0x0008u, /* Includes vertical adjustment for advance */ + xPlaDevice = 0x0010u, /* Includes horizontal Device table for placement */ + yPlaDevice = 0x0020u, /* Includes vertical Device table for placement */ + xAdvDevice = 0x0040u, /* Includes horizontal Device table for advance */ + yAdvDevice = 0x0080u, /* Includes vertical Device table for advance */ + ignored = 0x0F00u, /* Was used in TrueType Open for MM fonts */ + reserved = 0xF000u, /* For future use */ + + devices = 0x00F0u /* Mask for having any Device table */ }; /* All fields are options. Only those available advance the value pointer. */ @@ -1608,14 +1608,14 @@ GPOS::position_finish (hb_font_t *font HB_UNUSED, hb_buffer_t *buffer) /* Out-of-class implementation for methods recursing */ template -inline typename context_t::return_t PosLookup::dispatch_recurse_func (context_t *c, unsigned int lookup_index) +/*static*/ inline typename context_t::return_t PosLookup::dispatch_recurse_func (context_t *c, unsigned int lookup_index) { const GPOS &gpos = *(hb_ot_layout_from_face (c->face)->gpos); const PosLookup &l = gpos.get_lookup (lookup_index); return l.dispatch (c); } -inline bool PosLookup::apply_recurse_func (hb_apply_context_t *c, unsigned int lookup_index) +/*static*/ inline bool PosLookup::apply_recurse_func (hb_apply_context_t *c, unsigned int lookup_index) { const GPOS &gpos = *(hb_ot_layout_from_face (c->face)->gpos); const PosLookup &l = gpos.get_lookup (lookup_index); diff --git a/src/3rdparty/harfbuzz-ng/src/hb-ot-layout-gsub-table.hh b/src/3rdparty/harfbuzz-ng/src/hb-ot-layout-gsub-table.hh index 76b4f33c70..e1939735de 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-ot-layout-gsub-table.hh +++ b/src/3rdparty/harfbuzz-ng/src/hb-ot-layout-gsub-table.hh @@ -44,7 +44,7 @@ struct SingleSubstFormat1 for (iter.init (this+coverage); iter.more (); iter.next ()) { hb_codepoint_t glyph_id = iter.get_glyph (); if (c->glyphs->has (glyph_id)) - c->glyphs->add ((glyph_id + deltaGlyphID) & 0xFFFF); + c->glyphs->add ((glyph_id + deltaGlyphID) & 0xFFFFu); } } @@ -55,7 +55,7 @@ struct SingleSubstFormat1 for (iter.init (this+coverage); iter.more (); iter.next ()) { hb_codepoint_t glyph_id = iter.get_glyph (); c->input->add (glyph_id); - c->output->add ((glyph_id + deltaGlyphID) & 0xFFFF); + c->output->add ((glyph_id + deltaGlyphID) & 0xFFFFu); } } @@ -79,7 +79,7 @@ struct SingleSubstFormat1 /* According to the Adobe Annotated OpenType Suite, result is always * limited to 16bit. */ - glyph_id = (glyph_id + deltaGlyphID) & 0xFFFF; + glyph_id = (glyph_id + deltaGlyphID) & 0xFFFFu; c->replace_glyph (glyph_id); return TRACE_RETURN (true); @@ -270,23 +270,34 @@ struct Sequence inline bool apply (hb_apply_context_t *c) const { TRACE_APPLY (this); - if (unlikely (!substitute.len)) return TRACE_RETURN (false); - - unsigned int klass = _hb_glyph_info_is_ligature (&c->buffer->cur()) ? - HB_OT_LAYOUT_GLYPH_PROPS_BASE_GLYPH : 0; unsigned int count = substitute.len; - if (count == 1) /* Special-case to make it in-place. */ + + /* TODO: + * Testing shows that Uniscribe actually allows zero-len susbstitute, + * which essentially deletes a glyph. We don't allow for now. It + * can be confusing to the client since the cluster from the deleted + * glyph won't be merged with any output cluster... Also, currently + * buffer->move_to() makes assumptions about this too. Perhaps fix + * in the future after figuring out what to do with the clusters. + */ + if (unlikely (!count)) return TRACE_RETURN (false); + + /* Special-case to make it in-place and not consider this + * as a "multiplied" substitution. */ + if (unlikely (count == 1)) { c->replace_glyph (substitute.array[0]); + return TRACE_RETURN (true); } - else - { - for (unsigned int i = 0; i < count; i++) { - _hb_glyph_info_set_lig_props_for_component (&c->buffer->cur(), i); - c->output_glyph (substitute.array[i], klass); - } - c->buffer->skip_glyph (); + + unsigned int klass = _hb_glyph_info_is_ligature (&c->buffer->cur()) ? + HB_OT_LAYOUT_GLYPH_PROPS_BASE_GLYPH : 0; + + for (unsigned int i = 0; i < count; i++) { + _hb_glyph_info_set_lig_props_for_component (&c->buffer->cur(), i); + c->output_glyph_for_component (substitute.array[i], klass); } + c->buffer->skip_glyph (); return TRACE_RETURN (true); } @@ -624,7 +635,16 @@ struct Ligature { TRACE_APPLY (this); unsigned int count = component.len; - if (unlikely (count < 1)) return TRACE_RETURN (false); + + if (unlikely (!count)) return TRACE_RETURN (false); + + /* Special-case to make it in-place and not consider this + * as a "ligated" substitution. */ + if (unlikely (count == 1)) + { + c->replace_glyph (ligGlyph); + return TRACE_RETURN (true); + } bool is_mark_ligature = false; unsigned int total_component_count = 0; @@ -1338,7 +1358,7 @@ GSUB::substitute_finish (hb_font_t *font HB_UNUSED, hb_buffer_t *buffer HB_UNUSE /* Out-of-class implementation for methods recursing */ -inline bool ExtensionSubst::is_reverse (void) const +/*static*/ inline bool ExtensionSubst::is_reverse (void) const { unsigned int type = get_type (); if (unlikely (type == SubstLookupSubTable::Extension)) @@ -1347,14 +1367,14 @@ inline bool ExtensionSubst::is_reverse (void) const } template -inline typename context_t::return_t SubstLookup::dispatch_recurse_func (context_t *c, unsigned int lookup_index) +/*static*/ inline typename context_t::return_t SubstLookup::dispatch_recurse_func (context_t *c, unsigned int lookup_index) { const GSUB &gsub = *(hb_ot_layout_from_face (c->face)->gsub); const SubstLookup &l = gsub.get_lookup (lookup_index); return l.dispatch (c); } -inline bool SubstLookup::apply_recurse_func (hb_apply_context_t *c, unsigned int lookup_index) +/*static*/ inline bool SubstLookup::apply_recurse_func (hb_apply_context_t *c, unsigned int lookup_index) { const GSUB &gsub = *(hb_ot_layout_from_face (c->face)->gsub); const SubstLookup &l = gsub.get_lookup (lookup_index); diff --git a/src/3rdparty/harfbuzz-ng/src/hb-ot-layout-gsubgpos-private.hh b/src/3rdparty/harfbuzz-ng/src/hb-ot-layout-gsubgpos-private.hh index bdd773e36b..546ff4b0fd 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-ot-layout-gsubgpos-private.hh +++ b/src/3rdparty/harfbuzz-ng/src/hb-ot-layout-gsubgpos-private.hh @@ -349,11 +349,7 @@ struct hb_apply_context_t may_skip (const hb_apply_context_t *c, const hb_glyph_info_t &info) const { - unsigned int property; - - property = _hb_glyph_info_get_glyph_props (&info); - - if (!c->match_properties (info.codepoint, property, lookup_props)) + if (!c->check_glyph_property (&info, lookup_props)) return SKIP_YES; if (unlikely (_hb_glyph_info_is_default_ignorable (&info) && @@ -487,7 +483,6 @@ struct hb_apply_context_t const hb_glyph_info_t &info = c->buffer->out_info[idx]; matcher_t::may_skip_t skip = matcher.may_skip (c, info); - if (unlikely (skip == matcher_t::SKIP_YES)) continue; @@ -538,10 +533,12 @@ struct hb_apply_context_t } inline bool - match_properties (hb_codepoint_t glyph, - unsigned int glyph_props, - unsigned int lookup_props) const + check_glyph_property (const hb_glyph_info_t *info, + unsigned int lookup_props) const { + hb_codepoint_t glyph = info->codepoint; + unsigned int glyph_props = _hb_glyph_info_get_glyph_props (info); + /* Not covered, if, for example, glyph class is ligature and * lookup_props includes LookupFlags::IgnoreLigatures */ @@ -554,26 +551,27 @@ struct hb_apply_context_t return true; } - inline bool - check_glyph_property (hb_glyph_info_t *info, - unsigned int lookup_props) const - { - unsigned int property; - - property = _hb_glyph_info_get_glyph_props (info); - - return match_properties (info->codepoint, property, lookup_props); - } - inline void _set_glyph_props (hb_codepoint_t glyph_index, unsigned int class_guess = 0, - bool ligature = false) const + bool ligature = false, + bool component = false) const { unsigned int add_in = _hb_glyph_info_get_glyph_props (&buffer->cur()) & HB_OT_LAYOUT_GLYPH_PROPS_PRESERVE; add_in |= HB_OT_LAYOUT_GLYPH_PROPS_SUBSTITUTED; if (ligature) + { add_in |= HB_OT_LAYOUT_GLYPH_PROPS_LIGATED; + /* In the only place that the MULTIPLIED bit is used, Uniscribe + * seems to only care about the "last" transformation between + * Ligature and Multiple substitions. Ie. if you ligate, expand, + * and ligate again, it forgives the multiplication and acts as + * if only ligation happened. As such, clear MULTIPLIED bit. + */ + add_in &= ~HB_OT_LAYOUT_GLYPH_PROPS_MULTIPLIED; + } + if (component) + add_in |= HB_OT_LAYOUT_GLYPH_PROPS_MULTIPLIED; if (likely (has_glyph_classes)) _hb_glyph_info_set_glyph_props (&buffer->cur(), add_in | gdef.get_glyph_props (glyph_index)); else if (class_guess) @@ -596,10 +594,10 @@ struct hb_apply_context_t _set_glyph_props (glyph_index, class_guess, true); buffer->replace_glyph (glyph_index); } - inline void output_glyph (hb_codepoint_t glyph_index, - unsigned int class_guess) const + inline void output_glyph_for_component (hb_codepoint_t glyph_index, + unsigned int class_guess) const { - _set_glyph_props (glyph_index, class_guess); + _set_glyph_props (glyph_index, class_guess, false, true); buffer->output_glyph (glyph_index); } }; @@ -882,6 +880,7 @@ static inline void ligate_input (hb_apply_context_t *c, break; } } + TRACE_RETURN (true); } static inline bool match_backtrack (hb_apply_context_t *c, @@ -994,7 +993,9 @@ static inline bool apply_lookup (hb_apply_context_t *c, /* Recursed lookup changed buffer len. Adjust. */ - /* end can't go back past the current match position. */ + /* end can't go back past the current match position. + * Note: this is only true because we do NOT allow MultipleSubst + * with zero sequence len. */ end = MAX ((int) match_positions[idx] + 1, int (end) + delta); unsigned int next = idx + 1; /* next now is the position after the recursed lookup. */ @@ -2253,8 +2254,8 @@ struct GSUBGPOS inline unsigned int get_feature_count (void) const { return (this+featureList).len; } - inline const Tag& get_feature_tag (unsigned int i) const - { return (this+featureList).get_tag (i); } + inline hb_tag_t get_feature_tag (unsigned int i) const + { return i == Index::NOT_FOUND_INDEX ? HB_TAG_NONE : (this+featureList).get_tag (i); } inline unsigned int get_feature_tags (unsigned int start_offset, unsigned int *feature_count /* IN/OUT */, hb_tag_t *feature_tags /* OUT */) const @@ -2279,7 +2280,7 @@ struct GSUBGPOS protected: FixedVersion version; /* Version of the GSUB/GPOS table--initially set - * to 0x00010000 */ + * to 0x00010000u */ OffsetTo scriptList; /* ScriptList table */ OffsetTo diff --git a/src/3rdparty/harfbuzz-ng/src/hb-ot-layout-jstf-table.hh b/src/3rdparty/harfbuzz-ng/src/hb-ot-layout-jstf-table.hh index 79eb859566..67a6df5b42 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-ot-layout-jstf-table.hh +++ b/src/3rdparty/harfbuzz-ng/src/hb-ot-layout-jstf-table.hh @@ -214,7 +214,7 @@ struct JSTF protected: FixedVersion version; /* Version of the JSTF table--initially set - * to 0x00010000 */ + * to 0x00010000u */ RecordArrayOf scriptList; /* Array of JstfScripts--listed * alphabetically by ScriptTag */ diff --git a/src/3rdparty/harfbuzz-ng/src/hb-ot-layout-private.hh b/src/3rdparty/harfbuzz-ng/src/hb-ot-layout-private.hh index 0a0a54b25d..9b06300800 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-ot-layout-private.hh +++ b/src/3rdparty/harfbuzz-ng/src/hb-ot-layout-private.hh @@ -50,9 +50,11 @@ typedef enum /* The following are used internally; not derived from GDEF. */ HB_OT_LAYOUT_GLYPH_PROPS_SUBSTITUTED = 0x10u, HB_OT_LAYOUT_GLYPH_PROPS_LIGATED = 0x20u, + HB_OT_LAYOUT_GLYPH_PROPS_MULTIPLIED = 0x40u, HB_OT_LAYOUT_GLYPH_PROPS_PRESERVE = HB_OT_LAYOUT_GLYPH_PROPS_SUBSTITUTED | - HB_OT_LAYOUT_GLYPH_PROPS_LIGATED + HB_OT_LAYOUT_GLYPH_PROPS_LIGATED | + HB_OT_LAYOUT_GLYPH_PROPS_MULTIPLIED } hb_ot_layout_glyph_class_mask_t; @@ -182,62 +184,62 @@ enum { MASK0_GEN_CAT = 0x1Fu }; -inline void +static inline void _hb_glyph_info_set_unicode_props (hb_glyph_info_t *info, hb_unicode_funcs_t *unicode) { /* XXX This shouldn't be inlined, or at least not while is_default_ignorable() is inline. */ info->unicode_props0() = ((unsigned int) unicode->general_category (info->codepoint)) | (unicode->is_default_ignorable (info->codepoint) ? MASK0_IGNORABLE : 0) | - (info->codepoint == 0x200C ? MASK0_ZWNJ : 0) | - (info->codepoint == 0x200D ? MASK0_ZWJ : 0); + (info->codepoint == 0x200Cu ? MASK0_ZWNJ : 0) | + (info->codepoint == 0x200Du ? MASK0_ZWJ : 0); info->unicode_props1() = unicode->modified_combining_class (info->codepoint); } -inline void +static inline void _hb_glyph_info_set_general_category (hb_glyph_info_t *info, hb_unicode_general_category_t gen_cat) { info->unicode_props0() = (unsigned int) gen_cat | ((info->unicode_props0()) & ~MASK0_GEN_CAT); } -inline hb_unicode_general_category_t +static inline hb_unicode_general_category_t _hb_glyph_info_get_general_category (const hb_glyph_info_t *info) { return (hb_unicode_general_category_t) (info->unicode_props0() & MASK0_GEN_CAT); } -inline void +static inline void _hb_glyph_info_set_modified_combining_class (hb_glyph_info_t *info, unsigned int modified_class) { info->unicode_props1() = modified_class; } -inline unsigned int +static inline unsigned int _hb_glyph_info_get_modified_combining_class (const hb_glyph_info_t *info) { return info->unicode_props1(); } -inline hb_bool_t +static inline hb_bool_t _hb_glyph_info_is_default_ignorable (const hb_glyph_info_t *info) { return !!(info->unicode_props0() & MASK0_IGNORABLE); } -inline hb_bool_t +static inline hb_bool_t _hb_glyph_info_is_zwnj (const hb_glyph_info_t *info) { return !!(info->unicode_props0() & MASK0_ZWNJ); } -inline hb_bool_t +static inline hb_bool_t _hb_glyph_info_is_zwj (const hb_glyph_info_t *info) { return !!(info->unicode_props0() & MASK0_ZWJ); } -inline void +static inline void _hb_glyph_info_flip_joiners (hb_glyph_info_t *info) { info->unicode_props0() ^= MASK0_ZWNJ | MASK0_ZWJ; @@ -339,31 +341,31 @@ _hb_allocate_lig_id (hb_buffer_t *buffer) { /* glyph_props: */ -inline void +static inline void _hb_glyph_info_set_glyph_props (hb_glyph_info_t *info, unsigned int props) { info->glyph_props() = props; } -inline unsigned int +static inline unsigned int _hb_glyph_info_get_glyph_props (const hb_glyph_info_t *info) { return info->glyph_props(); } -inline bool +static inline bool _hb_glyph_info_is_base_glyph (const hb_glyph_info_t *info) { return !!(info->glyph_props() & HB_OT_LAYOUT_GLYPH_PROPS_BASE_GLYPH); } -inline bool +static inline bool _hb_glyph_info_is_ligature (const hb_glyph_info_t *info) { return !!(info->glyph_props() & HB_OT_LAYOUT_GLYPH_PROPS_LIGATURE); } -inline bool +static inline bool _hb_glyph_info_is_mark (const hb_glyph_info_t *info) { return !!(info->glyph_props() & HB_OT_LAYOUT_GLYPH_PROPS_MARK); @@ -381,23 +383,43 @@ _hb_glyph_info_ligated (const hb_glyph_info_t *info) return !!(info->glyph_props() & HB_OT_LAYOUT_GLYPH_PROPS_LIGATED); } +static inline bool +_hb_glyph_info_multiplied (const hb_glyph_info_t *info) +{ + return !!(info->glyph_props() & HB_OT_LAYOUT_GLYPH_PROPS_MULTIPLIED); +} + +static inline bool +_hb_glyph_info_ligated_and_didnt_multiply (const hb_glyph_info_t *info) +{ + return _hb_glyph_info_ligated (info) && !_hb_glyph_info_multiplied (info); +} + +static inline void +_hb_glyph_info_clear_ligated_and_multiplied (hb_glyph_info_t *info) +{ + info->glyph_props() &= ~(HB_OT_LAYOUT_GLYPH_PROPS_LIGATED | + HB_OT_LAYOUT_GLYPH_PROPS_MULTIPLIED); +} + + /* Allocation / deallocation. */ -inline void +static inline void _hb_buffer_allocate_unicode_vars (hb_buffer_t *buffer) { HB_BUFFER_ALLOCATE_VAR (buffer, unicode_props0); HB_BUFFER_ALLOCATE_VAR (buffer, unicode_props1); } -inline void +static inline void _hb_buffer_deallocate_unicode_vars (hb_buffer_t *buffer) { HB_BUFFER_DEALLOCATE_VAR (buffer, unicode_props0); HB_BUFFER_DEALLOCATE_VAR (buffer, unicode_props1); } -inline void +static inline void _hb_buffer_allocate_gsubgpos_vars (hb_buffer_t *buffer) { HB_BUFFER_ALLOCATE_VAR (buffer, glyph_props); @@ -405,7 +427,7 @@ _hb_buffer_allocate_gsubgpos_vars (hb_buffer_t *buffer) HB_BUFFER_ALLOCATE_VAR (buffer, syllable); } -inline void +static inline void _hb_buffer_deallocate_gsubgpos_vars (hb_buffer_t *buffer) { HB_BUFFER_DEALLOCATE_VAR (buffer, syllable); diff --git a/src/3rdparty/harfbuzz-ng/src/hb-ot-layout.cc b/src/3rdparty/harfbuzz-ng/src/hb-ot-layout.cc index 183726e63c..661d90ea0d 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-ot-layout.cc +++ b/src/3rdparty/harfbuzz-ng/src/hb-ot-layout.cc @@ -327,9 +327,28 @@ hb_ot_layout_language_get_required_feature_index (hb_face_t *face, unsigned int language_index, unsigned int *feature_index) { - const OT::LangSys &l = get_gsubgpos_table (face, table_tag).get_script (script_index).get_lang_sys (language_index); + return hb_ot_layout_language_get_required_feature (face, + table_tag, + script_index, + language_index, + feature_index, + NULL); +} + +hb_bool_t +hb_ot_layout_language_get_required_feature (hb_face_t *face, + hb_tag_t table_tag, + unsigned int script_index, + unsigned int language_index, + unsigned int *feature_index, + hb_tag_t *feature_tag) +{ + const OT::GSUBGPOS &g = get_gsubgpos_table (face, table_tag); + const OT::LangSys &l = g.get_script (script_index).get_lang_sys (language_index); - if (feature_index) *feature_index = l.get_required_feature_index (); + unsigned int index = l.get_required_feature_index (); + if (feature_index) *feature_index = index; + if (feature_tag) *feature_tag = g.get_feature_tag (index); return l.has_required_feature (); } @@ -468,11 +487,12 @@ _hb_ot_layout_collect_lookups_features (hb_face_t *face, if (!features) { unsigned int required_feature_index; - if (hb_ot_layout_language_get_required_feature_index (face, - table_tag, - script_index, - language_index, - &required_feature_index)) + if (hb_ot_layout_language_get_required_feature (face, + table_tag, + script_index, + language_index, + &required_feature_index, + NULL)) _hb_ot_layout_collect_lookups_lookups (face, table_tag, required_feature_index, diff --git a/src/3rdparty/harfbuzz-ng/src/hb-ot-layout.h b/src/3rdparty/harfbuzz-ng/src/hb-ot-layout.h index d90eff374d..949678ac42 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-ot-layout.h +++ b/src/3rdparty/harfbuzz-ng/src/hb-ot-layout.h @@ -92,9 +92,9 @@ hb_ot_layout_get_ligature_carets (hb_font_t *font, * GSUB/GPOS feature query and enumeration interface */ -#define HB_OT_LAYOUT_NO_SCRIPT_INDEX ((unsigned int) 0xFFFF) -#define HB_OT_LAYOUT_NO_FEATURE_INDEX ((unsigned int) 0xFFFF) -#define HB_OT_LAYOUT_DEFAULT_LANGUAGE_INDEX ((unsigned int) 0xFFFF) +#define HB_OT_LAYOUT_NO_SCRIPT_INDEX 0xFFFFu +#define HB_OT_LAYOUT_NO_FEATURE_INDEX 0xFFFFu +#define HB_OT_LAYOUT_DEFAULT_LANGUAGE_INDEX 0xFFFFu unsigned int hb_ot_layout_table_get_script_tags (hb_face_t *face, @@ -146,6 +146,14 @@ hb_ot_layout_language_get_required_feature_index (hb_face_t *face, unsigned int language_index, unsigned int *feature_index); +hb_bool_t +hb_ot_layout_language_get_required_feature (hb_face_t *face, + hb_tag_t table_tag, + unsigned int script_index, + unsigned int language_index, + unsigned int *feature_index, + hb_tag_t *feature_tag); + unsigned int hb_ot_layout_language_get_feature_indexes (hb_face_t *face, hb_tag_t table_tag, diff --git a/src/3rdparty/harfbuzz-ng/src/hb-ot-map-private.hh b/src/3rdparty/harfbuzz-ng/src/hb-ot-map-private.hh index 0e718a6f1f..86b7e9fafe 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-ot-map-private.hh +++ b/src/3rdparty/harfbuzz-ng/src/hb-ot-map-private.hh @@ -153,26 +153,26 @@ struct hb_ot_map_t }; enum hb_ot_map_feature_flags_t { - F_NONE = 0x0000, - F_GLOBAL = 0x0001, - F_HAS_FALLBACK = 0x0002, - F_MANUAL_ZWJ = 0x0004 + F_NONE = 0x0000u, + F_GLOBAL = 0x0001u, + F_HAS_FALLBACK = 0x0002u, + F_MANUAL_ZWJ = 0x0004u }; /* Macro version for where const is desired. */ #define F_COMBINE(l,r) (hb_ot_map_feature_flags_t ((unsigned int) (l) | (unsigned int) (r))) -inline hb_ot_map_feature_flags_t +static inline hb_ot_map_feature_flags_t operator | (hb_ot_map_feature_flags_t l, hb_ot_map_feature_flags_t r) { return hb_ot_map_feature_flags_t ((unsigned int) l | (unsigned int) r); } -inline hb_ot_map_feature_flags_t +static inline hb_ot_map_feature_flags_t operator & (hb_ot_map_feature_flags_t l, hb_ot_map_feature_flags_t r) { return hb_ot_map_feature_flags_t ((unsigned int) l & (unsigned int) r); } -inline hb_ot_map_feature_flags_t +static inline hb_ot_map_feature_flags_t operator ~ (hb_ot_map_feature_flags_t r) { return hb_ot_map_feature_flags_t (~(unsigned int) r); } -inline hb_ot_map_feature_flags_t& +static inline hb_ot_map_feature_flags_t& operator |= (hb_ot_map_feature_flags_t &l, hb_ot_map_feature_flags_t r) { l = l | r; return l; } -inline hb_ot_map_feature_flags_t& +static inline hb_ot_map_feature_flags_t& operator &= (hb_ot_map_feature_flags_t& l, hb_ot_map_feature_flags_t r) { l = l & r; return l; } diff --git a/src/3rdparty/harfbuzz-ng/src/hb-ot-map.cc b/src/3rdparty/harfbuzz-ng/src/hb-ot-map.cc index 559193c1ba..4985eb22b2 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-ot-map.cc +++ b/src/3rdparty/harfbuzz-ng/src/hb-ot-map.cc @@ -99,6 +99,7 @@ void hb_ot_map_builder_t::add_feature (hb_tag_t tag, unsigned int value, { feature_info_t *info = feature_infos.push(); if (unlikely (!info)) return; + if (unlikely (!tag)) return; info->tag = tag; info->seq = feature_infos.len; info->max_value = value; @@ -131,9 +132,25 @@ hb_ot_map_builder_t::compile (hb_ot_map_t &m) { m.global_mask = 1; - for (unsigned int table_index = 0; table_index < 2; table_index++) { + unsigned int required_feature_index[2]; + hb_tag_t required_feature_tag[2]; + /* We default to applying required feature in stage 0. If the required + * feature has a tag that is known to the shaper, we apply required feature + * in the stage for that tag. + */ + unsigned int required_feature_stage[2] = {0, 0}; + + for (unsigned int table_index = 0; table_index < 2; table_index++) + { m.chosen_script[table_index] = chosen_script[table_index]; m.found_script[table_index] = found_script[table_index]; + + hb_ot_layout_language_get_required_feature (face, + table_tags[table_index], + script_index[table_index], + language_index[table_index], + &required_feature_index[table_index], + &required_feature_tag[table_index]); } if (!feature_infos.len) @@ -141,7 +158,7 @@ hb_ot_map_builder_t::compile (hb_ot_map_t &m) /* Sort features and merge duplicates */ { - feature_infos.sort (); + feature_infos.qsort (); unsigned int j = 0; for (unsigned int i = 1; i < feature_infos.len; i++) if (feature_infos[i].tag != feature_infos[j].tag) @@ -166,7 +183,8 @@ hb_ot_map_builder_t::compile (hb_ot_map_t &m) /* Allocate bits now */ unsigned int next_bit = 1; - for (unsigned int i = 0; i < feature_infos.len; i++) { + for (unsigned int i = 0; i < feature_infos.len; i++) + { const feature_info_t *info = &feature_infos[i]; unsigned int bits_needed; @@ -184,12 +202,20 @@ hb_ot_map_builder_t::compile (hb_ot_map_t &m) hb_bool_t found = false; unsigned int feature_index[2]; for (unsigned int table_index = 0; table_index < 2; table_index++) + { + if (required_feature_tag[table_index] == info->tag) + { + required_feature_stage[table_index] = info->stage[table_index]; + found = true; + continue; + } found |= hb_ot_layout_language_find_feature (face, table_tags[table_index], script_index[table_index], language_index[table_index], info->tag, &feature_index[table_index]); + } if (!found && !(info->flags & F_HAS_FALLBACK)) continue; @@ -224,23 +250,21 @@ hb_ot_map_builder_t::compile (hb_ot_map_t &m) add_gsub_pause (NULL); add_gpos_pause (NULL); - for (unsigned int table_index = 0; table_index < 2; table_index++) { - hb_tag_t table_tag = table_tags[table_index]; - + for (unsigned int table_index = 0; table_index < 2; table_index++) + { /* Collect lookup indices for features */ - unsigned int required_feature_index; - if (hb_ot_layout_language_get_required_feature_index (face, - table_tag, - script_index[table_index], - language_index[table_index], - &required_feature_index)) - m.add_lookups (face, table_index, required_feature_index, 1, true); - unsigned int stage_index = 0; unsigned int last_num_lookups = 0; for (unsigned stage = 0; stage < current_stage[table_index]; stage++) { + if (required_feature_index[table_index] != HB_OT_LAYOUT_NO_FEATURE_INDEX && + required_feature_stage[table_index] == stage) + m.add_lookups (face, table_index, + required_feature_index[table_index], + 1 /* mask */, + true /* auto_zwj */); + for (unsigned i = 0; i < m.features.len; i++) if (m.features[i].stage[table_index] == stage) m.add_lookups (face, table_index, @@ -251,7 +275,7 @@ hb_ot_map_builder_t::compile (hb_ot_map_t &m) /* Sort lookups and merge duplicates */ if (last_num_lookups < m.lookups[table_index].len) { - m.lookups[table_index].sort (last_num_lookups, m.lookups[table_index].len); + m.lookups[table_index].qsort (last_num_lookups, m.lookups[table_index].len); unsigned int j = last_num_lookups; for (unsigned int i = j + 1; i < m.lookups[table_index].len; i++) diff --git a/src/3rdparty/harfbuzz-ng/src/hb-ot-maxp-table.hh b/src/3rdparty/harfbuzz-ng/src/hb-ot-maxp-table.hh index e6d255579c..b1f832852d 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-ot-maxp-table.hh +++ b/src/3rdparty/harfbuzz-ng/src/hb-ot-maxp-table.hh @@ -50,13 +50,13 @@ struct maxp inline bool sanitize (hb_sanitize_context_t *c) { TRACE_SANITIZE (this); return TRACE_RETURN (c->check_struct (this) && - likely (version.major == 1 || (version.major == 0 && version.minor == 0x5000))); + likely (version.major == 1 || (version.major == 0 && version.minor == 0x5000u))); } /* We only implement version 0.5 as none of the extra fields in version 1.0 are useful. */ protected: FixedVersion version; /* Version of the maxp table (0.5 or 1.0), - * 0x00005000 or 0x00010000. */ + * 0x00005000u or 0x00010000u. */ USHORT numGlyphs; /* The number of glyphs in the font. */ public: DEFINE_SIZE_STATIC (6); diff --git a/src/3rdparty/harfbuzz-ng/src/hb-ot-name-table.hh b/src/3rdparty/harfbuzz-ng/src/hb-ot-name-table.hh index 07dc0565ca..31d9fac7e2 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-ot-name-table.hh +++ b/src/3rdparty/harfbuzz-ng/src/hb-ot-name-table.hh @@ -121,7 +121,7 @@ struct name /* We only implement format 0 for now. */ USHORT format; /* Format selector (=0/1). */ USHORT count; /* Number of name records. */ - Offset stringOffset; /* Offset to start of string storage (from start of table). */ + Offset<> stringOffset; /* Offset to start of string storage (from start of table). */ NameRecord nameRecord[VAR]; /* The name records where count is the number of records. */ public: DEFINE_SIZE_ARRAY (6, nameRecord); diff --git a/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-arabic-fallback.hh b/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-arabic-fallback.hh index 6b2b87e3f2..2d8488e151 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-arabic-fallback.hh +++ b/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-arabic-fallback.hh @@ -71,7 +71,7 @@ arabic_fallback_synthesize_lookup_single (const hb_ot_shape_plan_t *plan HB_UNUS !hb_font_get_glyph (font, u, 0, &u_glyph) || !hb_font_get_glyph (font, s, 0, &s_glyph) || u_glyph == s_glyph || - u_glyph > 0xFFFF || s_glyph > 0xFFFF) + u_glyph > 0xFFFFu || s_glyph > 0xFFFFu) continue; glyphs[num_glyphs].set (u_glyph); diff --git a/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-arabic-table.hh b/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-arabic-table.hh index 730a275bf0..d41d6ce598 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-arabic-table.hh +++ b/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-arabic-table.hh @@ -2,12 +2,14 @@ /* * The following table is generated by running: * - * ./gen-arabic-table.py ArabicShaping.txt UnicodeData.txt + * ./gen-arabic-table.py ArabicShaping.txt UnicodeData.txt Blocks.txt * * on files with these headers: * - * # ArabicShaping-6.2.0.txt - * # Date: 2012-05-15, 21:05:00 GMT [KW] + * # ArabicShaping-7.0.0.txt + * # Date: 2014-02-14, 21:00:00 GMT [RP, KW, LI] + * # Blocks-7.0.0.txt + * # Date: 2014-04-03, 23:23:00 GMT [RP, KW] * UnicodeData.txt does not have a header. */ @@ -15,903 +17,342 @@ #define HB_OT_SHAPE_COMPLEX_ARABIC_TABLE_HH +#define X JOINING_TYPE_X +#define R JOINING_TYPE_R +#define U JOINING_TYPE_U +#define A JOINING_GROUP_ALAPH +#define DR JOINING_GROUP_DALATH_RISH +#define L JOINING_TYPE_L +#define C JOINING_TYPE_C +#define D JOINING_TYPE_D + static const uint8_t joining_table[] = { - /* Arabic Characters */ - - JOINING_TYPE_U, /* 0600; ARABIC NUMBER SIGN; U; No_Joining_Group */ - JOINING_TYPE_U, /* 0601; ARABIC SIGN SANAH; U; No_Joining_Group */ - JOINING_TYPE_U, /* 0602; ARABIC FOOTNOTE MARKER; U; No_Joining_Group */ - JOINING_TYPE_U, /* 0603; ARABIC SIGN SAFHA; U; No_Joining_Group */ - JOINING_TYPE_U, /* 0604; ARABIC SIGN SAMVAT; U; No_Joining_Group */ - JOINING_TYPE_X, /* 0605 */ - JOINING_TYPE_X, /* 0606 */ - JOINING_TYPE_X, /* 0607 */ - JOINING_TYPE_U, /* 0608; ARABIC RAY; U; No_Joining_Group */ - JOINING_TYPE_X, /* 0609 */ - JOINING_TYPE_X, /* 060A */ - JOINING_TYPE_U, /* 060B; AFGHANI SIGN; U; No_Joining_Group */ - JOINING_TYPE_X, /* 060C */ - JOINING_TYPE_X, /* 060D */ - JOINING_TYPE_X, /* 060E */ - JOINING_TYPE_X, /* 060F */ - JOINING_TYPE_X, /* 0610 */ - JOINING_TYPE_X, /* 0611 */ - JOINING_TYPE_X, /* 0612 */ - JOINING_TYPE_X, /* 0613 */ - JOINING_TYPE_X, /* 0614 */ - JOINING_TYPE_X, /* 0615 */ - JOINING_TYPE_X, /* 0616 */ - JOINING_TYPE_X, /* 0617 */ - JOINING_TYPE_X, /* 0618 */ - JOINING_TYPE_X, /* 0619 */ - JOINING_TYPE_X, /* 061A */ - JOINING_TYPE_X, /* 061B */ - JOINING_TYPE_X, /* 061C */ - JOINING_TYPE_X, /* 061D */ - JOINING_TYPE_X, /* 061E */ - JOINING_TYPE_X, /* 061F */ - JOINING_TYPE_D, /* 0620; DOTLESS YEH WITH SEPARATE RING BELOW; D; YEH */ - JOINING_TYPE_U, /* 0621; HAMZA; U; No_Joining_Group */ - JOINING_TYPE_R, /* 0622; ALEF WITH MADDA ABOVE; R; ALEF */ - JOINING_TYPE_R, /* 0623; ALEF WITH HAMZA ABOVE; R; ALEF */ - JOINING_TYPE_R, /* 0624; WAW WITH HAMZA ABOVE; R; WAW */ - JOINING_TYPE_R, /* 0625; ALEF WITH HAMZA BELOW; R; ALEF */ - JOINING_TYPE_D, /* 0626; DOTLESS YEH WITH HAMZA ABOVE; D; YEH */ - JOINING_TYPE_R, /* 0627; ALEF; R; ALEF */ - JOINING_TYPE_D, /* 0628; BEH; D; BEH */ - JOINING_TYPE_R, /* 0629; TEH MARBUTA; R; TEH MARBUTA */ - JOINING_TYPE_D, /* 062A; DOTLESS BEH WITH 2 DOTS ABOVE; D; BEH */ - JOINING_TYPE_D, /* 062B; DOTLESS BEH WITH 3 DOTS ABOVE; D; BEH */ - JOINING_TYPE_D, /* 062C; HAH WITH DOT BELOW; D; HAH */ - JOINING_TYPE_D, /* 062D; HAH; D; HAH */ - JOINING_TYPE_D, /* 062E; HAH WITH DOT ABOVE; D; HAH */ - JOINING_TYPE_R, /* 062F; DAL; R; DAL */ - JOINING_TYPE_R, /* 0630; DAL WITH DOT ABOVE; R; DAL */ - JOINING_TYPE_R, /* 0631; REH; R; REH */ - JOINING_TYPE_R, /* 0632; REH WITH DOT ABOVE; R; REH */ - JOINING_TYPE_D, /* 0633; SEEN; D; SEEN */ - JOINING_TYPE_D, /* 0634; SEEN WITH 3 DOTS ABOVE; D; SEEN */ - JOINING_TYPE_D, /* 0635; SAD; D; SAD */ - JOINING_TYPE_D, /* 0636; SAD WITH DOT ABOVE; D; SAD */ - JOINING_TYPE_D, /* 0637; TAH; D; TAH */ - JOINING_TYPE_D, /* 0638; TAH WITH DOT ABOVE; D; TAH */ - JOINING_TYPE_D, /* 0639; AIN; D; AIN */ - JOINING_TYPE_D, /* 063A; AIN WITH DOT ABOVE; D; AIN */ - JOINING_TYPE_D, /* 063B; KEHEH WITH 2 DOTS ABOVE; D; GAF */ - JOINING_TYPE_D, /* 063C; KEHEH WITH 3 DOTS BELOW; D; GAF */ - JOINING_TYPE_D, /* 063D; FARSI YEH WITH INVERTED V ABOVE; D; FARSI YEH */ - JOINING_TYPE_D, /* 063E; FARSI YEH WITH 2 DOTS ABOVE; D; FARSI YEH */ - JOINING_TYPE_D, /* 063F; FARSI YEH WITH 3 DOTS ABOVE; D; FARSI YEH */ - JOINING_TYPE_C, /* 0640; TATWEEL; C; No_Joining_Group */ - JOINING_TYPE_D, /* 0641; FEH; D; FEH */ - JOINING_TYPE_D, /* 0642; QAF; D; QAF */ - JOINING_TYPE_D, /* 0643; KAF; D; KAF */ - JOINING_TYPE_D, /* 0644; LAM; D; LAM */ - JOINING_TYPE_D, /* 0645; MEEM; D; MEEM */ - JOINING_TYPE_D, /* 0646; NOON; D; NOON */ - JOINING_TYPE_D, /* 0647; HEH; D; HEH */ - JOINING_TYPE_R, /* 0648; WAW; R; WAW */ - JOINING_TYPE_D, /* 0649; DOTLESS YEH; D; YEH */ - JOINING_TYPE_D, /* 064A; YEH; D; YEH */ - JOINING_TYPE_X, /* 064B */ - JOINING_TYPE_X, /* 064C */ - JOINING_TYPE_X, /* 064D */ - JOINING_TYPE_X, /* 064E */ - JOINING_TYPE_X, /* 064F */ - JOINING_TYPE_X, /* 0650 */ - JOINING_TYPE_X, /* 0651 */ - JOINING_TYPE_X, /* 0652 */ - JOINING_TYPE_X, /* 0653 */ - JOINING_TYPE_X, /* 0654 */ - JOINING_TYPE_X, /* 0655 */ - JOINING_TYPE_X, /* 0656 */ - JOINING_TYPE_X, /* 0657 */ - JOINING_TYPE_X, /* 0658 */ - JOINING_TYPE_X, /* 0659 */ - JOINING_TYPE_X, /* 065A */ - JOINING_TYPE_X, /* 065B */ - JOINING_TYPE_X, /* 065C */ - JOINING_TYPE_X, /* 065D */ - JOINING_TYPE_X, /* 065E */ - JOINING_TYPE_X, /* 065F */ - JOINING_TYPE_X, /* 0660 */ - JOINING_TYPE_X, /* 0661 */ - JOINING_TYPE_X, /* 0662 */ - JOINING_TYPE_X, /* 0663 */ - JOINING_TYPE_X, /* 0664 */ - JOINING_TYPE_X, /* 0665 */ - JOINING_TYPE_X, /* 0666 */ - JOINING_TYPE_X, /* 0667 */ - JOINING_TYPE_X, /* 0668 */ - JOINING_TYPE_X, /* 0669 */ - JOINING_TYPE_X, /* 066A */ - JOINING_TYPE_X, /* 066B */ - JOINING_TYPE_X, /* 066C */ - JOINING_TYPE_X, /* 066D */ - JOINING_TYPE_D, /* 066E; DOTLESS BEH; D; BEH */ - JOINING_TYPE_D, /* 066F; DOTLESS QAF; D; QAF */ - JOINING_TYPE_X, /* 0670 */ - JOINING_TYPE_R, /* 0671; ALEF WITH WASLA ABOVE; R; ALEF */ - JOINING_TYPE_R, /* 0672; ALEF WITH WAVY HAMZA ABOVE; R; ALEF */ - JOINING_TYPE_R, /* 0673; ALEF WITH WAVY HAMZA BELOW; R; ALEF */ - JOINING_TYPE_U, /* 0674; HIGH HAMZA; U; No_Joining_Group */ - JOINING_TYPE_R, /* 0675; HIGH HAMZA ALEF; R; ALEF */ - JOINING_TYPE_R, /* 0676; HIGH HAMZA WAW; R; WAW */ - JOINING_TYPE_R, /* 0677; HIGH HAMZA WAW WITH DAMMA ABOVE; R; WAW */ - JOINING_TYPE_D, /* 0678; HIGH HAMZA DOTLESS YEH; D; YEH */ - JOINING_TYPE_D, /* 0679; DOTLESS BEH WITH TAH ABOVE; D; BEH */ - JOINING_TYPE_D, /* 067A; DOTLESS BEH WITH VERTICAL 2 DOTS ABOVE; D; BEH */ - JOINING_TYPE_D, /* 067B; DOTLESS BEH WITH VERTICAL 2 DOTS BELOW; D; BEH */ - JOINING_TYPE_D, /* 067C; DOTLESS BEH WITH ATTACHED RING BELOW AND 2 DOTS ABOVE; D; BEH */ - JOINING_TYPE_D, /* 067D; DOTLESS BEH WITH INVERTED 3 DOTS ABOVE; D; BEH */ - JOINING_TYPE_D, /* 067E; DOTLESS BEH WITH 3 DOTS BELOW; D; BEH */ - JOINING_TYPE_D, /* 067F; DOTLESS BEH WITH 4 DOTS ABOVE; D; BEH */ - JOINING_TYPE_D, /* 0680; DOTLESS BEH WITH 4 DOTS BELOW; D; BEH */ - JOINING_TYPE_D, /* 0681; HAH WITH HAMZA ABOVE; D; HAH */ - JOINING_TYPE_D, /* 0682; HAH WITH VERTICAL 2 DOTS ABOVE; D; HAH */ - JOINING_TYPE_D, /* 0683; HAH WITH 2 DOTS BELOW; D; HAH */ - JOINING_TYPE_D, /* 0684; HAH WITH VERTICAL 2 DOTS BELOW; D; HAH */ - JOINING_TYPE_D, /* 0685; HAH WITH 3 DOTS ABOVE; D; HAH */ - JOINING_TYPE_D, /* 0686; HAH WITH 3 DOTS BELOW; D; HAH */ - JOINING_TYPE_D, /* 0687; HAH WITH 4 DOTS BELOW; D; HAH */ - JOINING_TYPE_R, /* 0688; DAL WITH TAH ABOVE; R; DAL */ - JOINING_TYPE_R, /* 0689; DAL WITH ATTACHED RING BELOW; R; DAL */ - JOINING_TYPE_R, /* 068A; DAL WITH DOT BELOW; R; DAL */ - JOINING_TYPE_R, /* 068B; DAL WITH DOT BELOW AND TAH ABOVE; R; DAL */ - JOINING_TYPE_R, /* 068C; DAL WITH 2 DOTS ABOVE; R; DAL */ - JOINING_TYPE_R, /* 068D; DAL WITH 2 DOTS BELOW; R; DAL */ - JOINING_TYPE_R, /* 068E; DAL WITH 3 DOTS ABOVE; R; DAL */ - JOINING_TYPE_R, /* 068F; DAL WITH INVERTED 3 DOTS ABOVE; R; DAL */ - JOINING_TYPE_R, /* 0690; DAL WITH 4 DOTS ABOVE; R; DAL */ - JOINING_TYPE_R, /* 0691; REH WITH TAH ABOVE; R; REH */ - JOINING_TYPE_R, /* 0692; REH WITH V ABOVE; R; REH */ - JOINING_TYPE_R, /* 0693; REH WITH ATTACHED RING BELOW; R; REH */ - JOINING_TYPE_R, /* 0694; REH WITH DOT BELOW; R; REH */ - JOINING_TYPE_R, /* 0695; REH WITH V BELOW; R; REH */ - JOINING_TYPE_R, /* 0696; REH WITH DOT BELOW AND DOT WITHIN; R; REH */ - JOINING_TYPE_R, /* 0697; REH WITH 2 DOTS ABOVE; R; REH */ - JOINING_TYPE_R, /* 0698; REH WITH 3 DOTS ABOVE; R; REH */ - JOINING_TYPE_R, /* 0699; REH WITH 4 DOTS ABOVE; R; REH */ - JOINING_TYPE_D, /* 069A; SEEN WITH DOT BELOW AND DOT ABOVE; D; SEEN */ - JOINING_TYPE_D, /* 069B; SEEN WITH 3 DOTS BELOW; D; SEEN */ - JOINING_TYPE_D, /* 069C; SEEN WITH 3 DOTS BELOW AND 3 DOTS ABOVE; D; SEEN */ - JOINING_TYPE_D, /* 069D; SAD WITH 2 DOTS BELOW; D; SAD */ - JOINING_TYPE_D, /* 069E; SAD WITH 3 DOTS ABOVE; D; SAD */ - JOINING_TYPE_D, /* 069F; TAH WITH 3 DOTS ABOVE; D; TAH */ - JOINING_TYPE_D, /* 06A0; AIN WITH 3 DOTS ABOVE; D; AIN */ - JOINING_TYPE_D, /* 06A1; DOTLESS FEH; D; FEH */ - JOINING_TYPE_D, /* 06A2; DOTLESS FEH WITH DOT BELOW; D; FEH */ - JOINING_TYPE_D, /* 06A3; FEH WITH DOT BELOW; D; FEH */ - JOINING_TYPE_D, /* 06A4; DOTLESS FEH WITH 3 DOTS ABOVE; D; FEH */ - JOINING_TYPE_D, /* 06A5; DOTLESS FEH WITH 3 DOTS BELOW; D; FEH */ - JOINING_TYPE_D, /* 06A6; DOTLESS FEH WITH 4 DOTS ABOVE; D; FEH */ - JOINING_TYPE_D, /* 06A7; DOTLESS QAF WITH DOT ABOVE; D; QAF */ - JOINING_TYPE_D, /* 06A8; DOTLESS QAF WITH 3 DOTS ABOVE; D; QAF */ - JOINING_TYPE_D, /* 06A9; KEHEH; D; GAF */ - JOINING_TYPE_D, /* 06AA; SWASH KAF; D; SWASH KAF */ - JOINING_TYPE_D, /* 06AB; KEHEH WITH ATTACHED RING BELOW; D; GAF */ - JOINING_TYPE_D, /* 06AC; KAF WITH DOT ABOVE; D; KAF */ - JOINING_TYPE_D, /* 06AD; KAF WITH 3 DOTS ABOVE; D; KAF */ - JOINING_TYPE_D, /* 06AE; KAF WITH 3 DOTS BELOW; D; KAF */ - JOINING_TYPE_D, /* 06AF; GAF; D; GAF */ - JOINING_TYPE_D, /* 06B0; GAF WITH ATTACHED RING BELOW; D; GAF */ - JOINING_TYPE_D, /* 06B1; GAF WITH 2 DOTS ABOVE; D; GAF */ - JOINING_TYPE_D, /* 06B2; GAF WITH 2 DOTS BELOW; D; GAF */ - JOINING_TYPE_D, /* 06B3; GAF WITH VERTICAL 2 DOTS BELOW; D; GAF */ - JOINING_TYPE_D, /* 06B4; GAF WITH 3 DOTS ABOVE; D; GAF */ - JOINING_TYPE_D, /* 06B5; LAM WITH V ABOVE; D; LAM */ - JOINING_TYPE_D, /* 06B6; LAM WITH DOT ABOVE; D; LAM */ - JOINING_TYPE_D, /* 06B7; LAM WITH 3 DOTS ABOVE; D; LAM */ - JOINING_TYPE_D, /* 06B8; LAM WITH 3 DOTS BELOW; D; LAM */ - JOINING_TYPE_D, /* 06B9; NOON WITH DOT BELOW; D; NOON */ - JOINING_TYPE_D, /* 06BA; DOTLESS NOON; D; NOON */ - JOINING_TYPE_D, /* 06BB; DOTLESS NOON WITH TAH ABOVE; D; NOON */ - JOINING_TYPE_D, /* 06BC; NOON WITH ATTACHED RING BELOW; D; NOON */ - JOINING_TYPE_D, /* 06BD; NYA; D; NYA */ - JOINING_TYPE_D, /* 06BE; KNOTTED HEH; D; KNOTTED HEH */ - JOINING_TYPE_D, /* 06BF; HAH WITH 3 DOTS BELOW AND DOT ABOVE; D; HAH */ - JOINING_TYPE_R, /* 06C0; DOTLESS TEH MARBUTA WITH HAMZA ABOVE; R; TEH MARBUTA */ - JOINING_TYPE_D, /* 06C1; HEH GOAL; D; HEH GOAL */ - JOINING_TYPE_D, /* 06C2; HEH GOAL WITH HAMZA ABOVE; D; HEH GOAL */ - JOINING_TYPE_R, /* 06C3; TEH MARBUTA GOAL; R; TEH MARBUTA GOAL */ - JOINING_TYPE_R, /* 06C4; WAW WITH ATTACHED RING WITHIN; R; WAW */ - JOINING_TYPE_R, /* 06C5; WAW WITH BAR; R; WAW */ - JOINING_TYPE_R, /* 06C6; WAW WITH V ABOVE; R; WAW */ - JOINING_TYPE_R, /* 06C7; WAW WITH DAMMA ABOVE; R; WAW */ - JOINING_TYPE_R, /* 06C8; WAW WITH ALEF ABOVE; R; WAW */ - JOINING_TYPE_R, /* 06C9; WAW WITH INVERTED V ABOVE; R; WAW */ - JOINING_TYPE_R, /* 06CA; WAW WITH 2 DOTS ABOVE; R; WAW */ - JOINING_TYPE_R, /* 06CB; WAW WITH 3 DOTS ABOVE; R; WAW */ - JOINING_TYPE_D, /* 06CC; FARSI YEH; D; FARSI YEH */ - JOINING_TYPE_R, /* 06CD; YEH WITH TAIL; R; YEH WITH TAIL */ - JOINING_TYPE_D, /* 06CE; FARSI YEH WITH V ABOVE; D; FARSI YEH */ - JOINING_TYPE_R, /* 06CF; WAW WITH DOT ABOVE; R; WAW */ - JOINING_TYPE_D, /* 06D0; DOTLESS YEH WITH VERTICAL 2 DOTS BELOW; D; YEH */ - JOINING_TYPE_D, /* 06D1; DOTLESS YEH WITH 3 DOTS BELOW; D; YEH */ - JOINING_TYPE_R, /* 06D2; YEH BARREE; R; YEH BARREE */ - JOINING_TYPE_R, /* 06D3; YEH BARREE WITH HAMZA ABOVE; R; YEH BARREE */ - JOINING_TYPE_X, /* 06D4 */ - JOINING_TYPE_R, /* 06D5; DOTLESS TEH MARBUTA; R; TEH MARBUTA */ - JOINING_TYPE_X, /* 06D6 */ - JOINING_TYPE_X, /* 06D7 */ - JOINING_TYPE_X, /* 06D8 */ - JOINING_TYPE_X, /* 06D9 */ - JOINING_TYPE_X, /* 06DA */ - JOINING_TYPE_X, /* 06DB */ - JOINING_TYPE_X, /* 06DC */ - JOINING_TYPE_U, /* 06DD; ARABIC END OF AYAH; U; No_Joining_Group */ - JOINING_TYPE_X, /* 06DE */ - JOINING_TYPE_X, /* 06DF */ - JOINING_TYPE_X, /* 06E0 */ - JOINING_TYPE_X, /* 06E1 */ - JOINING_TYPE_X, /* 06E2 */ - JOINING_TYPE_X, /* 06E3 */ - JOINING_TYPE_X, /* 06E4 */ - JOINING_TYPE_X, /* 06E5 */ - JOINING_TYPE_X, /* 06E6 */ - JOINING_TYPE_X, /* 06E7 */ - JOINING_TYPE_X, /* 06E8 */ - JOINING_TYPE_X, /* 06E9 */ - JOINING_TYPE_X, /* 06EA */ - JOINING_TYPE_X, /* 06EB */ - JOINING_TYPE_X, /* 06EC */ - JOINING_TYPE_X, /* 06ED */ - JOINING_TYPE_R, /* 06EE; DAL WITH INVERTED V ABOVE; R; DAL */ - JOINING_TYPE_R, /* 06EF; REH WITH INVERTED V ABOVE; R; REH */ - JOINING_TYPE_X, /* 06F0 */ - JOINING_TYPE_X, /* 06F1 */ - JOINING_TYPE_X, /* 06F2 */ - JOINING_TYPE_X, /* 06F3 */ - JOINING_TYPE_X, /* 06F4 */ - JOINING_TYPE_X, /* 06F5 */ - JOINING_TYPE_X, /* 06F6 */ - JOINING_TYPE_X, /* 06F7 */ - JOINING_TYPE_X, /* 06F8 */ - JOINING_TYPE_X, /* 06F9 */ - JOINING_TYPE_D, /* 06FA; SEEN WITH DOT BELOW AND 3 DOTS ABOVE; D; SEEN */ - JOINING_TYPE_D, /* 06FB; SAD WITH DOT BELOW AND DOT ABOVE; D; SAD */ - JOINING_TYPE_D, /* 06FC; AIN WITH DOT BELOW AND DOT ABOVE; D; AIN */ - JOINING_TYPE_X, /* 06FD */ - JOINING_TYPE_X, /* 06FE */ - JOINING_TYPE_D, /* 06FF; KNOTTED HEH WITH INVERTED V ABOVE; D; KNOTTED HEH */ - - /* Syriac Characters */ - - JOINING_TYPE_X, /* 0700 */ - JOINING_TYPE_X, /* 0701 */ - JOINING_TYPE_X, /* 0702 */ - JOINING_TYPE_X, /* 0703 */ - JOINING_TYPE_X, /* 0704 */ - JOINING_TYPE_X, /* 0705 */ - JOINING_TYPE_X, /* 0706 */ - JOINING_TYPE_X, /* 0707 */ - JOINING_TYPE_X, /* 0708 */ - JOINING_TYPE_X, /* 0709 */ - JOINING_TYPE_X, /* 070A */ - JOINING_TYPE_X, /* 070B */ - JOINING_TYPE_X, /* 070C */ - JOINING_TYPE_X, /* 070D */ - JOINING_TYPE_X, /* 070E */ - JOINING_TYPE_X, /* 070F */ - JOINING_GROUP_ALAPH, /* 0710; ALAPH; R; ALAPH */ - JOINING_TYPE_X, /* 0711 */ - JOINING_TYPE_D, /* 0712; BETH; D; BETH */ - JOINING_TYPE_D, /* 0713; GAMAL; D; GAMAL */ - JOINING_TYPE_D, /* 0714; GAMAL GARSHUNI; D; GAMAL */ - JOINING_GROUP_DALATH_RISH, /* 0715; DALATH; R; DALATH RISH */ - JOINING_GROUP_DALATH_RISH, /* 0716; DOTLESS DALATH RISH; R; DALATH RISH */ - JOINING_TYPE_R, /* 0717; HE; R; HE */ - JOINING_TYPE_R, /* 0718; WAW; R; SYRIAC WAW */ - JOINING_TYPE_R, /* 0719; ZAIN; R; ZAIN */ - JOINING_TYPE_D, /* 071A; HETH; D; HETH */ - JOINING_TYPE_D, /* 071B; TETH; D; TETH */ - JOINING_TYPE_D, /* 071C; TETH GARSHUNI; D; TETH */ - JOINING_TYPE_D, /* 071D; YUDH; D; YUDH */ - JOINING_TYPE_R, /* 071E; YUDH HE; R; YUDH HE */ - JOINING_TYPE_D, /* 071F; KAPH; D; KAPH */ - JOINING_TYPE_D, /* 0720; LAMADH; D; LAMADH */ - JOINING_TYPE_D, /* 0721; MIM; D; MIM */ - JOINING_TYPE_D, /* 0722; NUN; D; NUN */ - JOINING_TYPE_D, /* 0723; SEMKATH; D; SEMKATH */ - JOINING_TYPE_D, /* 0724; FINAL SEMKATH; D; FINAL SEMKATH */ - JOINING_TYPE_D, /* 0725; E; D; E */ - JOINING_TYPE_D, /* 0726; PE; D; PE */ - JOINING_TYPE_D, /* 0727; REVERSED PE; D; REVERSED PE */ - JOINING_TYPE_R, /* 0728; SADHE; R; SADHE */ - JOINING_TYPE_D, /* 0729; QAPH; D; QAPH */ - JOINING_GROUP_DALATH_RISH, /* 072A; RISH; R; DALATH RISH */ - JOINING_TYPE_D, /* 072B; SHIN; D; SHIN */ - JOINING_TYPE_R, /* 072C; TAW; R; TAW */ - JOINING_TYPE_D, /* 072D; PERSIAN BHETH; D; BETH */ - JOINING_TYPE_D, /* 072E; PERSIAN GHAMAL; D; GAMAL */ - JOINING_GROUP_DALATH_RISH, /* 072F; PERSIAN DHALATH; R; DALATH RISH */ - JOINING_TYPE_X, /* 0730 */ - JOINING_TYPE_X, /* 0731 */ - JOINING_TYPE_X, /* 0732 */ - JOINING_TYPE_X, /* 0733 */ - JOINING_TYPE_X, /* 0734 */ - JOINING_TYPE_X, /* 0735 */ - JOINING_TYPE_X, /* 0736 */ - JOINING_TYPE_X, /* 0737 */ - JOINING_TYPE_X, /* 0738 */ - JOINING_TYPE_X, /* 0739 */ - JOINING_TYPE_X, /* 073A */ - JOINING_TYPE_X, /* 073B */ - JOINING_TYPE_X, /* 073C */ - JOINING_TYPE_X, /* 073D */ - JOINING_TYPE_X, /* 073E */ - JOINING_TYPE_X, /* 073F */ - JOINING_TYPE_X, /* 0740 */ - JOINING_TYPE_X, /* 0741 */ - JOINING_TYPE_X, /* 0742 */ - JOINING_TYPE_X, /* 0743 */ - JOINING_TYPE_X, /* 0744 */ - JOINING_TYPE_X, /* 0745 */ - JOINING_TYPE_X, /* 0746 */ - JOINING_TYPE_X, /* 0747 */ - JOINING_TYPE_X, /* 0748 */ - JOINING_TYPE_X, /* 0749 */ - JOINING_TYPE_X, /* 074A */ - JOINING_TYPE_X, /* 074B */ - JOINING_TYPE_X, /* 074C */ - JOINING_TYPE_R, /* 074D; SOGDIAN ZHAIN; R; ZHAIN */ - JOINING_TYPE_D, /* 074E; SOGDIAN KHAPH; D; KHAPH */ - JOINING_TYPE_D, /* 074F; SOGDIAN FE; D; FE */ - - /* Arabic Supplement Characters */ - - JOINING_TYPE_D, /* 0750; DOTLESS BEH WITH HORIZONTAL 3 DOTS BELOW; D; BEH */ - JOINING_TYPE_D, /* 0751; BEH WITH 3 DOTS ABOVE; D; BEH */ - JOINING_TYPE_D, /* 0752; DOTLESS BEH WITH INVERTED 3 DOTS BELOW; D; BEH */ - JOINING_TYPE_D, /* 0753; DOTLESS BEH WITH INVERTED 3 DOTS BELOW AND 2 DOTS ABOVE; D; BEH */ - JOINING_TYPE_D, /* 0754; DOTLESS BEH WITH 2 DOTS BELOW AND DOT ABOVE; D; BEH */ - JOINING_TYPE_D, /* 0755; DOTLESS BEH WITH INVERTED V BELOW; D; BEH */ - JOINING_TYPE_D, /* 0756; DOTLESS BEH WITH V ABOVE; D; BEH */ - JOINING_TYPE_D, /* 0757; HAH WITH 2 DOTS ABOVE; D; HAH */ - JOINING_TYPE_D, /* 0758; HAH WITH INVERTED 3 DOTS BELOW; D; HAH */ - JOINING_TYPE_R, /* 0759; DAL WITH VERTICAL 2 DOTS BELOW AND TAH ABOVE; R; DAL */ - JOINING_TYPE_R, /* 075A; DAL WITH INVERTED V BELOW; R; DAL */ - JOINING_TYPE_R, /* 075B; REH WITH BAR; R; REH */ - JOINING_TYPE_D, /* 075C; SEEN WITH 4 DOTS ABOVE; D; SEEN */ - JOINING_TYPE_D, /* 075D; AIN WITH 2 DOTS ABOVE; D; AIN */ - JOINING_TYPE_D, /* 075E; AIN WITH INVERTED 3 DOTS ABOVE; D; AIN */ - JOINING_TYPE_D, /* 075F; AIN WITH VERTICAL 2 DOTS ABOVE; D; AIN */ - JOINING_TYPE_D, /* 0760; DOTLESS FEH WITH 2 DOTS BELOW; D; FEH */ - JOINING_TYPE_D, /* 0761; DOTLESS FEH WITH INVERTED 3 DOTS BELOW; D; FEH */ - JOINING_TYPE_D, /* 0762; KEHEH WITH DOT ABOVE; D; GAF */ - JOINING_TYPE_D, /* 0763; KEHEH WITH 3 DOTS ABOVE; D; GAF */ - JOINING_TYPE_D, /* 0764; KEHEH WITH INVERTED 3 DOTS BELOW; D; GAF */ - JOINING_TYPE_D, /* 0765; MEEM WITH DOT ABOVE; D; MEEM */ - JOINING_TYPE_D, /* 0766; MEEM WITH DOT BELOW; D; MEEM */ - JOINING_TYPE_D, /* 0767; NOON WITH 2 DOTS BELOW; D; NOON */ - JOINING_TYPE_D, /* 0768; NOON WITH TAH ABOVE; D; NOON */ - JOINING_TYPE_D, /* 0769; NOON WITH V ABOVE; D; NOON */ - JOINING_TYPE_D, /* 076A; LAM WITH BAR; D; LAM */ - JOINING_TYPE_R, /* 076B; REH WITH VERTICAL 2 DOTS ABOVE; R; REH */ - JOINING_TYPE_R, /* 076C; REH WITH HAMZA ABOVE; R; REH */ - JOINING_TYPE_D, /* 076D; SEEN WITH VERTICAL 2 DOTS ABOVE; D; SEEN */ - JOINING_TYPE_D, /* 076E; HAH WITH TAH BELOW; D; HAH */ - JOINING_TYPE_D, /* 076F; HAH WITH TAH AND 2 DOTS BELOW; D; HAH */ - JOINING_TYPE_D, /* 0770; SEEN WITH 2 DOTS AND TAH ABOVE; D; SEEN */ - JOINING_TYPE_R, /* 0771; REH WITH 2 DOTS AND TAH ABOVE; R; REH */ - JOINING_TYPE_D, /* 0772; HAH WITH TAH ABOVE; D; HAH */ - JOINING_TYPE_R, /* 0773; ALEF WITH DIGIT TWO ABOVE; R; ALEF */ - JOINING_TYPE_R, /* 0774; ALEF WITH DIGIT THREE ABOVE; R; ALEF */ - JOINING_TYPE_D, /* 0775; FARSI YEH WITH DIGIT TWO ABOVE; D; FARSI YEH */ - JOINING_TYPE_D, /* 0776; FARSI YEH WITH DIGIT THREE ABOVE; D; FARSI YEH */ - JOINING_TYPE_D, /* 0777; DOTLESS YEH WITH DIGIT FOUR BELOW; D; YEH */ - JOINING_TYPE_R, /* 0778; WAW WITH DIGIT TWO ABOVE; R; WAW */ - JOINING_TYPE_R, /* 0779; WAW WITH DIGIT THREE ABOVE; R; WAW */ - JOINING_TYPE_D, /* 077A; BURUSHASKI YEH BARREE WITH DIGIT TWO ABOVE; D; BURUSHASKI YEH BARREE */ - JOINING_TYPE_D, /* 077B; BURUSHASKI YEH BARREE WITH DIGIT THREE ABOVE; D; BURUSHASKI YEH BARREE */ - JOINING_TYPE_D, /* 077C; HAH WITH DIGIT FOUR BELOW; D; HAH */ - JOINING_TYPE_D, /* 077D; SEEN WITH DIGIT FOUR ABOVE; D; SEEN */ - JOINING_TYPE_D, /* 077E; SEEN WITH INVERTED V ABOVE; D; SEEN */ - JOINING_TYPE_D, /* 077F; KAF WITH 2 DOTS ABOVE; D; KAF */ - - /* N'Ko Characters */ - - JOINING_TYPE_X, /* 0780 */ - JOINING_TYPE_X, /* 0781 */ - JOINING_TYPE_X, /* 0782 */ - JOINING_TYPE_X, /* 0783 */ - JOINING_TYPE_X, /* 0784 */ - JOINING_TYPE_X, /* 0785 */ - JOINING_TYPE_X, /* 0786 */ - JOINING_TYPE_X, /* 0787 */ - JOINING_TYPE_X, /* 0788 */ - JOINING_TYPE_X, /* 0789 */ - JOINING_TYPE_X, /* 078A */ - JOINING_TYPE_X, /* 078B */ - JOINING_TYPE_X, /* 078C */ - JOINING_TYPE_X, /* 078D */ - JOINING_TYPE_X, /* 078E */ - JOINING_TYPE_X, /* 078F */ - JOINING_TYPE_X, /* 0790 */ - JOINING_TYPE_X, /* 0791 */ - JOINING_TYPE_X, /* 0792 */ - JOINING_TYPE_X, /* 0793 */ - JOINING_TYPE_X, /* 0794 */ - JOINING_TYPE_X, /* 0795 */ - JOINING_TYPE_X, /* 0796 */ - JOINING_TYPE_X, /* 0797 */ - JOINING_TYPE_X, /* 0798 */ - JOINING_TYPE_X, /* 0799 */ - JOINING_TYPE_X, /* 079A */ - JOINING_TYPE_X, /* 079B */ - JOINING_TYPE_X, /* 079C */ - JOINING_TYPE_X, /* 079D */ - JOINING_TYPE_X, /* 079E */ - JOINING_TYPE_X, /* 079F */ - JOINING_TYPE_X, /* 07A0 */ - JOINING_TYPE_X, /* 07A1 */ - JOINING_TYPE_X, /* 07A2 */ - JOINING_TYPE_X, /* 07A3 */ - JOINING_TYPE_X, /* 07A4 */ - JOINING_TYPE_X, /* 07A5 */ - JOINING_TYPE_X, /* 07A6 */ - JOINING_TYPE_X, /* 07A7 */ - JOINING_TYPE_X, /* 07A8 */ - JOINING_TYPE_X, /* 07A9 */ - JOINING_TYPE_X, /* 07AA */ - JOINING_TYPE_X, /* 07AB */ - JOINING_TYPE_X, /* 07AC */ - JOINING_TYPE_X, /* 07AD */ - JOINING_TYPE_X, /* 07AE */ - JOINING_TYPE_X, /* 07AF */ - JOINING_TYPE_X, /* 07B0 */ - JOINING_TYPE_X, /* 07B1 */ - JOINING_TYPE_X, /* 07B2 */ - JOINING_TYPE_X, /* 07B3 */ - JOINING_TYPE_X, /* 07B4 */ - JOINING_TYPE_X, /* 07B5 */ - JOINING_TYPE_X, /* 07B6 */ - JOINING_TYPE_X, /* 07B7 */ - JOINING_TYPE_X, /* 07B8 */ - JOINING_TYPE_X, /* 07B9 */ - JOINING_TYPE_X, /* 07BA */ - JOINING_TYPE_X, /* 07BB */ - JOINING_TYPE_X, /* 07BC */ - JOINING_TYPE_X, /* 07BD */ - JOINING_TYPE_X, /* 07BE */ - JOINING_TYPE_X, /* 07BF */ - JOINING_TYPE_X, /* 07C0 */ - JOINING_TYPE_X, /* 07C1 */ - JOINING_TYPE_X, /* 07C2 */ - JOINING_TYPE_X, /* 07C3 */ - JOINING_TYPE_X, /* 07C4 */ - JOINING_TYPE_X, /* 07C5 */ - JOINING_TYPE_X, /* 07C6 */ - JOINING_TYPE_X, /* 07C7 */ - JOINING_TYPE_X, /* 07C8 */ - JOINING_TYPE_X, /* 07C9 */ - JOINING_TYPE_D, /* 07CA; NKO A; D; No_Joining_Group */ - JOINING_TYPE_D, /* 07CB; NKO EE; D; No_Joining_Group */ - JOINING_TYPE_D, /* 07CC; NKO I; D; No_Joining_Group */ - JOINING_TYPE_D, /* 07CD; NKO E; D; No_Joining_Group */ - JOINING_TYPE_D, /* 07CE; NKO U; D; No_Joining_Group */ - JOINING_TYPE_D, /* 07CF; NKO OO; D; No_Joining_Group */ - JOINING_TYPE_D, /* 07D0; NKO O; D; No_Joining_Group */ - JOINING_TYPE_D, /* 07D1; NKO DAGBASINNA; D; No_Joining_Group */ - JOINING_TYPE_D, /* 07D2; NKO N; D; No_Joining_Group */ - JOINING_TYPE_D, /* 07D3; NKO BA; D; No_Joining_Group */ - JOINING_TYPE_D, /* 07D4; NKO PA; D; No_Joining_Group */ - JOINING_TYPE_D, /* 07D5; NKO TA; D; No_Joining_Group */ - JOINING_TYPE_D, /* 07D6; NKO JA; D; No_Joining_Group */ - JOINING_TYPE_D, /* 07D7; NKO CHA; D; No_Joining_Group */ - JOINING_TYPE_D, /* 07D8; NKO DA; D; No_Joining_Group */ - JOINING_TYPE_D, /* 07D9; NKO RA; D; No_Joining_Group */ - JOINING_TYPE_D, /* 07DA; NKO RRA; D; No_Joining_Group */ - JOINING_TYPE_D, /* 07DB; NKO SA; D; No_Joining_Group */ - JOINING_TYPE_D, /* 07DC; NKO GBA; D; No_Joining_Group */ - JOINING_TYPE_D, /* 07DD; NKO FA; D; No_Joining_Group */ - JOINING_TYPE_D, /* 07DE; NKO KA; D; No_Joining_Group */ - JOINING_TYPE_D, /* 07DF; NKO LA; D; No_Joining_Group */ - JOINING_TYPE_D, /* 07E0; NKO NA WOLOSO; D; No_Joining_Group */ - JOINING_TYPE_D, /* 07E1; NKO MA; D; No_Joining_Group */ - JOINING_TYPE_D, /* 07E2; NKO NYA; D; No_Joining_Group */ - JOINING_TYPE_D, /* 07E3; NKO NA; D; No_Joining_Group */ - JOINING_TYPE_D, /* 07E4; NKO HA; D; No_Joining_Group */ - JOINING_TYPE_D, /* 07E5; NKO WA; D; No_Joining_Group */ - JOINING_TYPE_D, /* 07E6; NKO YA; D; No_Joining_Group */ - JOINING_TYPE_D, /* 07E7; NKO NYA WOLOSO; D; No_Joining_Group */ - JOINING_TYPE_D, /* 07E8; NKO JONA JA; D; No_Joining_Group */ - JOINING_TYPE_D, /* 07E9; NKO JONA CHA; D; No_Joining_Group */ - JOINING_TYPE_D, /* 07EA; NKO JONA RA; D; No_Joining_Group */ - JOINING_TYPE_X, /* 07EB */ - JOINING_TYPE_X, /* 07EC */ - JOINING_TYPE_X, /* 07ED */ - JOINING_TYPE_X, /* 07EE */ - JOINING_TYPE_X, /* 07EF */ - JOINING_TYPE_X, /* 07F0 */ - JOINING_TYPE_X, /* 07F1 */ - JOINING_TYPE_X, /* 07F2 */ - JOINING_TYPE_X, /* 07F3 */ - JOINING_TYPE_X, /* 07F4 */ - JOINING_TYPE_X, /* 07F5 */ - JOINING_TYPE_X, /* 07F6 */ - JOINING_TYPE_X, /* 07F7 */ - JOINING_TYPE_X, /* 07F8 */ - JOINING_TYPE_X, /* 07F9 */ - JOINING_TYPE_C, /* 07FA; NKO LAJANYALAN; C; No_Joining_Group */ - - /* Mandaic Characters */ - - JOINING_TYPE_X, /* 07FB */ - JOINING_TYPE_X, /* 07FC */ - JOINING_TYPE_X, /* 07FD */ - JOINING_TYPE_X, /* 07FE */ - JOINING_TYPE_X, /* 07FF */ - JOINING_TYPE_X, /* 0800 */ - JOINING_TYPE_X, /* 0801 */ - JOINING_TYPE_X, /* 0802 */ - JOINING_TYPE_X, /* 0803 */ - JOINING_TYPE_X, /* 0804 */ - JOINING_TYPE_X, /* 0805 */ - JOINING_TYPE_X, /* 0806 */ - JOINING_TYPE_X, /* 0807 */ - JOINING_TYPE_X, /* 0808 */ - JOINING_TYPE_X, /* 0809 */ - JOINING_TYPE_X, /* 080A */ - JOINING_TYPE_X, /* 080B */ - JOINING_TYPE_X, /* 080C */ - JOINING_TYPE_X, /* 080D */ - JOINING_TYPE_X, /* 080E */ - JOINING_TYPE_X, /* 080F */ - JOINING_TYPE_X, /* 0810 */ - JOINING_TYPE_X, /* 0811 */ - JOINING_TYPE_X, /* 0812 */ - JOINING_TYPE_X, /* 0813 */ - JOINING_TYPE_X, /* 0814 */ - JOINING_TYPE_X, /* 0815 */ - JOINING_TYPE_X, /* 0816 */ - JOINING_TYPE_X, /* 0817 */ - JOINING_TYPE_X, /* 0818 */ - JOINING_TYPE_X, /* 0819 */ - JOINING_TYPE_X, /* 081A */ - JOINING_TYPE_X, /* 081B */ - JOINING_TYPE_X, /* 081C */ - JOINING_TYPE_X, /* 081D */ - JOINING_TYPE_X, /* 081E */ - JOINING_TYPE_X, /* 081F */ - JOINING_TYPE_X, /* 0820 */ - JOINING_TYPE_X, /* 0821 */ - JOINING_TYPE_X, /* 0822 */ - JOINING_TYPE_X, /* 0823 */ - JOINING_TYPE_X, /* 0824 */ - JOINING_TYPE_X, /* 0825 */ - JOINING_TYPE_X, /* 0826 */ - JOINING_TYPE_X, /* 0827 */ - JOINING_TYPE_X, /* 0828 */ - JOINING_TYPE_X, /* 0829 */ - JOINING_TYPE_X, /* 082A */ - JOINING_TYPE_X, /* 082B */ - JOINING_TYPE_X, /* 082C */ - JOINING_TYPE_X, /* 082D */ - JOINING_TYPE_X, /* 082E */ - JOINING_TYPE_X, /* 082F */ - JOINING_TYPE_X, /* 0830 */ - JOINING_TYPE_X, /* 0831 */ - JOINING_TYPE_X, /* 0832 */ - JOINING_TYPE_X, /* 0833 */ - JOINING_TYPE_X, /* 0834 */ - JOINING_TYPE_X, /* 0835 */ - JOINING_TYPE_X, /* 0836 */ - JOINING_TYPE_X, /* 0837 */ - JOINING_TYPE_X, /* 0838 */ - JOINING_TYPE_X, /* 0839 */ - JOINING_TYPE_X, /* 083A */ - JOINING_TYPE_X, /* 083B */ - JOINING_TYPE_X, /* 083C */ - JOINING_TYPE_X, /* 083D */ - JOINING_TYPE_X, /* 083E */ - JOINING_TYPE_X, /* 083F */ - JOINING_TYPE_R, /* 0840; MANDAIC HALQA; R; No_Joining_Group */ - JOINING_TYPE_D, /* 0841; MANDAIC AB; D; No_Joining_Group */ - JOINING_TYPE_D, /* 0842; MANDAIC AG; D; No_Joining_Group */ - JOINING_TYPE_D, /* 0843; MANDAIC AD; D; No_Joining_Group */ - JOINING_TYPE_D, /* 0844; MANDAIC AH; D; No_Joining_Group */ - JOINING_TYPE_D, /* 0845; MANDAIC USHENNA; D; No_Joining_Group */ - JOINING_TYPE_R, /* 0846; MANDAIC AZ; R; No_Joining_Group */ - JOINING_TYPE_D, /* 0847; MANDAIC IT; D; No_Joining_Group */ - JOINING_TYPE_D, /* 0848; MANDAIC ATT; D; No_Joining_Group */ - JOINING_TYPE_R, /* 0849; MANDAIC AKSA; R; No_Joining_Group */ - JOINING_TYPE_D, /* 084A; MANDAIC AK; D; No_Joining_Group */ - JOINING_TYPE_D, /* 084B; MANDAIC AL; D; No_Joining_Group */ - JOINING_TYPE_D, /* 084C; MANDAIC AM; D; No_Joining_Group */ - JOINING_TYPE_D, /* 084D; MANDAIC AN; D; No_Joining_Group */ - JOINING_TYPE_D, /* 084E; MANDAIC AS; D; No_Joining_Group */ - JOINING_TYPE_R, /* 084F; MANDAIC IN; R; No_Joining_Group */ - JOINING_TYPE_D, /* 0850; MANDAIC AP; D; No_Joining_Group */ - JOINING_TYPE_D, /* 0851; MANDAIC ASZ; D; No_Joining_Group */ - JOINING_TYPE_D, /* 0852; MANDAIC AQ; D; No_Joining_Group */ - JOINING_TYPE_D, /* 0853; MANDAIC AR; D; No_Joining_Group */ - JOINING_TYPE_R, /* 0854; MANDAIC ASH; R; No_Joining_Group */ - JOINING_TYPE_D, /* 0855; MANDAIC AT; D; No_Joining_Group */ - JOINING_TYPE_U, /* 0856; MANDAIC DUSHENNA; U; No_Joining_Group */ - JOINING_TYPE_U, /* 0857; MANDAIC KAD; U; No_Joining_Group */ - JOINING_TYPE_U, /* 0858; MANDAIC AIN; U; No_Joining_Group */ - - /* Arabic Extended-A Characters */ - - JOINING_TYPE_X, /* 0859 */ - JOINING_TYPE_X, /* 085A */ - JOINING_TYPE_X, /* 085B */ - JOINING_TYPE_X, /* 085C */ - JOINING_TYPE_X, /* 085D */ - JOINING_TYPE_X, /* 085E */ - JOINING_TYPE_X, /* 085F */ - JOINING_TYPE_X, /* 0860 */ - JOINING_TYPE_X, /* 0861 */ - JOINING_TYPE_X, /* 0862 */ - JOINING_TYPE_X, /* 0863 */ - JOINING_TYPE_X, /* 0864 */ - JOINING_TYPE_X, /* 0865 */ - JOINING_TYPE_X, /* 0866 */ - JOINING_TYPE_X, /* 0867 */ - JOINING_TYPE_X, /* 0868 */ - JOINING_TYPE_X, /* 0869 */ - JOINING_TYPE_X, /* 086A */ - JOINING_TYPE_X, /* 086B */ - JOINING_TYPE_X, /* 086C */ - JOINING_TYPE_X, /* 086D */ - JOINING_TYPE_X, /* 086E */ - JOINING_TYPE_X, /* 086F */ - JOINING_TYPE_X, /* 0870 */ - JOINING_TYPE_X, /* 0871 */ - JOINING_TYPE_X, /* 0872 */ - JOINING_TYPE_X, /* 0873 */ - JOINING_TYPE_X, /* 0874 */ - JOINING_TYPE_X, /* 0875 */ - JOINING_TYPE_X, /* 0876 */ - JOINING_TYPE_X, /* 0877 */ - JOINING_TYPE_X, /* 0878 */ - JOINING_TYPE_X, /* 0879 */ - JOINING_TYPE_X, /* 087A */ - JOINING_TYPE_X, /* 087B */ - JOINING_TYPE_X, /* 087C */ - JOINING_TYPE_X, /* 087D */ - JOINING_TYPE_X, /* 087E */ - JOINING_TYPE_X, /* 087F */ - JOINING_TYPE_X, /* 0880 */ - JOINING_TYPE_X, /* 0881 */ - JOINING_TYPE_X, /* 0882 */ - JOINING_TYPE_X, /* 0883 */ - JOINING_TYPE_X, /* 0884 */ - JOINING_TYPE_X, /* 0885 */ - JOINING_TYPE_X, /* 0886 */ - JOINING_TYPE_X, /* 0887 */ - JOINING_TYPE_X, /* 0888 */ - JOINING_TYPE_X, /* 0889 */ - JOINING_TYPE_X, /* 088A */ - JOINING_TYPE_X, /* 088B */ - JOINING_TYPE_X, /* 088C */ - JOINING_TYPE_X, /* 088D */ - JOINING_TYPE_X, /* 088E */ - JOINING_TYPE_X, /* 088F */ - JOINING_TYPE_X, /* 0890 */ - JOINING_TYPE_X, /* 0891 */ - JOINING_TYPE_X, /* 0892 */ - JOINING_TYPE_X, /* 0893 */ - JOINING_TYPE_X, /* 0894 */ - JOINING_TYPE_X, /* 0895 */ - JOINING_TYPE_X, /* 0896 */ - JOINING_TYPE_X, /* 0897 */ - JOINING_TYPE_X, /* 0898 */ - JOINING_TYPE_X, /* 0899 */ - JOINING_TYPE_X, /* 089A */ - JOINING_TYPE_X, /* 089B */ - JOINING_TYPE_X, /* 089C */ - JOINING_TYPE_X, /* 089D */ - JOINING_TYPE_X, /* 089E */ - JOINING_TYPE_X, /* 089F */ - JOINING_TYPE_D, /* 08A0; DOTLESS BEH WITH V BELOW; D; BEH */ - JOINING_TYPE_X, /* 08A1 */ - JOINING_TYPE_D, /* 08A2; HAH WITH DOT BELOW AND 2 DOTS ABOVE; D; HAH */ - JOINING_TYPE_D, /* 08A3; TAH WITH 2 DOTS ABOVE; D; TAH */ - JOINING_TYPE_D, /* 08A4; DOTLESS FEH WITH DOT BELOW AND 3 DOTS ABOVE; D; FEH */ - JOINING_TYPE_D, /* 08A5; QAF WITH DOT BELOW; D; QAF */ - JOINING_TYPE_D, /* 08A6; LAM WITH DOUBLE BAR; D; LAM */ - JOINING_TYPE_D, /* 08A7; MEEM WITH 3 DOTS ABOVE; D; MEEM */ - JOINING_TYPE_D, /* 08A8; YEH WITH HAMZA ABOVE; D; YEH */ - JOINING_TYPE_D, /* 08A9; YEH WITH DOT ABOVE; D; YEH */ - JOINING_TYPE_R, /* 08AA; REH WITH LOOP; R; REH */ - JOINING_TYPE_R, /* 08AB; WAW WITH DOT WITHIN; R; WAW */ - JOINING_TYPE_R, /* 08AC; ROHINGYA YEH; R; ROHINGYA YEH */ +#define joining_offset_0x0600u 0 -}; + /* Arabic */ + + /* 0600 */ U,U,U,U,U,U,X,X,U,X,X,U,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X, + /* 0620 */ D,U,R,R,R,R,D,R,D,R,D,D,D,D,D,R,R,R,R,D,D,D,D,D,D,D,D,D,D,D,D,D, + /* 0640 */ C,D,D,D,D,D,D,D,R,D,D,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X, + /* 0660 */ X,X,X,X,X,X,X,X,X,X,X,X,X,X,D,D,X,R,R,R,U,R,R,R,D,D,D,D,D,D,D,D, + /* 0680 */ D,D,D,D,D,D,D,D,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,D,D,D,D,D,D, + /* 06A0 */ D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D, + /* 06C0 */ R,D,D,R,R,R,R,R,R,R,R,R,D,R,D,R,D,D,R,R,X,R,X,X,X,X,X,X,X,U,X,X, + /* 06E0 */ X,X,X,X,X,X,X,X,X,X,X,X,X,X,R,R,X,X,X,X,X,X,X,X,X,X,D,D,D,X,X,D, + + /* Syriac */ + + /* 0700 */ X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,A,X,D,D,D,DR,DR,R,R,R,D,D,D,D,R,D, + /* 0720 */ D,D,D,D,D,D,D,D,R,D,DR,D,R,D,D,DR,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X, + /* 0740 */ X,X,X,X,X,X,X,X,X,X,X,X,X,R,D,D, + + /* Arabic Supplement */ + + /* 0740 */ D,D,D,D,D,D,D,D,D,R,R,R,D,D,D,D, + /* 0760 */ D,D,D,D,D,D,D,D,D,D,D,R,R,D,D,D,D,R,D,R,R,D,D,D,R,R,D,D,D,D,D,D, + + /* FILLER */ + + /* 0780 */ X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X, + /* 07A0 */ X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X, + + /* NKo */ + + /* 07C0 */ X,X,X,X,X,X,X,X,X,X,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D, + /* 07E0 */ D,D,D,D,D,D,D,D,D,D,D,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,C,X,X,X,X,X, + + /* FILLER */ + + /* 0800 */ X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X, + /* 0820 */ X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X, + + /* Mandaic */ + + /* 0840 */ R,D,D,D,D,D,R,D,D,R,D,D,D,D,D,R,D,D,D,D,R,D,U,U,U,X,X,X,X,X,X,X, + /* 0860 */ X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X, + /* 0880 */ X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X, + + /* Arabic Extended-A */ + + /* 08A0 */ D,D,D,D,D,D,D,D,D,D,R,R,R,U,R,D,D,R,R, + +#define joining_offset_0x1806u 691 + + /* Mongolian */ + + /* 1800 */ U,D,X,X,C,X,X,X,U,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X, + /* 1820 */ D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D, + /* 1840 */ D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D, + /* 1860 */ D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,X,X,X,X,X,X,X,X, + /* 1880 */ U,U,U,U,U,U,U,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D, + /* 18A0 */ D,D,D,D,D,D,D,D,D,X,D, + +#define joining_offset_0x200cu 856 + + /* General Punctuation */ + + /* 2000 */ U,C, + +#define joining_offset_0x2066u 858 + + /* General Punctuation */ + + /* 2060 */ U,U,U,U, + +#define joining_offset_0xa840u 862 + + /* Phags-pa */ + + /* A840 */ D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D, + /* A860 */ D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,L,U, + +#define joining_offset_0x10ac0u 914 + + /* Manichaean */ + + /* 10AC0 */ D,D,D,D,D,R,U,R,U,R,R,U,U,L,R,R,R,R,R,D,D,D,D,L,D,D,D,D,D,R,D,D, + /* 10AE0 */ D,R,U,U,R,X,X,X,X,X,X,D,D,D,D,R, + +#define joining_offset_0x10b80u 962 + + /* Psalter Pahlavi */ + + /* 10B80 */ D,R,D,R,R,R,D,D,D,R,D,D,R,D,R,R,D,R,X,X,X,X,X,X,X,X,X,X,X,X,X,X, + /* 10BA0 */ X,X,X,X,X,X,X,X,X,R,R,R,R,D,D,U, + +}; /* Table items: 1010; occupancy: 57% */ + + +static unsigned int +joining_type (hb_codepoint_t u) +{ + switch (u >> 12) + { + case 0x0u: + if (hb_in_range (u, 0x0600u, 0x08B2u)) return joining_table[u - 0x0600u + joining_offset_0x0600u]; + break; + + case 0x1u: + if (hb_in_range (u, 0x1806u, 0x18AAu)) return joining_table[u - 0x1806u + joining_offset_0x1806u]; + break; + + case 0x2u: + if (hb_in_range (u, 0x200Cu, 0x200Du)) return joining_table[u - 0x200Cu + joining_offset_0x200cu]; + if (hb_in_range (u, 0x2066u, 0x2069u)) return joining_table[u - 0x2066u + joining_offset_0x2066u]; + break; + + case 0xAu: + if (hb_in_range (u, 0xA840u, 0xA873u)) return joining_table[u - 0xA840u + joining_offset_0xa840u]; + break; + + case 0x10u: + if (hb_in_range (u, 0x10AC0u, 0x10AEFu)) return joining_table[u - 0x10AC0u + joining_offset_0x10ac0u]; + if (hb_in_range (u, 0x10B80u, 0x10BAFu)) return joining_table[u - 0x10B80u + joining_offset_0x10b80u]; + break; + + default: + break; + } + return X; +} -#define JOINING_TABLE_FIRST 0x0600 -#define JOINING_TABLE_LAST 0x08AC +#undef X +#undef R +#undef U +#undef A +#undef DR +#undef L +#undef C +#undef D static const uint16_t shaping_table[][4] = { - {0x0000, 0x0000, 0x0000, 0xFE80}, /* U+0621 ARABIC LETTER HAMZA ISOLATED FORM */ - {0x0000, 0x0000, 0xFE82, 0xFE81}, /* U+0622 ARABIC LETTER ALEF WITH MADDA ABOVE */ - {0x0000, 0x0000, 0xFE84, 0xFE83}, /* U+0623 ARABIC LETTER ALEF WITH HAMZA ABOVE */ - {0x0000, 0x0000, 0xFE86, 0xFE85}, /* U+0624 ARABIC LETTER WAW WITH HAMZA ABOVE */ - {0x0000, 0x0000, 0xFE88, 0xFE87}, /* U+0625 ARABIC LETTER ALEF WITH HAMZA BELOW */ - {0xFE8B, 0xFE8C, 0xFE8A, 0xFE89}, /* U+0626 ARABIC LETTER YEH WITH HAMZA ABOVE */ - {0x0000, 0x0000, 0xFE8E, 0xFE8D}, /* U+0627 ARABIC LETTER ALEF */ - {0xFE91, 0xFE92, 0xFE90, 0xFE8F}, /* U+0628 ARABIC LETTER BEH */ - {0x0000, 0x0000, 0xFE94, 0xFE93}, /* U+0629 ARABIC LETTER TEH MARBUTA */ - {0xFE97, 0xFE98, 0xFE96, 0xFE95}, /* U+062A ARABIC LETTER TEH */ - {0xFE9B, 0xFE9C, 0xFE9A, 0xFE99}, /* U+062B ARABIC LETTER THEH */ - {0xFE9F, 0xFEA0, 0xFE9E, 0xFE9D}, /* U+062C ARABIC LETTER JEEM */ - {0xFEA3, 0xFEA4, 0xFEA2, 0xFEA1}, /* U+062D ARABIC LETTER HAH */ - {0xFEA7, 0xFEA8, 0xFEA6, 0xFEA5}, /* U+062E ARABIC LETTER KHAH */ - {0x0000, 0x0000, 0xFEAA, 0xFEA9}, /* U+062F ARABIC LETTER DAL */ - {0x0000, 0x0000, 0xFEAC, 0xFEAB}, /* U+0630 ARABIC LETTER THAL */ - {0x0000, 0x0000, 0xFEAE, 0xFEAD}, /* U+0631 ARABIC LETTER REH */ - {0x0000, 0x0000, 0xFEB0, 0xFEAF}, /* U+0632 ARABIC LETTER ZAIN */ - {0xFEB3, 0xFEB4, 0xFEB2, 0xFEB1}, /* U+0633 ARABIC LETTER SEEN */ - {0xFEB7, 0xFEB8, 0xFEB6, 0xFEB5}, /* U+0634 ARABIC LETTER SHEEN */ - {0xFEBB, 0xFEBC, 0xFEBA, 0xFEB9}, /* U+0635 ARABIC LETTER SAD */ - {0xFEBF, 0xFEC0, 0xFEBE, 0xFEBD}, /* U+0636 ARABIC LETTER DAD */ - {0xFEC3, 0xFEC4, 0xFEC2, 0xFEC1}, /* U+0637 ARABIC LETTER TAH */ - {0xFEC7, 0xFEC8, 0xFEC6, 0xFEC5}, /* U+0638 ARABIC LETTER ZAH */ - {0xFECB, 0xFECC, 0xFECA, 0xFEC9}, /* U+0639 ARABIC LETTER AIN */ - {0xFECF, 0xFED0, 0xFECE, 0xFECD}, /* U+063A ARABIC LETTER GHAIN */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+063B */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+063C */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+063D */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+063E */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+063F */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+0640 */ - {0xFED3, 0xFED4, 0xFED2, 0xFED1}, /* U+0641 ARABIC LETTER FEH */ - {0xFED7, 0xFED8, 0xFED6, 0xFED5}, /* U+0642 ARABIC LETTER QAF */ - {0xFEDB, 0xFEDC, 0xFEDA, 0xFED9}, /* U+0643 ARABIC LETTER KAF */ - {0xFEDF, 0xFEE0, 0xFEDE, 0xFEDD}, /* U+0644 ARABIC LETTER LAM */ - {0xFEE3, 0xFEE4, 0xFEE2, 0xFEE1}, /* U+0645 ARABIC LETTER MEEM */ - {0xFEE7, 0xFEE8, 0xFEE6, 0xFEE5}, /* U+0646 ARABIC LETTER NOON */ - {0xFEEB, 0xFEEC, 0xFEEA, 0xFEE9}, /* U+0647 ARABIC LETTER HEH */ - {0x0000, 0x0000, 0xFEEE, 0xFEED}, /* U+0648 ARABIC LETTER WAW */ - {0xFBE8, 0xFBE9, 0xFEF0, 0xFEEF}, /* U+0649 ARABIC LETTER */ - {0xFEF3, 0xFEF4, 0xFEF2, 0xFEF1}, /* U+064A ARABIC LETTER YEH */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+064B */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+064C */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+064D */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+064E */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+064F */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+0650 */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+0651 */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+0652 */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+0653 */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+0654 */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+0655 */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+0656 */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+0657 */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+0658 */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+0659 */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+065A */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+065B */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+065C */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+065D */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+065E */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+065F */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+0660 */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+0661 */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+0662 */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+0663 */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+0664 */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+0665 */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+0666 */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+0667 */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+0668 */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+0669 */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+066A */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+066B */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+066C */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+066D */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+066E */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+066F */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+0670 */ - {0x0000, 0x0000, 0xFB51, 0xFB50}, /* U+0671 ARABIC LETTER ALEF WASLA */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+0672 */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+0673 */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+0674 */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+0675 */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+0676 */ - {0x0000, 0x0000, 0x0000, 0xFBDD}, /* U+0677 ARABIC LETTER U WITH HAMZA ABOVE ISOLATED FORM */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+0678 */ - {0xFB68, 0xFB69, 0xFB67, 0xFB66}, /* U+0679 ARABIC LETTER TTEH */ - {0xFB60, 0xFB61, 0xFB5F, 0xFB5E}, /* U+067A ARABIC LETTER TTEHEH */ - {0xFB54, 0xFB55, 0xFB53, 0xFB52}, /* U+067B ARABIC LETTER BEEH */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+067C */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+067D */ - {0xFB58, 0xFB59, 0xFB57, 0xFB56}, /* U+067E ARABIC LETTER PEH */ - {0xFB64, 0xFB65, 0xFB63, 0xFB62}, /* U+067F ARABIC LETTER TEHEH */ - {0xFB5C, 0xFB5D, 0xFB5B, 0xFB5A}, /* U+0680 ARABIC LETTER BEHEH */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+0681 */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+0682 */ - {0xFB78, 0xFB79, 0xFB77, 0xFB76}, /* U+0683 ARABIC LETTER NYEH */ - {0xFB74, 0xFB75, 0xFB73, 0xFB72}, /* U+0684 ARABIC LETTER DYEH */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+0685 */ - {0xFB7C, 0xFB7D, 0xFB7B, 0xFB7A}, /* U+0686 ARABIC LETTER TCHEH */ - {0xFB80, 0xFB81, 0xFB7F, 0xFB7E}, /* U+0687 ARABIC LETTER TCHEHEH */ - {0x0000, 0x0000, 0xFB89, 0xFB88}, /* U+0688 ARABIC LETTER DDAL */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+0689 */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+068A */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+068B */ - {0x0000, 0x0000, 0xFB85, 0xFB84}, /* U+068C ARABIC LETTER DAHAL */ - {0x0000, 0x0000, 0xFB83, 0xFB82}, /* U+068D ARABIC LETTER DDAHAL */ - {0x0000, 0x0000, 0xFB87, 0xFB86}, /* U+068E ARABIC LETTER DUL */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+068F */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+0690 */ - {0x0000, 0x0000, 0xFB8D, 0xFB8C}, /* U+0691 ARABIC LETTER RREH */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+0692 */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+0693 */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+0694 */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+0695 */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+0696 */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+0697 */ - {0x0000, 0x0000, 0xFB8B, 0xFB8A}, /* U+0698 ARABIC LETTER JEH */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+0699 */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+069A */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+069B */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+069C */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+069D */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+069E */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+069F */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+06A0 */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+06A1 */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+06A2 */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+06A3 */ - {0xFB6C, 0xFB6D, 0xFB6B, 0xFB6A}, /* U+06A4 ARABIC LETTER VEH */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+06A5 */ - {0xFB70, 0xFB71, 0xFB6F, 0xFB6E}, /* U+06A6 ARABIC LETTER PEHEH */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+06A7 */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+06A8 */ - {0xFB90, 0xFB91, 0xFB8F, 0xFB8E}, /* U+06A9 ARABIC LETTER KEHEH */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+06AA */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+06AB */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+06AC */ - {0xFBD5, 0xFBD6, 0xFBD4, 0xFBD3}, /* U+06AD ARABIC LETTER NG */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+06AE */ - {0xFB94, 0xFB95, 0xFB93, 0xFB92}, /* U+06AF ARABIC LETTER GAF */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+06B0 */ - {0xFB9C, 0xFB9D, 0xFB9B, 0xFB9A}, /* U+06B1 ARABIC LETTER NGOEH */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+06B2 */ - {0xFB98, 0xFB99, 0xFB97, 0xFB96}, /* U+06B3 ARABIC LETTER GUEH */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+06B4 */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+06B5 */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+06B6 */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+06B7 */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+06B8 */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+06B9 */ - {0x0000, 0x0000, 0xFB9F, 0xFB9E}, /* U+06BA ARABIC LETTER NOON GHUNNA */ - {0xFBA2, 0xFBA3, 0xFBA1, 0xFBA0}, /* U+06BB ARABIC LETTER RNOON */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+06BC */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+06BD */ - {0xFBAC, 0xFBAD, 0xFBAB, 0xFBAA}, /* U+06BE ARABIC LETTER HEH DOACHASHMEE */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+06BF */ - {0x0000, 0x0000, 0xFBA5, 0xFBA4}, /* U+06C0 ARABIC LETTER HEH WITH YEH ABOVE */ - {0xFBA8, 0xFBA9, 0xFBA7, 0xFBA6}, /* U+06C1 ARABIC LETTER HEH GOAL */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+06C2 */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+06C3 */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+06C4 */ - {0x0000, 0x0000, 0xFBE1, 0xFBE0}, /* U+06C5 ARABIC LETTER KIRGHIZ OE */ - {0x0000, 0x0000, 0xFBDA, 0xFBD9}, /* U+06C6 ARABIC LETTER OE */ - {0x0000, 0x0000, 0xFBD8, 0xFBD7}, /* U+06C7 ARABIC LETTER U */ - {0x0000, 0x0000, 0xFBDC, 0xFBDB}, /* U+06C8 ARABIC LETTER YU */ - {0x0000, 0x0000, 0xFBE3, 0xFBE2}, /* U+06C9 ARABIC LETTER KIRGHIZ YU */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+06CA */ - {0x0000, 0x0000, 0xFBDF, 0xFBDE}, /* U+06CB ARABIC LETTER VE */ - {0xFBFE, 0xFBFF, 0xFBFD, 0xFBFC}, /* U+06CC ARABIC LETTER FARSI YEH */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+06CD */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+06CE */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+06CF */ - {0xFBE6, 0xFBE7, 0xFBE5, 0xFBE4}, /* U+06D0 ARABIC LETTER E */ - {0x0000, 0x0000, 0x0000, 0x0000}, /* U+06D1 */ - {0x0000, 0x0000, 0xFBAF, 0xFBAE}, /* U+06D2 ARABIC LETTER YEH BARREE */ - {0x0000, 0x0000, 0xFBB1, 0xFBB0}, /* U+06D3 ARABIC LETTER YEH BARREE WITH HAMZA ABOVE */ + {0x0000u, 0x0000u, 0x0000u, 0xFE80u}, /* U+0621 ARABIC LETTER HAMZA ISOLATED FORM */ + {0x0000u, 0x0000u, 0xFE82u, 0xFE81u}, /* U+0622 ARABIC LETTER ALEF WITH MADDA ABOVE */ + {0x0000u, 0x0000u, 0xFE84u, 0xFE83u}, /* U+0623 ARABIC LETTER ALEF WITH HAMZA ABOVE */ + {0x0000u, 0x0000u, 0xFE86u, 0xFE85u}, /* U+0624 ARABIC LETTER WAW WITH HAMZA ABOVE */ + {0x0000u, 0x0000u, 0xFE88u, 0xFE87u}, /* U+0625 ARABIC LETTER ALEF WITH HAMZA BELOW */ + {0xFE8Bu, 0xFE8Cu, 0xFE8Au, 0xFE89u}, /* U+0626 ARABIC LETTER YEH WITH HAMZA ABOVE */ + {0x0000u, 0x0000u, 0xFE8Eu, 0xFE8Du}, /* U+0627 ARABIC LETTER ALEF */ + {0xFE91u, 0xFE92u, 0xFE90u, 0xFE8Fu}, /* U+0628 ARABIC LETTER BEH */ + {0x0000u, 0x0000u, 0xFE94u, 0xFE93u}, /* U+0629 ARABIC LETTER TEH MARBUTA */ + {0xFE97u, 0xFE98u, 0xFE96u, 0xFE95u}, /* U+062A ARABIC LETTER TEH */ + {0xFE9Bu, 0xFE9Cu, 0xFE9Au, 0xFE99u}, /* U+062B ARABIC LETTER THEH */ + {0xFE9Fu, 0xFEA0u, 0xFE9Eu, 0xFE9Du}, /* U+062C ARABIC LETTER JEEM */ + {0xFEA3u, 0xFEA4u, 0xFEA2u, 0xFEA1u}, /* U+062D ARABIC LETTER HAH */ + {0xFEA7u, 0xFEA8u, 0xFEA6u, 0xFEA5u}, /* U+062E ARABIC LETTER KHAH */ + {0x0000u, 0x0000u, 0xFEAAu, 0xFEA9u}, /* U+062F ARABIC LETTER DAL */ + {0x0000u, 0x0000u, 0xFEACu, 0xFEABu}, /* U+0630 ARABIC LETTER THAL */ + {0x0000u, 0x0000u, 0xFEAEu, 0xFEADu}, /* U+0631 ARABIC LETTER REH */ + {0x0000u, 0x0000u, 0xFEB0u, 0xFEAFu}, /* U+0632 ARABIC LETTER ZAIN */ + {0xFEB3u, 0xFEB4u, 0xFEB2u, 0xFEB1u}, /* U+0633 ARABIC LETTER SEEN */ + {0xFEB7u, 0xFEB8u, 0xFEB6u, 0xFEB5u}, /* U+0634 ARABIC LETTER SHEEN */ + {0xFEBBu, 0xFEBCu, 0xFEBAu, 0xFEB9u}, /* U+0635 ARABIC LETTER SAD */ + {0xFEBFu, 0xFEC0u, 0xFEBEu, 0xFEBDu}, /* U+0636 ARABIC LETTER DAD */ + {0xFEC3u, 0xFEC4u, 0xFEC2u, 0xFEC1u}, /* U+0637 ARABIC LETTER TAH */ + {0xFEC7u, 0xFEC8u, 0xFEC6u, 0xFEC5u}, /* U+0638 ARABIC LETTER ZAH */ + {0xFECBu, 0xFECCu, 0xFECAu, 0xFEC9u}, /* U+0639 ARABIC LETTER AIN */ + {0xFECFu, 0xFED0u, 0xFECEu, 0xFECDu}, /* U+063A ARABIC LETTER GHAIN */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+063B */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+063C */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+063D */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+063E */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+063F */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+0640 */ + {0xFED3u, 0xFED4u, 0xFED2u, 0xFED1u}, /* U+0641 ARABIC LETTER FEH */ + {0xFED7u, 0xFED8u, 0xFED6u, 0xFED5u}, /* U+0642 ARABIC LETTER QAF */ + {0xFEDBu, 0xFEDCu, 0xFEDAu, 0xFED9u}, /* U+0643 ARABIC LETTER KAF */ + {0xFEDFu, 0xFEE0u, 0xFEDEu, 0xFEDDu}, /* U+0644 ARABIC LETTER LAM */ + {0xFEE3u, 0xFEE4u, 0xFEE2u, 0xFEE1u}, /* U+0645 ARABIC LETTER MEEM */ + {0xFEE7u, 0xFEE8u, 0xFEE6u, 0xFEE5u}, /* U+0646 ARABIC LETTER NOON */ + {0xFEEBu, 0xFEECu, 0xFEEAu, 0xFEE9u}, /* U+0647 ARABIC LETTER HEH */ + {0x0000u, 0x0000u, 0xFEEEu, 0xFEEDu}, /* U+0648 ARABIC LETTER WAW */ + {0xFBE8u, 0xFBE9u, 0xFEF0u, 0xFEEFu}, /* U+0649 ARABIC LETTER */ + {0xFEF3u, 0xFEF4u, 0xFEF2u, 0xFEF1u}, /* U+064A ARABIC LETTER YEH */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+064B */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+064C */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+064D */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+064E */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+064F */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+0650 */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+0651 */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+0652 */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+0653 */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+0654 */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+0655 */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+0656 */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+0657 */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+0658 */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+0659 */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+065A */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+065B */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+065C */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+065D */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+065E */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+065F */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+0660 */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+0661 */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+0662 */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+0663 */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+0664 */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+0665 */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+0666 */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+0667 */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+0668 */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+0669 */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+066A */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+066B */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+066C */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+066D */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+066E */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+066F */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+0670 */ + {0x0000u, 0x0000u, 0xFB51u, 0xFB50u}, /* U+0671 ARABIC LETTER ALEF WASLA */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+0672 */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+0673 */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+0674 */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+0675 */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+0676 */ + {0x0000u, 0x0000u, 0x0000u, 0xFBDDu}, /* U+0677 ARABIC LETTER U WITH HAMZA ABOVE ISOLATED FORM */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+0678 */ + {0xFB68u, 0xFB69u, 0xFB67u, 0xFB66u}, /* U+0679 ARABIC LETTER TTEH */ + {0xFB60u, 0xFB61u, 0xFB5Fu, 0xFB5Eu}, /* U+067A ARABIC LETTER TTEHEH */ + {0xFB54u, 0xFB55u, 0xFB53u, 0xFB52u}, /* U+067B ARABIC LETTER BEEH */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+067C */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+067D */ + {0xFB58u, 0xFB59u, 0xFB57u, 0xFB56u}, /* U+067E ARABIC LETTER PEH */ + {0xFB64u, 0xFB65u, 0xFB63u, 0xFB62u}, /* U+067F ARABIC LETTER TEHEH */ + {0xFB5Cu, 0xFB5Du, 0xFB5Bu, 0xFB5Au}, /* U+0680 ARABIC LETTER BEHEH */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+0681 */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+0682 */ + {0xFB78u, 0xFB79u, 0xFB77u, 0xFB76u}, /* U+0683 ARABIC LETTER NYEH */ + {0xFB74u, 0xFB75u, 0xFB73u, 0xFB72u}, /* U+0684 ARABIC LETTER DYEH */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+0685 */ + {0xFB7Cu, 0xFB7Du, 0xFB7Bu, 0xFB7Au}, /* U+0686 ARABIC LETTER TCHEH */ + {0xFB80u, 0xFB81u, 0xFB7Fu, 0xFB7Eu}, /* U+0687 ARABIC LETTER TCHEHEH */ + {0x0000u, 0x0000u, 0xFB89u, 0xFB88u}, /* U+0688 ARABIC LETTER DDAL */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+0689 */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+068A */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+068B */ + {0x0000u, 0x0000u, 0xFB85u, 0xFB84u}, /* U+068C ARABIC LETTER DAHAL */ + {0x0000u, 0x0000u, 0xFB83u, 0xFB82u}, /* U+068D ARABIC LETTER DDAHAL */ + {0x0000u, 0x0000u, 0xFB87u, 0xFB86u}, /* U+068E ARABIC LETTER DUL */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+068F */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+0690 */ + {0x0000u, 0x0000u, 0xFB8Du, 0xFB8Cu}, /* U+0691 ARABIC LETTER RREH */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+0692 */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+0693 */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+0694 */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+0695 */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+0696 */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+0697 */ + {0x0000u, 0x0000u, 0xFB8Bu, 0xFB8Au}, /* U+0698 ARABIC LETTER JEH */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+0699 */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+069A */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+069B */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+069C */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+069D */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+069E */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+069F */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+06A0 */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+06A1 */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+06A2 */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+06A3 */ + {0xFB6Cu, 0xFB6Du, 0xFB6Bu, 0xFB6Au}, /* U+06A4 ARABIC LETTER VEH */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+06A5 */ + {0xFB70u, 0xFB71u, 0xFB6Fu, 0xFB6Eu}, /* U+06A6 ARABIC LETTER PEHEH */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+06A7 */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+06A8 */ + {0xFB90u, 0xFB91u, 0xFB8Fu, 0xFB8Eu}, /* U+06A9 ARABIC LETTER KEHEH */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+06AA */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+06AB */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+06AC */ + {0xFBD5u, 0xFBD6u, 0xFBD4u, 0xFBD3u}, /* U+06AD ARABIC LETTER NG */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+06AE */ + {0xFB94u, 0xFB95u, 0xFB93u, 0xFB92u}, /* U+06AF ARABIC LETTER GAF */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+06B0 */ + {0xFB9Cu, 0xFB9Du, 0xFB9Bu, 0xFB9Au}, /* U+06B1 ARABIC LETTER NGOEH */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+06B2 */ + {0xFB98u, 0xFB99u, 0xFB97u, 0xFB96u}, /* U+06B3 ARABIC LETTER GUEH */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+06B4 */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+06B5 */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+06B6 */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+06B7 */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+06B8 */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+06B9 */ + {0x0000u, 0x0000u, 0xFB9Fu, 0xFB9Eu}, /* U+06BA ARABIC LETTER NOON GHUNNA */ + {0xFBA2u, 0xFBA3u, 0xFBA1u, 0xFBA0u}, /* U+06BB ARABIC LETTER RNOON */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+06BC */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+06BD */ + {0xFBACu, 0xFBADu, 0xFBABu, 0xFBAAu}, /* U+06BE ARABIC LETTER HEH DOACHASHMEE */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+06BF */ + {0x0000u, 0x0000u, 0xFBA5u, 0xFBA4u}, /* U+06C0 ARABIC LETTER HEH WITH YEH ABOVE */ + {0xFBA8u, 0xFBA9u, 0xFBA7u, 0xFBA6u}, /* U+06C1 ARABIC LETTER HEH GOAL */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+06C2 */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+06C3 */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+06C4 */ + {0x0000u, 0x0000u, 0xFBE1u, 0xFBE0u}, /* U+06C5 ARABIC LETTER KIRGHIZ OE */ + {0x0000u, 0x0000u, 0xFBDAu, 0xFBD9u}, /* U+06C6 ARABIC LETTER OE */ + {0x0000u, 0x0000u, 0xFBD8u, 0xFBD7u}, /* U+06C7 ARABIC LETTER U */ + {0x0000u, 0x0000u, 0xFBDCu, 0xFBDBu}, /* U+06C8 ARABIC LETTER YU */ + {0x0000u, 0x0000u, 0xFBE3u, 0xFBE2u}, /* U+06C9 ARABIC LETTER KIRGHIZ YU */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+06CA */ + {0x0000u, 0x0000u, 0xFBDFu, 0xFBDEu}, /* U+06CB ARABIC LETTER VE */ + {0xFBFEu, 0xFBFFu, 0xFBFDu, 0xFBFCu}, /* U+06CC ARABIC LETTER FARSI YEH */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+06CD */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+06CE */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+06CF */ + {0xFBE6u, 0xFBE7u, 0xFBE5u, 0xFBE4u}, /* U+06D0 ARABIC LETTER E */ + {0x0000u, 0x0000u, 0x0000u, 0x0000u}, /* U+06D1 */ + {0x0000u, 0x0000u, 0xFBAFu, 0xFBAEu}, /* U+06D2 ARABIC LETTER YEH BARREE */ + {0x0000u, 0x0000u, 0xFBB1u, 0xFBB0u}, /* U+06D3 ARABIC LETTER YEH BARREE WITH HAMZA ABOVE */ }; -#define SHAPING_TABLE_FIRST 0x0621 -#define SHAPING_TABLE_LAST 0x06D3 +#define SHAPING_TABLE_FIRST 0x0621u +#define SHAPING_TABLE_LAST 0x06D3u static const struct ligature_set_t { @@ -922,17 +363,17 @@ static const struct ligature_set_t { } ligatures[4]; } ligature_table[] = { - { 0xFEDF, { - { 0xFE88, 0xFEF9 }, /* ARABIC LIGATURE LAM WITH ALEF WITH HAMZA BELOW ISOLATED FORM */ - { 0xFE82, 0xFEF5 }, /* ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE ISOLATED FORM */ - { 0xFE8E, 0xFEFB }, /* ARABIC LIGATURE LAM WITH ALEF ISOLATED FORM */ - { 0xFE84, 0xFEF7 }, /* ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE ISOLATED FORM */ + { 0xFEDFu, { + { 0xFE88u, 0xFEF9u }, /* ARABIC LIGATURE LAM WITH ALEF WITH HAMZA BELOW ISOLATED FORM */ + { 0xFE82u, 0xFEF5u }, /* ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE ISOLATED FORM */ + { 0xFE8Eu, 0xFEFBu }, /* ARABIC LIGATURE LAM WITH ALEF ISOLATED FORM */ + { 0xFE84u, 0xFEF7u }, /* ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE ISOLATED FORM */ }}, - { 0xFEE0, { - { 0xFE88, 0xFEFA }, /* ARABIC LIGATURE LAM WITH ALEF WITH HAMZA BELOW FINAL FORM */ - { 0xFE82, 0xFEF6 }, /* ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE FINAL FORM */ - { 0xFE8E, 0xFEFC }, /* ARABIC LIGATURE LAM WITH ALEF FINAL FORM */ - { 0xFE84, 0xFEF8 }, /* ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE FINAL FORM */ + { 0xFEE0u, { + { 0xFE88u, 0xFEFAu }, /* ARABIC LIGATURE LAM WITH ALEF WITH HAMZA BELOW FINAL FORM */ + { 0xFE82u, 0xFEF6u }, /* ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE FINAL FORM */ + { 0xFE8Eu, 0xFEFCu }, /* ARABIC LIGATURE LAM WITH ALEF FINAL FORM */ + { 0xFE84u, 0xFEF8u }, /* ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE FINAL FORM */ }}, }; diff --git a/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-arabic.cc b/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-arabic.cc index ea6d85c1e6..9870ba3da0 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-arabic.cc +++ b/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-arabic.cc @@ -57,68 +57,41 @@ enum { static unsigned int get_joining_type (hb_codepoint_t u, hb_unicode_general_category_t gen_cat) { - if (likely (hb_in_range (u, JOINING_TABLE_FIRST, JOINING_TABLE_LAST))) { - unsigned int j_type = joining_table[u - JOINING_TABLE_FIRST]; - if (likely (j_type != JOINING_TYPE_X)) - return j_type; - } - - /* Mongolian joining data is not in ArabicJoining.txt yet. */ - if (unlikely (hb_in_range (u, 0x1800, 0x18AF))) - { - if (unlikely (hb_in_range (u, 0x1880, 0x1886))) - return JOINING_TYPE_U; - - /* All letters, SIBE SYLLABLE BOUNDARY MARKER, and NIRUGU are D */ - if ((FLAG(gen_cat) & (FLAG (HB_UNICODE_GENERAL_CATEGORY_OTHER_LETTER) | - FLAG (HB_UNICODE_GENERAL_CATEGORY_MODIFIER_LETTER))) - || u == 0x1807 || u == 0x180A) - return JOINING_TYPE_D; - } - - /* 'Phags-pa joining data is not in ArabicJoining.txt yet. */ - if (unlikely (hb_in_range (u, 0xA840, 0xA872))) - { - if (unlikely (u == 0xA872)) - return JOINING_TYPE_L; - - return JOINING_TYPE_D; - } - - if (unlikely (hb_in_range (u, 0x200C, 0x200D))) - { - return u == 0x200C ? JOINING_TYPE_U : JOINING_TYPE_C; - } - - return (FLAG(gen_cat) & (FLAG(HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK) | FLAG(HB_UNICODE_GENERAL_CATEGORY_ENCLOSING_MARK) | FLAG(HB_UNICODE_GENERAL_CATEGORY_FORMAT))) ? - JOINING_TYPE_T : JOINING_TYPE_U; + unsigned int j_type = joining_type(u); + if (likely (j_type != JOINING_TYPE_X)) + return j_type; + + return (FLAG(gen_cat) & + (FLAG(HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK) | + FLAG(HB_UNICODE_GENERAL_CATEGORY_ENCLOSING_MARK) | + FLAG(HB_UNICODE_GENERAL_CATEGORY_FORMAT)) + ) ? JOINING_TYPE_T : JOINING_TYPE_U; } +#define FEATURE_IS_SYRIAC(tag) hb_in_range ((unsigned char) (tag), '2', '3') + static const hb_tag_t arabic_features[] = { - HB_TAG('i','n','i','t'), - HB_TAG('m','e','d','i'), - HB_TAG('f','i','n','a'), HB_TAG('i','s','o','l'), - /* Syriac */ - HB_TAG('m','e','d','2'), + HB_TAG('f','i','n','a'), HB_TAG('f','i','n','2'), HB_TAG('f','i','n','3'), + HB_TAG('m','e','d','i'), + HB_TAG('m','e','d','2'), + HB_TAG('i','n','i','t'), HB_TAG_NONE }; /* Same order as the feature array */ enum { - INIT, - MEDI, - FINA, ISOL, - - /* Syriac */ - MED2, + FINA, FIN2, FIN3, + MEDI, + MED2, + INIT, NONE, @@ -171,14 +144,23 @@ collect_features_arabic (hb_ot_shape_planner_t *plan) { hb_ot_map_builder_t *map = &plan->map; - /* For Language forms (in ArabicOT speak), we do the iso/fina/medi/init together, - * then rlig and calt each in their own stage. This makes IranNastaliq's ALLAH - * ligature work correctly. It's unfortunate though... + /* We apply features according to the Arabic spec, with pauses + * in between most. * - * This also makes Arial Bold in Windows7 work. See: + * The pause between init/medi/... and rlig is required. See eg: * https://bugzilla.mozilla.org/show_bug.cgi?id=644184 * - * TODO: Add test cases for these two. + * The pauses between init/medi/... themselves are not necessarily + * needed as only one of those features is applied to any character. + * The only difference it makes is when fonts have contextual + * substitutions. We now follow the order of the spec, which makes + * for better experience if that's what Uniscribe is doing. + * + * At least for Arabic, looks like Uniscribe has a pause between + * rlig and calt. Otherwise the IranNastaliq's ALLAH ligature won't + * work. However, testing shows that rlig and calt are applied + * together for Mongolian in Uniscribe. As such, we only add a + * pause for Arabic, not other scripts. */ map->add_gsub_pause (nuke_joiners); @@ -189,16 +171,28 @@ collect_features_arabic (hb_ot_shape_planner_t *plan) map->add_gsub_pause (NULL); for (unsigned int i = 0; i < ARABIC_NUM_FEATURES; i++) - map->add_feature (arabic_features[i], 1, i < 4 ? F_HAS_FALLBACK : F_NONE); /* The first four features have fallback. */ - - map->add_gsub_pause (NULL); + { + bool has_fallback = plan->props.script == HB_SCRIPT_ARABIC && !FEATURE_IS_SYRIAC (arabic_features[i]); + map->add_feature (arabic_features[i], 1, has_fallback ? F_HAS_FALLBACK : F_NONE); + map->add_gsub_pause (NULL); + } map->add_feature (HB_TAG('r','l','i','g'), 1, F_GLOBAL|F_HAS_FALLBACK); - map->add_gsub_pause (arabic_fallback_shape); + if (plan->props.script == HB_SCRIPT_ARABIC) + map->add_gsub_pause (arabic_fallback_shape); map->add_global_bool_feature (HB_TAG('c','a','l','t')); map->add_gsub_pause (NULL); + /* The spec includes 'cswh'. Earlier versions of Windows + * used to enable this by default, but testing suggests + * that Windows 8 and later do not enable it by default, + * and spec now says 'Off by default'. + * We disabled this in ae23c24c32. + * Note that IranNastaliq uses this feature extensively + * to fixup broken glyph sequences. Oh well... + * Test case: U+0643,U+0640,U+0631. */ + //map->add_global_bool_feature (HB_TAG('c','s','w','h')); map->add_global_bool_feature (HB_TAG('m','s','e','t')); } @@ -228,8 +222,9 @@ data_create_arabic (const hb_ot_shape_plan_t *plan) arabic_plan->do_fallback = plan->props.script == HB_SCRIPT_ARABIC; for (unsigned int i = 0; i < ARABIC_NUM_FEATURES; i++) { arabic_plan->mask_array[i] = plan->map.get_1_mask (arabic_features[i]); - if (i < 4) - arabic_plan->do_fallback = arabic_plan->do_fallback && plan->map.needs_fallback (arabic_features[i]); + arabic_plan->do_fallback = arabic_plan->do_fallback && + !FEATURE_IS_SYRIAC (arabic_features[i]) && + plan->map.needs_fallback (arabic_features[i]); } return arabic_plan; @@ -249,10 +244,9 @@ static void arabic_joining (hb_buffer_t *buffer) { unsigned int count = buffer->len; + hb_glyph_info_t *info = buffer->info; unsigned int prev = (unsigned int) -1, state = 0; - HB_BUFFER_ALLOCATE_VAR (buffer, arabic_shaping_action); - /* Check pre-context */ if (!(buffer->flags & HB_BUFFER_FLAG_BOT)) for (unsigned int i = 0; i < buffer->context_len[0]; i++) @@ -269,20 +263,19 @@ arabic_joining (hb_buffer_t *buffer) for (unsigned int i = 0; i < count; i++) { - unsigned int this_type = get_joining_type (buffer->info[i].codepoint, _hb_glyph_info_get_general_category (&buffer->info[i])); + unsigned int this_type = get_joining_type (info[i].codepoint, _hb_glyph_info_get_general_category (&info[i])); if (unlikely (this_type == JOINING_TYPE_T)) { - buffer->info[i].arabic_shaping_action() = NONE; + info[i].arabic_shaping_action() = NONE; continue; } const arabic_state_table_entry *entry = &arabic_state_table[state][this_type]; if (entry->prev_action != NONE && prev != (unsigned int) -1) - for (; prev < i; prev++) - buffer->info[prev].arabic_shaping_action() = entry->prev_action; + info[prev].arabic_shaping_action() = entry->prev_action; - buffer->info[i].arabic_shaping_action() = entry->curr_action; + info[i].arabic_shaping_action() = entry->curr_action; prev = i; state = entry->next_state; @@ -298,12 +291,20 @@ arabic_joining (hb_buffer_t *buffer) const arabic_state_table_entry *entry = &arabic_state_table[state][this_type]; if (entry->prev_action != NONE && prev != (unsigned int) -1) - buffer->info[prev].arabic_shaping_action() = entry->prev_action; + info[prev].arabic_shaping_action() = entry->prev_action; break; } +} - - HB_BUFFER_DEALLOCATE_VAR (buffer, arabic_shaping_action); +static void +mongolian_variation_selectors (hb_buffer_t *buffer) +{ + /* Copy arabic_shaping_action() from base to Mongolian variation selectors. */ + unsigned int count = buffer->len; + hb_glyph_info_t *info = buffer->info; + for (unsigned int i = 1; i < count; i++) + if (unlikely (hb_in_range (info[i].codepoint, 0x180Bu, 0x180Du))) + info[i].arabic_shaping_action() = info[i - 1].arabic_shaping_action(); } static void @@ -311,12 +312,20 @@ setup_masks_arabic (const hb_ot_shape_plan_t *plan, hb_buffer_t *buffer, hb_font_t *font HB_UNUSED) { + HB_BUFFER_ALLOCATE_VAR (buffer, arabic_shaping_action); + const arabic_shape_plan_t *arabic_plan = (const arabic_shape_plan_t *) plan->data; arabic_joining (buffer); + if (plan->props.script == HB_SCRIPT_MONGOLIAN) + mongolian_variation_selectors (buffer); + unsigned int count = buffer->len; + hb_glyph_info_t *info = buffer->info; for (unsigned int i = 0; i < count; i++) - buffer->info[i].mask |= arabic_plan->mask_array[buffer->info[i].arabic_shaping_action()]; + info[i].mask |= arabic_plan->mask_array[info[i].arabic_shaping_action()]; + + HB_BUFFER_DEALLOCATE_VAR (buffer, arabic_shaping_action); } @@ -326,9 +335,10 @@ nuke_joiners (const hb_ot_shape_plan_t *plan HB_UNUSED, hb_buffer_t *buffer) { unsigned int count = buffer->len; + hb_glyph_info_t *info = buffer->info; for (unsigned int i = 0; i < count; i++) - if (_hb_glyph_info_is_zwj (&buffer->info[i])) - _hb_glyph_info_flip_joiners (&buffer->info[i]); + if (_hb_glyph_info_is_zwj (&info[i])) + _hb_glyph_info_flip_joiners (&info[i]); } static void diff --git a/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-hangul.cc b/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-hangul.cc index 47aa44fedb..54c12ebca2 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-hangul.cc +++ b/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-hangul.cc @@ -86,26 +86,26 @@ data_destroy_hangul (void *data) } /* Constants for algorithmic hangul syllable [de]composition. */ -#define LBase 0x1100 -#define VBase 0x1161 -#define TBase 0x11A7 -#define LCount 19 -#define VCount 21 -#define TCount 28 -#define SBase 0xAC00 +#define LBase 0x1100u +#define VBase 0x1161u +#define TBase 0x11A7u +#define LCount 19u +#define VCount 21u +#define TCount 28u +#define SBase 0xAC00u #define NCount (VCount * TCount) #define SCount (LCount * NCount) -#define isCombiningL(u) (hb_in_range ((u), LBase, LBase+LCount-1)) -#define isCombiningV(u) (hb_in_range ((u), VBase, VBase+VCount-1)) -#define isCombiningT(u) (hb_in_range ((u), TBase+1, TBase+TCount-1)) -#define isCombinedS(u) (hb_in_range ((u), SBase, SBase+SCount-1)) +#define isCombiningL(u) (hb_in_range ((u), LBase, LBase+LCount-1)) +#define isCombiningV(u) (hb_in_range ((u), VBase, VBase+VCount-1)) +#define isCombiningT(u) (hb_in_range ((u), TBase+1, TBase+TCount-1)) +#define isCombinedS(u) (hb_in_range ((u), SBase, SBase+SCount-1)) -#define isL(u) (hb_in_ranges ((u), 0x1100, 0x115F, 0xA960, 0xA97C)) -#define isV(u) (hb_in_ranges ((u), 0x1160, 0x11A7, 0xD7B0, 0xD7C6)) -#define isT(u) (hb_in_ranges ((u), 0x11A8, 0x11FF, 0xD7CB, 0xD7FB)) +#define isL(u) (hb_in_ranges ((u), 0x1100u, 0x115Fu, 0xA960u, 0xA97Cu)) +#define isV(u) (hb_in_ranges ((u), 0x1160u, 0x11A7u, 0xD7B0u, 0xD7C6u)) +#define isT(u) (hb_in_ranges ((u), 0x11A8u, 0x11FFu, 0xD7CBu, 0xD7FBu)) -#define isHangulTone(u) (hb_in_range ((u), 0x302e, 0x302f)) +#define isHangulTone(u) (hb_in_range ((u), 0x302Eu, 0x302Fu)) /* buffer var allocations */ #define hangul_shaping_feature() complex_var_u8_0() /* hangul jamo shaping feature */ @@ -211,14 +211,14 @@ preprocess_text_hangul (const hb_ot_shape_plan_t *plan, else { /* No valid syllable as base for tone mark; try to insert dotted circle. */ - if (font->has_glyph (0x25cc)) + if (font->has_glyph (0x25CCu)) { hb_codepoint_t chars[2]; if (!is_zero_width_char (font, u)) { chars[0] = u; - chars[1] = 0x25cc; + chars[1] = 0x25CCu; } else { - chars[0] = 0x25cc; + chars[0] = 0x25CCu; chars[1] = u; } buffer->replace_glyphs (1, 2, chars); diff --git a/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-hebrew.cc b/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-hebrew.cc index efef8c14ad..2381a6e732 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-hebrew.cc +++ b/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-hebrew.cc @@ -35,116 +35,116 @@ compose_hebrew (const hb_ot_shape_normalize_context_t *c, { /* Hebrew presentation-form shaping. * https://bugzilla.mozilla.org/show_bug.cgi?id=728866 - * Hebrew presentation forms with dagesh, for characters 0x05D0..0x05EA; + * Hebrew presentation forms with dagesh, for characters U+05D0..05EA; * Note that some letters do not have a dagesh presForm encoded. */ - static const hb_codepoint_t sDageshForms[0x05EA - 0x05D0 + 1] = { - 0xFB30, /* ALEF */ - 0xFB31, /* BET */ - 0xFB32, /* GIMEL */ - 0xFB33, /* DALET */ - 0xFB34, /* HE */ - 0xFB35, /* VAV */ - 0xFB36, /* ZAYIN */ - 0x0000, /* HET */ - 0xFB38, /* TET */ - 0xFB39, /* YOD */ - 0xFB3A, /* FINAL KAF */ - 0xFB3B, /* KAF */ - 0xFB3C, /* LAMED */ - 0x0000, /* FINAL MEM */ - 0xFB3E, /* MEM */ - 0x0000, /* FINAL NUN */ - 0xFB40, /* NUN */ - 0xFB41, /* SAMEKH */ - 0x0000, /* AYIN */ - 0xFB43, /* FINAL PE */ - 0xFB44, /* PE */ - 0x0000, /* FINAL TSADI */ - 0xFB46, /* TSADI */ - 0xFB47, /* QOF */ - 0xFB48, /* RESH */ - 0xFB49, /* SHIN */ - 0xFB4A /* TAV */ + static const hb_codepoint_t sDageshForms[0x05EAu - 0x05D0u + 1] = { + 0xFB30u, /* ALEF */ + 0xFB31u, /* BET */ + 0xFB32u, /* GIMEL */ + 0xFB33u, /* DALET */ + 0xFB34u, /* HE */ + 0xFB35u, /* VAV */ + 0xFB36u, /* ZAYIN */ + 0x0000u, /* HET */ + 0xFB38u, /* TET */ + 0xFB39u, /* YOD */ + 0xFB3Au, /* FINAL KAF */ + 0xFB3Bu, /* KAF */ + 0xFB3Cu, /* LAMED */ + 0x0000u, /* FINAL MEM */ + 0xFB3Eu, /* MEM */ + 0x0000u, /* FINAL NUN */ + 0xFB40u, /* NUN */ + 0xFB41u, /* SAMEKH */ + 0x0000u, /* AYIN */ + 0xFB43u, /* FINAL PE */ + 0xFB44u, /* PE */ + 0x0000u, /* FINAL TSADI */ + 0xFB46u, /* TSADI */ + 0xFB47u, /* QOF */ + 0xFB48u, /* RESH */ + 0xFB49u, /* SHIN */ + 0xFB4Au /* TAV */ }; bool found = c->unicode->compose (a, b, ab); - if (!found) + if (!found && !c->plan->has_mark) { /* Special-case Hebrew presentation forms that are excluded from * standard normalization, but wanted for old fonts. */ switch (b) { - case 0x05B4: /* HIRIQ */ - if (a == 0x05D9) { /* YOD */ - *ab = 0xFB1D; + case 0x05B4u: /* HIRIQ */ + if (a == 0x05D9u) { /* YOD */ + *ab = 0xFB1Du; found = true; } break; - case 0x05B7: /* patah */ - if (a == 0x05F2) { /* YIDDISH YOD YOD */ - *ab = 0xFB1F; + case 0x05B7u: /* patah */ + if (a == 0x05F2u) { /* YIDDISH YOD YOD */ + *ab = 0xFB1Fu; found = true; - } else if (a == 0x05D0) { /* ALEF */ - *ab = 0xFB2E; + } else if (a == 0x05D0u) { /* ALEF */ + *ab = 0xFB2Eu; found = true; } break; - case 0x05B8: /* QAMATS */ - if (a == 0x05D0) { /* ALEF */ - *ab = 0xFB2F; + case 0x05B8u: /* QAMATS */ + if (a == 0x05D0u) { /* ALEF */ + *ab = 0xFB2Fu; found = true; } break; - case 0x05B9: /* HOLAM */ - if (a == 0x05D5) { /* VAV */ - *ab = 0xFB4B; + case 0x05B9u: /* HOLAM */ + if (a == 0x05D5u) { /* VAV */ + *ab = 0xFB4Bu; found = true; } break; - case 0x05BC: /* DAGESH */ - if (a >= 0x05D0 && a <= 0x05EA) { - *ab = sDageshForms[a - 0x05D0]; + case 0x05BCu: /* DAGESH */ + if (a >= 0x05D0u && a <= 0x05EAu) { + *ab = sDageshForms[a - 0x05D0u]; found = (*ab != 0); - } else if (a == 0xFB2A) { /* SHIN WITH SHIN DOT */ - *ab = 0xFB2C; + } else if (a == 0xFB2Au) { /* SHIN WITH SHIN DOT */ + *ab = 0xFB2Cu; found = true; - } else if (a == 0xFB2B) { /* SHIN WITH SIN DOT */ - *ab = 0xFB2D; + } else if (a == 0xFB2Bu) { /* SHIN WITH SIN DOT */ + *ab = 0xFB2Du; found = true; } break; - case 0x05BF: /* RAFE */ + case 0x05BFu: /* RAFE */ switch (a) { - case 0x05D1: /* BET */ - *ab = 0xFB4C; + case 0x05D1u: /* BET */ + *ab = 0xFB4Cu; found = true; break; - case 0x05DB: /* KAF */ - *ab = 0xFB4D; + case 0x05DBu: /* KAF */ + *ab = 0xFB4Du; found = true; break; - case 0x05E4: /* PE */ - *ab = 0xFB4E; + case 0x05E4u: /* PE */ + *ab = 0xFB4Eu; found = true; break; } break; - case 0x05C1: /* SHIN DOT */ - if (a == 0x05E9) { /* SHIN */ - *ab = 0xFB2A; + case 0x05C1u: /* SHIN DOT */ + if (a == 0x05E9u) { /* SHIN */ + *ab = 0xFB2Au; found = true; - } else if (a == 0xFB49) { /* SHIN WITH DAGESH */ - *ab = 0xFB2C; + } else if (a == 0xFB49u) { /* SHIN WITH DAGESH */ + *ab = 0xFB2Cu; found = true; } break; - case 0x05C2: /* SIN DOT */ - if (a == 0x05E9) { /* SHIN */ - *ab = 0xFB2B; + case 0x05C2u: /* SIN DOT */ + if (a == 0x05E9u) { /* SHIN */ + *ab = 0xFB2Bu; found = true; - } else if (a == 0xFB49) { /* SHIN WITH DAGESH */ - *ab = 0xFB2D; + } else if (a == 0xFB49u) { /* SHIN WITH DAGESH */ + *ab = 0xFB2Du; found = true; } break; diff --git a/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-indic-machine.hh b/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-indic-machine.hh index 71621034ee..522ccc67fe 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-indic-machine.hh +++ b/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-indic-machine.hh @@ -55,52 +55,52 @@ static const unsigned char _indic_syllable_machine_trans_keys[] = { 4u, 14u, 5u, 7u, 5u, 7u, 5u, 7u, 5u, 7u, 7u, 7u, 5u, 7u, 5u, 7u, 7u, 7u, 5u, 7u, 5u, 7u, 7u, 7u, 1u, 16u, 13u, 13u, 4u, 4u, 6u, 6u, 16u, 16u, 4u, 7u, 6u, 6u, 16u, 16u, 4u, 7u, 6u, 6u, 16u, 16u, 4u, 7u, - 6u, 6u, 16u, 16u, 1u, 31u, 3u, 31u, 3u, 31u, 4u, 31u, 1u, 18u, 3u, 31u, - 3u, 31u, 4u, 31u, 1u, 18u, 3u, 31u, 3u, 31u, 4u, 31u, 1u, 18u, 3u, 31u, - 3u, 31u, 4u, 31u, 1u, 18u, 3u, 31u, 3u, 31u, 4u, 31u, 5u, 18u, 8u, 18u, - 5u, 10u, 9u, 10u, 9u, 10u, 9u, 9u, 5u, 10u, 3u, 18u, 3u, 18u, 8u, 18u, - 3u, 10u, 8u, 10u, 3u, 18u, 3u, 18u, 3u, 18u, 3u, 18u, 4u, 18u, 5u, 18u, - 3u, 18u, 4u, 18u, 5u, 18u, 3u, 18u, 4u, 18u, 5u, 18u, 3u, 18u, 4u, 18u, - 6u, 18u, 3u, 18u, 1u, 18u, 4u, 31u, 4u, 18u, 3u, 31u, 3u, 31u, 1u, 18u, - 1u, 18u, 1u, 18u, 1u, 18u, 1u, 18u, 3u, 31u, 3u, 31u, 1u, 18u, 1u, 18u, - 1u, 18u, 1u, 18u, 1u, 18u, 3u, 31u, 3u, 31u, 1u, 18u, 1u, 18u, 1u, 18u, - 1u, 18u, 1u, 18u, 3u, 31u, 3u, 31u, 1u, 18u, 1u, 18u, 1u, 18u, 1u, 18u, - 1u, 18u, 3u, 31u, 3u, 31u, 3u, 31u, 3u, 31u, 4u, 31u, 1u, 18u, 3u, 31u, - 3u, 31u, 4u, 31u, 1u, 18u, 3u, 31u, 3u, 31u, 4u, 31u, 1u, 18u, 3u, 31u, - 3u, 31u, 4u, 31u, 1u, 18u, 3u, 31u, 3u, 31u, 4u, 31u, 5u, 18u, 8u, 18u, - 5u, 10u, 9u, 10u, 9u, 10u, 9u, 9u, 5u, 10u, 3u, 18u, 3u, 18u, 8u, 18u, - 3u, 10u, 8u, 10u, 3u, 18u, 3u, 18u, 3u, 18u, 3u, 18u, 4u, 18u, 5u, 18u, - 3u, 18u, 4u, 18u, 5u, 18u, 3u, 18u, 4u, 18u, 5u, 18u, 3u, 18u, 4u, 18u, - 6u, 18u, 3u, 18u, 1u, 18u, 4u, 31u, 4u, 18u, 3u, 31u, 3u, 31u, 1u, 18u, - 1u, 18u, 1u, 18u, 1u, 18u, 1u, 18u, 3u, 31u, 3u, 31u, 1u, 18u, 1u, 18u, - 1u, 18u, 1u, 18u, 1u, 18u, 3u, 31u, 3u, 31u, 1u, 18u, 1u, 18u, 1u, 18u, - 1u, 18u, 1u, 18u, 3u, 31u, 3u, 31u, 1u, 18u, 1u, 18u, 1u, 18u, 1u, 18u, - 4u, 14u, 1u, 18u, 3u, 31u, 3u, 31u, 4u, 31u, 1u, 18u, 3u, 31u, 3u, 31u, - 4u, 31u, 1u, 18u, 3u, 31u, 3u, 31u, 4u, 31u, 1u, 18u, 3u, 31u, 3u, 31u, - 4u, 31u, 1u, 18u, 3u, 31u, 3u, 31u, 4u, 31u, 5u, 18u, 8u, 18u, 5u, 10u, - 9u, 10u, 9u, 10u, 9u, 9u, 5u, 10u, 3u, 18u, 3u, 18u, 8u, 18u, 3u, 10u, - 8u, 10u, 3u, 18u, 3u, 18u, 3u, 18u, 3u, 18u, 4u, 18u, 5u, 18u, 3u, 18u, - 4u, 18u, 5u, 18u, 3u, 18u, 4u, 18u, 5u, 18u, 3u, 18u, 4u, 18u, 6u, 18u, - 3u, 18u, 1u, 18u, 4u, 31u, 4u, 18u, 3u, 31u, 3u, 31u, 1u, 18u, 1u, 18u, - 1u, 18u, 1u, 18u, 1u, 18u, 3u, 31u, 3u, 31u, 1u, 18u, 1u, 18u, 1u, 18u, - 1u, 18u, 1u, 18u, 3u, 31u, 3u, 31u, 1u, 18u, 1u, 18u, 1u, 18u, 1u, 18u, - 1u, 18u, 3u, 31u, 3u, 31u, 1u, 18u, 1u, 18u, 1u, 18u, 1u, 18u, 1u, 18u, - 4u, 14u, 3u, 31u, 4u, 14u, 3u, 31u, 3u, 31u, 4u, 31u, 1u, 18u, 3u, 31u, - 3u, 31u, 4u, 31u, 1u, 18u, 3u, 31u, 3u, 31u, 4u, 31u, 1u, 18u, 3u, 31u, - 3u, 31u, 4u, 31u, 1u, 18u, 3u, 31u, 3u, 31u, 4u, 31u, 5u, 18u, 8u, 18u, - 5u, 10u, 9u, 10u, 9u, 10u, 9u, 9u, 5u, 10u, 3u, 18u, 3u, 18u, 8u, 18u, - 3u, 10u, 8u, 10u, 3u, 18u, 3u, 18u, 3u, 18u, 3u, 18u, 4u, 18u, 5u, 18u, - 3u, 18u, 4u, 18u, 5u, 18u, 3u, 18u, 4u, 18u, 5u, 18u, 3u, 18u, 4u, 18u, - 6u, 18u, 3u, 18u, 1u, 18u, 4u, 31u, 4u, 18u, 3u, 31u, 3u, 31u, 1u, 18u, - 1u, 18u, 1u, 18u, 1u, 18u, 1u, 18u, 3u, 31u, 3u, 31u, 1u, 18u, 1u, 18u, - 1u, 18u, 1u, 18u, 1u, 18u, 3u, 31u, 3u, 31u, 1u, 18u, 1u, 18u, 1u, 18u, - 1u, 18u, 1u, 18u, 3u, 31u, 3u, 31u, 1u, 18u, 1u, 18u, 1u, 18u, 1u, 18u, - 1u, 18u, 3u, 31u, 1u, 31u, 3u, 31u, 1u, 31u, 4u, 18u, 1u, 18u, 3u, 31u, - 3u, 31u, 4u, 31u, 5u, 10u, 9u, 10u, 9u, 10u, 9u, 9u, 5u, 10u, 3u, 10u, - 8u, 10u, 3u, 31u, 3u, 31u, 1u, 18u, 3u, 18u, 4u, 18u, 5u, 18u, 3u, 18u, - 4u, 18u, 5u, 18u, 3u, 18u, 4u, 18u, 5u, 18u, 3u, 18u, 4u, 18u, 8u, 18u, - 3u, 18u, 3u, 18u, 8u, 18u, 3u, 18u, 3u, 18u, 1u, 18u, 3u, 10u, 8u, 10u, - 5u, 10u, 9u, 10u, 9u, 10u, 9u, 9u, 5u, 10u, 0 + 6u, 6u, 16u, 16u, 1u, 31u, 3u, 31u, 3u, 31u, 4u, 31u, 1u, 16u, 3u, 31u, + 3u, 31u, 4u, 31u, 1u, 16u, 3u, 31u, 3u, 31u, 4u, 31u, 1u, 16u, 3u, 31u, + 3u, 31u, 4u, 31u, 1u, 16u, 3u, 31u, 3u, 31u, 4u, 31u, 5u, 14u, 8u, 14u, + 5u, 10u, 9u, 10u, 9u, 9u, 9u, 10u, 9u, 10u, 9u, 9u, 5u, 10u, 3u, 13u, + 3u, 10u, 8u, 10u, 3u, 10u, 3u, 13u, 3u, 14u, 3u, 14u, 4u, 14u, 5u, 14u, + 3u, 14u, 4u, 14u, 5u, 14u, 3u, 14u, 4u, 14u, 5u, 14u, 3u, 14u, 4u, 14u, + 6u, 14u, 3u, 14u, 1u, 16u, 4u, 31u, 4u, 14u, 3u, 31u, 3u, 31u, 1u, 16u, + 1u, 16u, 1u, 16u, 1u, 16u, 1u, 16u, 3u, 31u, 3u, 31u, 1u, 16u, 1u, 16u, + 1u, 16u, 1u, 16u, 1u, 16u, 3u, 31u, 3u, 31u, 1u, 16u, 1u, 16u, 1u, 16u, + 1u, 16u, 1u, 16u, 3u, 31u, 3u, 31u, 1u, 16u, 1u, 16u, 1u, 16u, 1u, 16u, + 1u, 16u, 3u, 31u, 3u, 31u, 3u, 31u, 3u, 31u, 4u, 31u, 1u, 16u, 3u, 31u, + 3u, 31u, 4u, 31u, 1u, 16u, 3u, 31u, 3u, 31u, 4u, 31u, 1u, 16u, 3u, 31u, + 3u, 31u, 4u, 31u, 1u, 16u, 3u, 31u, 3u, 31u, 4u, 31u, 5u, 14u, 8u, 14u, + 5u, 10u, 9u, 10u, 9u, 9u, 9u, 10u, 9u, 10u, 9u, 9u, 5u, 10u, 3u, 13u, + 3u, 10u, 8u, 10u, 3u, 10u, 3u, 13u, 3u, 14u, 3u, 14u, 4u, 14u, 5u, 14u, + 3u, 14u, 4u, 14u, 5u, 14u, 3u, 14u, 4u, 14u, 5u, 14u, 3u, 14u, 4u, 14u, + 6u, 14u, 3u, 14u, 1u, 16u, 4u, 31u, 4u, 14u, 3u, 31u, 3u, 31u, 1u, 16u, + 1u, 16u, 1u, 16u, 1u, 16u, 1u, 16u, 3u, 31u, 3u, 31u, 1u, 16u, 1u, 16u, + 1u, 16u, 1u, 16u, 1u, 16u, 3u, 31u, 3u, 31u, 1u, 16u, 1u, 16u, 1u, 16u, + 1u, 16u, 1u, 16u, 3u, 31u, 3u, 31u, 1u, 16u, 1u, 16u, 1u, 16u, 1u, 16u, + 4u, 14u, 1u, 16u, 3u, 31u, 3u, 31u, 4u, 31u, 1u, 16u, 3u, 31u, 3u, 31u, + 4u, 31u, 1u, 16u, 3u, 31u, 3u, 31u, 4u, 31u, 1u, 16u, 3u, 31u, 3u, 31u, + 4u, 31u, 1u, 16u, 3u, 31u, 3u, 31u, 4u, 31u, 5u, 14u, 8u, 14u, 5u, 10u, + 9u, 10u, 9u, 9u, 9u, 10u, 9u, 10u, 9u, 9u, 5u, 10u, 3u, 13u, 3u, 10u, + 8u, 10u, 3u, 10u, 3u, 13u, 3u, 14u, 3u, 14u, 4u, 14u, 5u, 14u, 3u, 14u, + 4u, 14u, 5u, 14u, 3u, 14u, 4u, 14u, 5u, 14u, 3u, 14u, 4u, 14u, 6u, 14u, + 3u, 14u, 1u, 16u, 4u, 31u, 4u, 14u, 3u, 31u, 3u, 31u, 1u, 16u, 1u, 16u, + 1u, 16u, 1u, 16u, 1u, 16u, 3u, 31u, 3u, 31u, 1u, 16u, 1u, 16u, 1u, 16u, + 1u, 16u, 1u, 16u, 3u, 31u, 3u, 31u, 1u, 16u, 1u, 16u, 1u, 16u, 1u, 16u, + 1u, 16u, 3u, 31u, 3u, 31u, 1u, 16u, 1u, 16u, 1u, 16u, 1u, 16u, 1u, 16u, + 4u, 14u, 3u, 31u, 4u, 14u, 3u, 31u, 3u, 31u, 4u, 31u, 1u, 16u, 3u, 31u, + 3u, 31u, 4u, 31u, 1u, 16u, 3u, 31u, 3u, 31u, 4u, 31u, 1u, 16u, 3u, 31u, + 3u, 31u, 4u, 31u, 1u, 16u, 3u, 31u, 3u, 31u, 4u, 31u, 5u, 14u, 8u, 14u, + 5u, 10u, 9u, 10u, 9u, 9u, 9u, 10u, 9u, 10u, 9u, 9u, 5u, 10u, 3u, 13u, + 3u, 10u, 8u, 10u, 3u, 10u, 3u, 13u, 3u, 14u, 3u, 14u, 4u, 14u, 5u, 14u, + 3u, 14u, 4u, 14u, 5u, 14u, 3u, 14u, 4u, 14u, 5u, 14u, 3u, 14u, 4u, 14u, + 6u, 14u, 3u, 14u, 1u, 16u, 4u, 31u, 4u, 14u, 3u, 31u, 3u, 31u, 1u, 16u, + 1u, 16u, 1u, 16u, 1u, 16u, 1u, 16u, 3u, 31u, 3u, 31u, 1u, 16u, 1u, 16u, + 1u, 16u, 1u, 16u, 1u, 16u, 3u, 31u, 3u, 31u, 1u, 16u, 1u, 16u, 1u, 16u, + 1u, 16u, 1u, 16u, 3u, 31u, 3u, 31u, 1u, 16u, 1u, 16u, 1u, 16u, 1u, 16u, + 1u, 16u, 3u, 31u, 1u, 31u, 3u, 31u, 1u, 31u, 4u, 14u, 1u, 16u, 3u, 31u, + 3u, 31u, 4u, 31u, 5u, 10u, 9u, 10u, 9u, 9u, 9u, 10u, 9u, 10u, 9u, 9u, + 5u, 10u, 3u, 31u, 3u, 31u, 1u, 16u, 3u, 14u, 4u, 14u, 5u, 14u, 3u, 14u, + 4u, 14u, 5u, 14u, 3u, 14u, 4u, 14u, 5u, 14u, 3u, 14u, 4u, 14u, 8u, 14u, + 3u, 13u, 3u, 10u, 8u, 10u, 3u, 10u, 3u, 13u, 1u, 16u, 3u, 10u, 8u, 10u, + 5u, 10u, 9u, 10u, 9u, 9u, 9u, 10u, 9u, 10u, 9u, 9u, 5u, 10u, 0 }; static const char _indic_syllable_machine_key_spans[] = { @@ -125,52 +125,52 @@ static const char _indic_syllable_machine_key_spans[] = { 11, 3, 3, 3, 3, 1, 3, 3, 1, 3, 3, 1, 16, 1, 1, 1, 1, 4, 1, 1, 4, 1, 1, 4, - 1, 1, 31, 29, 29, 28, 18, 29, - 29, 28, 18, 29, 29, 28, 18, 29, - 29, 28, 18, 29, 29, 28, 14, 11, - 6, 2, 2, 1, 6, 16, 16, 11, - 8, 3, 16, 16, 16, 16, 15, 14, - 16, 15, 14, 16, 15, 14, 16, 15, - 13, 16, 18, 28, 15, 29, 29, 18, - 18, 18, 18, 18, 29, 29, 18, 18, - 18, 18, 18, 29, 29, 18, 18, 18, - 18, 18, 29, 29, 18, 18, 18, 18, - 18, 29, 29, 29, 29, 28, 18, 29, - 29, 28, 18, 29, 29, 28, 18, 29, - 29, 28, 18, 29, 29, 28, 14, 11, - 6, 2, 2, 1, 6, 16, 16, 11, - 8, 3, 16, 16, 16, 16, 15, 14, - 16, 15, 14, 16, 15, 14, 16, 15, - 13, 16, 18, 28, 15, 29, 29, 18, - 18, 18, 18, 18, 29, 29, 18, 18, - 18, 18, 18, 29, 29, 18, 18, 18, - 18, 18, 29, 29, 18, 18, 18, 18, - 11, 18, 29, 29, 28, 18, 29, 29, - 28, 18, 29, 29, 28, 18, 29, 29, - 28, 18, 29, 29, 28, 14, 11, 6, - 2, 2, 1, 6, 16, 16, 11, 8, - 3, 16, 16, 16, 16, 15, 14, 16, - 15, 14, 16, 15, 14, 16, 15, 13, - 16, 18, 28, 15, 29, 29, 18, 18, - 18, 18, 18, 29, 29, 18, 18, 18, - 18, 18, 29, 29, 18, 18, 18, 18, - 18, 29, 29, 18, 18, 18, 18, 18, - 11, 29, 11, 29, 29, 28, 18, 29, - 29, 28, 18, 29, 29, 28, 18, 29, - 29, 28, 18, 29, 29, 28, 14, 11, - 6, 2, 2, 1, 6, 16, 16, 11, - 8, 3, 16, 16, 16, 16, 15, 14, - 16, 15, 14, 16, 15, 14, 16, 15, - 13, 16, 18, 28, 15, 29, 29, 18, - 18, 18, 18, 18, 29, 29, 18, 18, - 18, 18, 18, 29, 29, 18, 18, 18, - 18, 18, 29, 29, 18, 18, 18, 18, - 18, 29, 31, 29, 31, 15, 18, 29, - 29, 28, 6, 2, 2, 1, 6, 8, - 3, 29, 29, 18, 16, 15, 14, 16, - 15, 14, 16, 15, 14, 16, 15, 11, - 16, 16, 11, 16, 16, 18, 8, 3, - 6, 2, 2, 1, 6 + 1, 1, 31, 29, 29, 28, 16, 29, + 29, 28, 16, 29, 29, 28, 16, 29, + 29, 28, 16, 29, 29, 28, 10, 7, + 6, 2, 1, 2, 2, 1, 6, 11, + 8, 3, 8, 11, 12, 12, 11, 10, + 12, 11, 10, 12, 11, 10, 12, 11, + 9, 12, 16, 28, 11, 29, 29, 16, + 16, 16, 16, 16, 29, 29, 16, 16, + 16, 16, 16, 29, 29, 16, 16, 16, + 16, 16, 29, 29, 16, 16, 16, 16, + 16, 29, 29, 29, 29, 28, 16, 29, + 29, 28, 16, 29, 29, 28, 16, 29, + 29, 28, 16, 29, 29, 28, 10, 7, + 6, 2, 1, 2, 2, 1, 6, 11, + 8, 3, 8, 11, 12, 12, 11, 10, + 12, 11, 10, 12, 11, 10, 12, 11, + 9, 12, 16, 28, 11, 29, 29, 16, + 16, 16, 16, 16, 29, 29, 16, 16, + 16, 16, 16, 29, 29, 16, 16, 16, + 16, 16, 29, 29, 16, 16, 16, 16, + 11, 16, 29, 29, 28, 16, 29, 29, + 28, 16, 29, 29, 28, 16, 29, 29, + 28, 16, 29, 29, 28, 10, 7, 6, + 2, 1, 2, 2, 1, 6, 11, 8, + 3, 8, 11, 12, 12, 11, 10, 12, + 11, 10, 12, 11, 10, 12, 11, 9, + 12, 16, 28, 11, 29, 29, 16, 16, + 16, 16, 16, 29, 29, 16, 16, 16, + 16, 16, 29, 29, 16, 16, 16, 16, + 16, 29, 29, 16, 16, 16, 16, 16, + 11, 29, 11, 29, 29, 28, 16, 29, + 29, 28, 16, 29, 29, 28, 16, 29, + 29, 28, 16, 29, 29, 28, 10, 7, + 6, 2, 1, 2, 2, 1, 6, 11, + 8, 3, 8, 11, 12, 12, 11, 10, + 12, 11, 10, 12, 11, 10, 12, 11, + 9, 12, 16, 28, 11, 29, 29, 16, + 16, 16, 16, 16, 29, 29, 16, 16, + 16, 16, 16, 29, 29, 16, 16, 16, + 16, 16, 29, 29, 16, 16, 16, 16, + 16, 29, 31, 29, 31, 11, 16, 29, + 29, 28, 6, 2, 1, 2, 2, 1, + 6, 29, 29, 16, 12, 11, 10, 12, + 11, 10, 12, 11, 10, 12, 11, 7, + 11, 8, 3, 8, 11, 16, 8, 3, + 6, 2, 1, 2, 2, 1, 6 }; static const short _indic_syllable_machine_index_offsets[] = { @@ -195,52 +195,52 @@ static const short _indic_syllable_machine_index_offsets[] = { 848, 860, 864, 868, 872, 876, 878, 882, 886, 888, 892, 896, 898, 915, 917, 919, 921, 923, 928, 930, 932, 937, 939, 941, - 946, 948, 950, 982, 1012, 1042, 1071, 1090, - 1120, 1150, 1179, 1198, 1228, 1258, 1287, 1306, - 1336, 1366, 1395, 1414, 1444, 1474, 1503, 1518, - 1530, 1537, 1540, 1543, 1545, 1552, 1569, 1586, - 1598, 1607, 1611, 1628, 1645, 1662, 1679, 1695, - 1710, 1727, 1743, 1758, 1775, 1791, 1806, 1823, - 1839, 1853, 1870, 1889, 1918, 1934, 1964, 1994, - 2013, 2032, 2051, 2070, 2089, 2119, 2149, 2168, - 2187, 2206, 2225, 2244, 2274, 2304, 2323, 2342, - 2361, 2380, 2399, 2429, 2459, 2478, 2497, 2516, - 2535, 2554, 2584, 2614, 2644, 2674, 2703, 2722, - 2752, 2782, 2811, 2830, 2860, 2890, 2919, 2938, - 2968, 2998, 3027, 3046, 3076, 3106, 3135, 3150, - 3162, 3169, 3172, 3175, 3177, 3184, 3201, 3218, - 3230, 3239, 3243, 3260, 3277, 3294, 3311, 3327, - 3342, 3359, 3375, 3390, 3407, 3423, 3438, 3455, - 3471, 3485, 3502, 3521, 3550, 3566, 3596, 3626, - 3645, 3664, 3683, 3702, 3721, 3751, 3781, 3800, - 3819, 3838, 3857, 3876, 3906, 3936, 3955, 3974, - 3993, 4012, 4031, 4061, 4091, 4110, 4129, 4148, - 4167, 4179, 4198, 4228, 4258, 4287, 4306, 4336, - 4366, 4395, 4414, 4444, 4474, 4503, 4522, 4552, - 4582, 4611, 4630, 4660, 4690, 4719, 4734, 4746, - 4753, 4756, 4759, 4761, 4768, 4785, 4802, 4814, - 4823, 4827, 4844, 4861, 4878, 4895, 4911, 4926, - 4943, 4959, 4974, 4991, 5007, 5022, 5039, 5055, - 5069, 5086, 5105, 5134, 5150, 5180, 5210, 5229, - 5248, 5267, 5286, 5305, 5335, 5365, 5384, 5403, - 5422, 5441, 5460, 5490, 5520, 5539, 5558, 5577, - 5596, 5615, 5645, 5675, 5694, 5713, 5732, 5751, - 5770, 5782, 5812, 5824, 5854, 5884, 5913, 5932, - 5962, 5992, 6021, 6040, 6070, 6100, 6129, 6148, - 6178, 6208, 6237, 6256, 6286, 6316, 6345, 6360, - 6372, 6379, 6382, 6385, 6387, 6394, 6411, 6428, - 6440, 6449, 6453, 6470, 6487, 6504, 6521, 6537, - 6552, 6569, 6585, 6600, 6617, 6633, 6648, 6665, - 6681, 6695, 6712, 6731, 6760, 6776, 6806, 6836, - 6855, 6874, 6893, 6912, 6931, 6961, 6991, 7010, - 7029, 7048, 7067, 7086, 7116, 7146, 7165, 7184, - 7203, 7222, 7241, 7271, 7301, 7320, 7339, 7358, - 7377, 7396, 7426, 7458, 7488, 7520, 7536, 7555, - 7585, 7615, 7644, 7651, 7654, 7657, 7659, 7666, - 7675, 7679, 7709, 7739, 7758, 7775, 7791, 7806, - 7823, 7839, 7854, 7871, 7887, 7902, 7919, 7935, - 7947, 7964, 7981, 7993, 8010, 8027, 8046, 8055, - 8059, 8066, 8069, 8072, 8074 + 946, 948, 950, 982, 1012, 1042, 1071, 1088, + 1118, 1148, 1177, 1194, 1224, 1254, 1283, 1300, + 1330, 1360, 1389, 1406, 1436, 1466, 1495, 1506, + 1514, 1521, 1524, 1526, 1529, 1532, 1534, 1541, + 1553, 1562, 1566, 1575, 1587, 1600, 1613, 1625, + 1636, 1649, 1661, 1672, 1685, 1697, 1708, 1721, + 1733, 1743, 1756, 1773, 1802, 1814, 1844, 1874, + 1891, 1908, 1925, 1942, 1959, 1989, 2019, 2036, + 2053, 2070, 2087, 2104, 2134, 2164, 2181, 2198, + 2215, 2232, 2249, 2279, 2309, 2326, 2343, 2360, + 2377, 2394, 2424, 2454, 2484, 2514, 2543, 2560, + 2590, 2620, 2649, 2666, 2696, 2726, 2755, 2772, + 2802, 2832, 2861, 2878, 2908, 2938, 2967, 2978, + 2986, 2993, 2996, 2998, 3001, 3004, 3006, 3013, + 3025, 3034, 3038, 3047, 3059, 3072, 3085, 3097, + 3108, 3121, 3133, 3144, 3157, 3169, 3180, 3193, + 3205, 3215, 3228, 3245, 3274, 3286, 3316, 3346, + 3363, 3380, 3397, 3414, 3431, 3461, 3491, 3508, + 3525, 3542, 3559, 3576, 3606, 3636, 3653, 3670, + 3687, 3704, 3721, 3751, 3781, 3798, 3815, 3832, + 3849, 3861, 3878, 3908, 3938, 3967, 3984, 4014, + 4044, 4073, 4090, 4120, 4150, 4179, 4196, 4226, + 4256, 4285, 4302, 4332, 4362, 4391, 4402, 4410, + 4417, 4420, 4422, 4425, 4428, 4430, 4437, 4449, + 4458, 4462, 4471, 4483, 4496, 4509, 4521, 4532, + 4545, 4557, 4568, 4581, 4593, 4604, 4617, 4629, + 4639, 4652, 4669, 4698, 4710, 4740, 4770, 4787, + 4804, 4821, 4838, 4855, 4885, 4915, 4932, 4949, + 4966, 4983, 5000, 5030, 5060, 5077, 5094, 5111, + 5128, 5145, 5175, 5205, 5222, 5239, 5256, 5273, + 5290, 5302, 5332, 5344, 5374, 5404, 5433, 5450, + 5480, 5510, 5539, 5556, 5586, 5616, 5645, 5662, + 5692, 5722, 5751, 5768, 5798, 5828, 5857, 5868, + 5876, 5883, 5886, 5888, 5891, 5894, 5896, 5903, + 5915, 5924, 5928, 5937, 5949, 5962, 5975, 5987, + 5998, 6011, 6023, 6034, 6047, 6059, 6070, 6083, + 6095, 6105, 6118, 6135, 6164, 6176, 6206, 6236, + 6253, 6270, 6287, 6304, 6321, 6351, 6381, 6398, + 6415, 6432, 6449, 6466, 6496, 6526, 6543, 6560, + 6577, 6594, 6611, 6641, 6671, 6688, 6705, 6722, + 6739, 6756, 6786, 6818, 6848, 6880, 6892, 6909, + 6939, 6969, 6998, 7005, 7008, 7010, 7013, 7016, + 7018, 7025, 7055, 7085, 7102, 7115, 7127, 7138, + 7151, 7163, 7174, 7187, 7199, 7210, 7223, 7235, + 7243, 7255, 7264, 7268, 7277, 7289, 7306, 7315, + 7319, 7326, 7329, 7331, 7334, 7337, 7339 }; static const short _indic_syllable_machine_indicies[] = { @@ -368,911 +368,819 @@ static const short _indic_syllable_machine_indicies[] = { 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 196, 180, 198, 199, 200, 201, 5, 202, 203, 204, 197, 197, - 37, 205, 197, 197, 206, 207, 197, 197, + 37, 205, 197, 197, 206, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, - 197, 197, 208, 197, 209, 199, 210, 210, + 197, 197, 207, 197, 208, 199, 209, 209, 5, 202, 203, 204, 197, 197, 197, 205, - 197, 197, 206, 207, 197, 197, 197, 197, + 197, 197, 206, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, - 208, 197, 199, 210, 210, 5, 202, 203, + 207, 197, 199, 209, 209, 5, 202, 203, 204, 197, 197, 197, 205, 197, 197, 206, - 207, 197, 197, 197, 197, 197, 197, 197, - 197, 197, 197, 197, 197, 208, 197, 211, - 197, 197, 197, 18, 212, 197, 202, 203, - 204, 197, 197, 197, 213, 197, 211, 197, - 207, 197, 214, 215, 216, 217, 5, 202, - 203, 204, 197, 197, 35, 218, 197, 197, - 206, 207, 197, 197, 197, 197, 197, 197, - 197, 197, 197, 197, 197, 197, 208, 197, - 219, 215, 220, 220, 5, 202, 203, 204, - 197, 197, 197, 218, 197, 197, 206, 207, 197, 197, 197, 197, 197, 197, 197, 197, - 197, 197, 197, 197, 208, 197, 215, 220, - 220, 5, 202, 203, 204, 197, 197, 197, - 218, 197, 197, 206, 207, 197, 197, 197, + 197, 197, 197, 197, 197, 207, 197, 210, + 197, 197, 197, 18, 211, 197, 202, 203, + 204, 197, 197, 197, 212, 197, 210, 197, + 213, 214, 215, 216, 5, 202, 203, 204, + 197, 197, 35, 217, 197, 197, 206, 197, 197, 197, 197, 197, 197, 197, 197, 197, - 197, 208, 197, 221, 197, 197, 197, 18, - 222, 197, 202, 203, 204, 197, 197, 197, - 213, 197, 221, 197, 207, 197, 223, 224, - 225, 226, 5, 202, 203, 204, 197, 197, - 33, 227, 197, 197, 206, 207, 197, 197, + 197, 197, 197, 197, 207, 197, 218, 214, + 219, 219, 5, 202, 203, 204, 197, 197, + 197, 217, 197, 197, 206, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, - 197, 197, 208, 197, 228, 224, 229, 229, - 5, 202, 203, 204, 197, 197, 197, 227, - 197, 197, 206, 207, 197, 197, 197, 197, + 197, 197, 207, 197, 214, 219, 219, 5, + 202, 203, 204, 197, 197, 197, 217, 197, + 197, 206, 197, 197, 197, 197, 197, 197, + 197, 197, 197, 197, 197, 197, 197, 207, + 197, 220, 197, 197, 197, 18, 221, 197, + 202, 203, 204, 197, 197, 197, 212, 197, + 220, 197, 222, 223, 224, 225, 5, 202, + 203, 204, 197, 197, 33, 226, 197, 197, + 206, 197, 197, 197, 197, 197, 197, 197, + 197, 197, 197, 197, 197, 197, 207, 197, + 227, 223, 228, 228, 5, 202, 203, 204, + 197, 197, 197, 226, 197, 197, 206, 197, 197, 197, 197, 197, 197, 197, 197, 197, - 208, 197, 224, 229, 229, 5, 202, 203, - 204, 197, 197, 197, 227, 197, 197, 206, - 207, 197, 197, 197, 197, 197, 197, 197, - 197, 197, 197, 197, 197, 208, 197, 230, - 197, 197, 197, 18, 231, 197, 202, 203, - 204, 197, 197, 197, 213, 197, 230, 197, - 207, 197, 232, 233, 234, 235, 5, 202, - 203, 204, 197, 197, 31, 236, 197, 197, - 206, 207, 197, 197, 197, 197, 197, 197, - 197, 197, 197, 197, 197, 197, 208, 197, - 237, 233, 238, 238, 5, 202, 203, 204, - 197, 197, 197, 236, 197, 197, 206, 207, + 197, 197, 197, 197, 207, 197, 223, 228, + 228, 5, 202, 203, 204, 197, 197, 197, + 226, 197, 197, 206, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, - 197, 197, 197, 197, 208, 197, 233, 238, - 238, 5, 202, 203, 204, 197, 197, 197, - 236, 197, 197, 206, 207, 197, 197, 197, + 197, 207, 197, 229, 197, 197, 197, 18, + 230, 197, 202, 203, 204, 197, 197, 197, + 212, 197, 229, 197, 231, 232, 233, 234, + 5, 202, 203, 204, 197, 197, 31, 235, + 197, 197, 206, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, - 197, 208, 197, 239, 197, 197, 197, 18, - 240, 197, 202, 203, 204, 197, 197, 197, - 213, 197, 239, 197, 207, 197, 241, 242, - 243, 244, 5, 202, 203, 204, 197, 197, - 29, 245, 197, 197, 206, 207, 197, 197, + 207, 197, 236, 232, 237, 237, 5, 202, + 203, 204, 197, 197, 197, 235, 197, 197, + 206, 197, 197, 197, 197, 197, 197, 197, + 197, 197, 197, 197, 197, 197, 207, 197, + 232, 237, 237, 5, 202, 203, 204, 197, + 197, 197, 235, 197, 197, 206, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, - 197, 197, 208, 197, 246, 242, 247, 247, - 5, 202, 203, 204, 197, 197, 197, 245, - 197, 197, 206, 207, 197, 197, 197, 197, + 197, 197, 197, 207, 197, 238, 197, 197, + 197, 18, 239, 197, 202, 203, 204, 197, + 197, 197, 212, 197, 238, 197, 240, 241, + 242, 243, 5, 202, 203, 204, 197, 197, + 29, 244, 197, 197, 206, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, - 208, 197, 242, 247, 247, 5, 202, 203, - 204, 197, 197, 197, 245, 197, 197, 206, - 207, 197, 197, 197, 197, 197, 197, 197, - 197, 197, 197, 197, 197, 208, 197, 18, - 248, 197, 202, 203, 204, 197, 197, 197, - 213, 197, 197, 197, 207, 197, 202, 203, - 204, 197, 197, 197, 213, 197, 197, 197, - 207, 197, 249, 197, 197, 250, 203, 204, - 197, 203, 204, 197, 203, 251, 197, 203, - 197, 249, 197, 197, 197, 203, 204, 197, - 252, 197, 253, 254, 197, 202, 203, 204, - 197, 197, 3, 197, 197, 197, 197, 207, + 197, 197, 207, 197, 245, 241, 246, 246, + 5, 202, 203, 204, 197, 197, 197, 244, + 197, 197, 206, 197, 197, 197, 197, 197, + 197, 197, 197, 197, 197, 197, 197, 197, + 207, 197, 241, 246, 246, 5, 202, 203, + 204, 197, 197, 197, 244, 197, 197, 206, + 197, 197, 197, 197, 197, 197, 197, 197, + 197, 197, 197, 197, 197, 207, 197, 18, + 247, 197, 202, 203, 204, 197, 197, 197, + 212, 197, 202, 203, 204, 197, 197, 197, + 212, 197, 248, 197, 197, 249, 203, 204, + 197, 203, 204, 197, 250, 197, 203, 251, + 197, 203, 252, 197, 203, 197, 248, 197, + 197, 197, 203, 204, 197, 253, 197, 254, + 255, 197, 202, 203, 204, 197, 197, 3, 197, 2, 197, 197, 197, 197, 202, 203, - 204, 197, 197, 197, 197, 197, 197, 197, - 207, 197, 202, 203, 204, 197, 197, 197, - 197, 197, 197, 197, 207, 197, 255, 197, - 197, 197, 197, 202, 203, 204, 197, 202, - 203, 204, 197, 252, 197, 197, 197, 197, - 202, 203, 204, 197, 197, 197, 197, 197, - 197, 197, 207, 197, 252, 197, 253, 197, - 197, 202, 203, 204, 197, 197, 3, 197, - 197, 197, 197, 207, 197, 18, 197, 256, - 256, 5, 202, 203, 204, 197, 197, 197, - 213, 197, 197, 197, 207, 197, 257, 27, - 258, 259, 8, 202, 203, 204, 197, 197, - 197, 213, 197, 197, 197, 207, 197, 27, - 258, 259, 8, 202, 203, 204, 197, 197, - 197, 213, 197, 197, 197, 207, 197, 258, - 258, 8, 202, 203, 204, 197, 197, 197, - 213, 197, 197, 197, 207, 197, 260, 24, - 261, 262, 11, 202, 203, 204, 197, 197, - 197, 213, 197, 197, 197, 207, 197, 24, - 261, 262, 11, 202, 203, 204, 197, 197, - 197, 213, 197, 197, 197, 207, 197, 261, - 261, 11, 202, 203, 204, 197, 197, 197, - 213, 197, 197, 197, 207, 197, 263, 21, - 264, 265, 14, 202, 203, 204, 197, 197, - 197, 213, 197, 197, 197, 207, 197, 21, - 264, 265, 14, 202, 203, 204, 197, 197, - 197, 213, 197, 197, 197, 207, 197, 264, - 264, 14, 202, 203, 204, 197, 197, 197, - 213, 197, 197, 197, 207, 197, 266, 18, - 197, 267, 197, 202, 203, 204, 197, 197, - 197, 213, 197, 197, 197, 207, 197, 18, - 197, 267, 197, 202, 203, 204, 197, 197, - 197, 213, 197, 197, 197, 207, 197, 268, - 197, 202, 203, 204, 197, 197, 197, 213, - 197, 197, 197, 207, 197, 18, 197, 197, - 197, 197, 202, 203, 204, 197, 197, 197, - 213, 197, 197, 197, 207, 197, 1, 2, - 197, 197, 18, 248, 197, 202, 203, 204, - 197, 197, 197, 213, 197, 1, 197, 207, - 197, 242, 247, 247, 5, 202, 203, 204, - 197, 197, 197, 245, 197, 197, 197, 207, + 204, 197, 202, 203, 204, 197, 253, 197, + 197, 197, 197, 202, 203, 204, 197, 253, + 197, 254, 197, 197, 202, 203, 204, 197, + 197, 3, 197, 18, 197, 256, 256, 5, + 202, 203, 204, 197, 197, 197, 212, 197, + 257, 27, 258, 259, 8, 202, 203, 204, + 197, 197, 197, 212, 197, 27, 258, 259, + 8, 202, 203, 204, 197, 197, 197, 212, + 197, 258, 258, 8, 202, 203, 204, 197, + 197, 197, 212, 197, 260, 24, 261, 262, + 11, 202, 203, 204, 197, 197, 197, 212, + 197, 24, 261, 262, 11, 202, 203, 204, + 197, 197, 197, 212, 197, 261, 261, 11, + 202, 203, 204, 197, 197, 197, 212, 197, + 263, 21, 264, 265, 14, 202, 203, 204, + 197, 197, 197, 212, 197, 21, 264, 265, + 14, 202, 203, 204, 197, 197, 197, 212, + 197, 264, 264, 14, 202, 203, 204, 197, + 197, 197, 212, 197, 266, 18, 197, 267, + 197, 202, 203, 204, 197, 197, 197, 212, + 197, 18, 197, 267, 197, 202, 203, 204, + 197, 197, 197, 212, 197, 268, 197, 202, + 203, 204, 197, 197, 197, 212, 197, 18, + 197, 197, 197, 197, 202, 203, 204, 197, + 197, 197, 212, 197, 1, 2, 197, 197, + 18, 247, 197, 202, 203, 204, 197, 197, + 197, 212, 197, 1, 197, 241, 246, 246, + 5, 202, 203, 204, 197, 197, 197, 244, 197, 197, 197, 197, 197, 197, 197, 197, - 197, 197, 197, 197, 208, 197, 242, 247, - 247, 5, 202, 203, 204, 197, 197, 197, - 245, 197, 197, 197, 207, 197, 241, 242, - 247, 247, 5, 202, 203, 204, 197, 197, - 197, 245, 197, 197, 206, 207, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, - 197, 197, 208, 197, 241, 242, 243, 247, - 5, 202, 203, 204, 197, 197, 29, 245, - 197, 197, 206, 207, 197, 197, 197, 197, + 207, 197, 241, 246, 246, 5, 202, 203, + 204, 197, 197, 197, 244, 197, 240, 241, + 246, 246, 5, 202, 203, 204, 197, 197, + 197, 244, 197, 197, 206, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, - 208, 197, 239, 197, 269, 197, 256, 256, - 5, 202, 203, 204, 197, 197, 197, 213, - 197, 239, 197, 207, 197, 239, 197, 197, - 197, 197, 197, 197, 202, 203, 204, 197, - 197, 197, 213, 197, 239, 197, 207, 197, - 239, 197, 197, 197, 197, 270, 197, 202, - 203, 204, 197, 197, 197, 213, 197, 239, - 197, 207, 197, 239, 197, 269, 197, 197, + 197, 197, 207, 197, 240, 241, 242, 246, + 5, 202, 203, 204, 197, 197, 29, 244, + 197, 197, 206, 197, 197, 197, 197, 197, + 197, 197, 197, 197, 197, 197, 197, 197, + 207, 197, 238, 197, 269, 197, 256, 256, + 5, 202, 203, 204, 197, 197, 197, 212, + 197, 238, 197, 238, 197, 197, 197, 197, 197, 197, 202, 203, 204, 197, 197, 197, - 213, 197, 239, 197, 207, 197, 239, 2, - 197, 197, 18, 240, 197, 202, 203, 204, - 197, 197, 197, 213, 197, 239, 197, 207, - 197, 232, 233, 238, 238, 5, 202, 203, - 204, 197, 197, 197, 236, 197, 197, 206, - 207, 197, 197, 197, 197, 197, 197, 197, - 197, 197, 197, 197, 197, 208, 197, 232, - 233, 234, 238, 5, 202, 203, 204, 197, - 197, 31, 236, 197, 197, 206, 207, 197, + 212, 197, 238, 197, 238, 197, 197, 197, + 197, 270, 197, 202, 203, 204, 197, 197, + 197, 212, 197, 238, 197, 238, 197, 269, + 197, 197, 197, 197, 202, 203, 204, 197, + 197, 197, 212, 197, 238, 197, 238, 2, + 197, 197, 18, 239, 197, 202, 203, 204, + 197, 197, 197, 212, 197, 238, 197, 231, + 232, 237, 237, 5, 202, 203, 204, 197, + 197, 197, 235, 197, 197, 206, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, - 197, 197, 197, 208, 197, 230, 197, 271, - 197, 256, 256, 5, 202, 203, 204, 197, - 197, 197, 213, 197, 230, 197, 207, 197, - 230, 197, 197, 197, 197, 197, 197, 202, - 203, 204, 197, 197, 197, 213, 197, 230, - 197, 207, 197, 230, 197, 197, 197, 197, - 272, 197, 202, 203, 204, 197, 197, 197, - 213, 197, 230, 197, 207, 197, 230, 197, + 197, 197, 197, 207, 197, 231, 232, 233, + 237, 5, 202, 203, 204, 197, 197, 31, + 235, 197, 197, 206, 197, 197, 197, 197, + 197, 197, 197, 197, 197, 197, 197, 197, + 197, 207, 197, 229, 197, 271, 197, 256, + 256, 5, 202, 203, 204, 197, 197, 197, + 212, 197, 229, 197, 229, 197, 197, 197, + 197, 197, 197, 202, 203, 204, 197, 197, + 197, 212, 197, 229, 197, 229, 197, 197, + 197, 197, 272, 197, 202, 203, 204, 197, + 197, 197, 212, 197, 229, 197, 229, 197, 271, 197, 197, 197, 197, 202, 203, 204, - 197, 197, 197, 213, 197, 230, 197, 207, - 197, 230, 2, 197, 197, 18, 231, 197, - 202, 203, 204, 197, 197, 197, 213, 197, - 230, 197, 207, 197, 223, 224, 229, 229, - 5, 202, 203, 204, 197, 197, 197, 227, - 197, 197, 206, 207, 197, 197, 197, 197, + 197, 197, 197, 212, 197, 229, 197, 229, + 2, 197, 197, 18, 230, 197, 202, 203, + 204, 197, 197, 197, 212, 197, 229, 197, + 222, 223, 228, 228, 5, 202, 203, 204, + 197, 197, 197, 226, 197, 197, 206, 197, 197, 197, 197, 197, 197, 197, 197, 197, - 208, 197, 223, 224, 225, 229, 5, 202, - 203, 204, 197, 197, 33, 227, 197, 197, - 206, 207, 197, 197, 197, 197, 197, 197, - 197, 197, 197, 197, 197, 197, 208, 197, - 221, 197, 273, 197, 256, 256, 5, 202, - 203, 204, 197, 197, 197, 213, 197, 221, - 197, 207, 197, 221, 197, 197, 197, 197, - 197, 197, 202, 203, 204, 197, 197, 197, - 213, 197, 221, 197, 207, 197, 221, 197, + 197, 197, 197, 197, 207, 197, 222, 223, + 224, 228, 5, 202, 203, 204, 197, 197, + 33, 226, 197, 197, 206, 197, 197, 197, + 197, 197, 197, 197, 197, 197, 197, 197, + 197, 197, 207, 197, 220, 197, 273, 197, + 256, 256, 5, 202, 203, 204, 197, 197, + 197, 212, 197, 220, 197, 220, 197, 197, + 197, 197, 197, 197, 202, 203, 204, 197, + 197, 197, 212, 197, 220, 197, 220, 197, 197, 197, 197, 274, 197, 202, 203, 204, - 197, 197, 197, 213, 197, 221, 197, 207, - 197, 221, 197, 273, 197, 197, 197, 197, - 202, 203, 204, 197, 197, 197, 213, 197, - 221, 197, 207, 197, 221, 2, 197, 197, - 18, 222, 197, 202, 203, 204, 197, 197, - 197, 213, 197, 221, 197, 207, 197, 214, - 215, 220, 220, 5, 202, 203, 204, 197, - 197, 197, 218, 197, 197, 206, 207, 197, + 197, 197, 197, 212, 197, 220, 197, 220, + 197, 273, 197, 197, 197, 197, 202, 203, + 204, 197, 197, 197, 212, 197, 220, 197, + 220, 2, 197, 197, 18, 221, 197, 202, + 203, 204, 197, 197, 197, 212, 197, 220, + 197, 213, 214, 219, 219, 5, 202, 203, + 204, 197, 197, 197, 217, 197, 197, 206, 197, 197, 197, 197, 197, 197, 197, 197, - 197, 197, 197, 208, 197, 214, 215, 216, - 220, 5, 202, 203, 204, 197, 197, 35, - 218, 197, 197, 206, 207, 197, 197, 197, + 197, 197, 197, 197, 197, 207, 197, 213, + 214, 215, 219, 5, 202, 203, 204, 197, + 197, 35, 217, 197, 197, 206, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, - 197, 208, 197, 211, 197, 275, 197, 256, - 256, 5, 202, 203, 204, 197, 197, 197, - 213, 197, 211, 197, 207, 197, 211, 197, + 197, 197, 197, 207, 197, 210, 197, 275, + 197, 256, 256, 5, 202, 203, 204, 197, + 197, 197, 212, 197, 210, 197, 210, 197, 197, 197, 197, 197, 197, 202, 203, 204, - 197, 197, 197, 213, 197, 211, 197, 207, - 197, 211, 197, 197, 197, 197, 276, 197, - 202, 203, 204, 197, 197, 197, 213, 197, - 211, 197, 207, 197, 211, 197, 275, 197, - 197, 197, 197, 202, 203, 204, 197, 197, - 197, 213, 197, 211, 197, 207, 197, 211, - 2, 197, 197, 18, 212, 197, 202, 203, - 204, 197, 197, 197, 213, 197, 211, 197, - 207, 197, 198, 199, 210, 210, 5, 202, + 197, 197, 197, 212, 197, 210, 197, 210, + 197, 197, 197, 197, 276, 197, 202, 203, + 204, 197, 197, 197, 212, 197, 210, 197, + 210, 197, 275, 197, 197, 197, 197, 202, + 203, 204, 197, 197, 197, 212, 197, 210, + 197, 210, 2, 197, 197, 18, 211, 197, + 202, 203, 204, 197, 197, 197, 212, 197, + 210, 197, 198, 199, 209, 209, 5, 202, 203, 204, 197, 197, 197, 205, 197, 197, - 206, 207, 197, 197, 197, 197, 197, 197, - 197, 197, 197, 197, 197, 197, 208, 197, - 198, 199, 200, 210, 5, 202, 203, 204, - 197, 197, 37, 205, 197, 197, 206, 207, + 206, 197, 197, 197, 197, 197, 197, 197, + 197, 197, 197, 197, 197, 197, 207, 197, + 198, 199, 200, 209, 5, 202, 203, 204, + 197, 197, 37, 205, 197, 197, 206, 197, 197, 197, 197, 197, 197, 197, 197, 197, - 197, 197, 197, 197, 208, 197, 278, 279, + 197, 197, 197, 197, 207, 197, 278, 279, 280, 281, 43, 282, 283, 284, 277, 277, - 75, 285, 277, 277, 286, 287, 277, 277, + 75, 285, 277, 277, 286, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 288, 277, 289, 279, 290, 281, + 277, 277, 287, 277, 288, 279, 289, 281, 43, 282, 283, 284, 277, 277, 277, 285, - 277, 277, 286, 287, 277, 277, 277, 277, + 277, 277, 286, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - 288, 277, 279, 290, 281, 43, 282, 283, + 287, 277, 279, 289, 281, 43, 282, 283, 284, 277, 277, 277, 285, 277, 277, 286, - 287, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 277, 288, 277, 291, - 277, 277, 277, 56, 292, 277, 282, 283, - 284, 277, 277, 277, 293, 277, 291, 277, - 287, 277, 294, 295, 296, 297, 43, 282, - 283, 284, 277, 277, 73, 298, 277, 277, - 286, 287, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 277, 277, 288, 277, - 299, 295, 300, 300, 43, 282, 283, 284, - 277, 277, 277, 298, 277, 277, 286, 287, 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 288, 277, 295, 300, - 300, 43, 282, 283, 284, 277, 277, 277, - 298, 277, 277, 286, 287, 277, 277, 277, + 277, 277, 277, 277, 277, 287, 277, 290, + 277, 277, 277, 56, 291, 277, 282, 283, + 284, 277, 277, 277, 292, 277, 290, 277, + 293, 294, 295, 296, 43, 282, 283, 284, + 277, 277, 73, 297, 277, 277, 286, 277, + 277, 277, 277, 277, 277, 277, 277, 277, + 277, 277, 277, 277, 287, 277, 298, 294, + 299, 299, 43, 282, 283, 284, 277, 277, + 277, 297, 277, 277, 286, 277, 277, 277, + 277, 277, 277, 277, 277, 277, 277, 277, + 277, 277, 287, 277, 294, 299, 299, 43, + 282, 283, 284, 277, 277, 277, 297, 277, + 277, 286, 277, 277, 277, 277, 277, 277, + 277, 277, 277, 277, 277, 277, 277, 287, + 277, 300, 277, 277, 277, 56, 301, 277, + 282, 283, 284, 277, 277, 277, 292, 277, + 300, 277, 302, 303, 304, 305, 43, 282, + 283, 284, 277, 277, 71, 306, 277, 277, + 286, 277, 277, 277, 277, 277, 277, 277, + 277, 277, 277, 277, 277, 277, 287, 277, + 307, 303, 308, 308, 43, 282, 283, 284, + 277, 277, 277, 306, 277, 277, 286, 277, 277, 277, 277, 277, 277, 277, 277, 277, - 277, 288, 277, 301, 277, 277, 277, 56, - 302, 277, 282, 283, 284, 277, 277, 277, - 293, 277, 301, 277, 287, 277, 303, 304, - 305, 306, 43, 282, 283, 284, 277, 277, - 71, 307, 277, 277, 286, 287, 277, 277, + 277, 277, 277, 277, 287, 277, 303, 308, + 308, 43, 282, 283, 284, 277, 277, 277, + 306, 277, 277, 286, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 288, 277, 308, 304, 309, 309, - 43, 282, 283, 284, 277, 277, 277, 307, - 277, 277, 286, 287, 277, 277, 277, 277, + 277, 287, 277, 309, 277, 277, 277, 56, + 310, 277, 282, 283, 284, 277, 277, 277, + 292, 277, 309, 277, 311, 312, 313, 314, + 43, 282, 283, 284, 277, 277, 69, 315, + 277, 277, 286, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - 288, 277, 304, 309, 309, 43, 282, 283, - 284, 277, 277, 277, 307, 277, 277, 286, - 287, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 277, 288, 277, 310, - 277, 277, 277, 56, 311, 277, 282, 283, - 284, 277, 277, 277, 293, 277, 310, 277, - 287, 277, 312, 313, 314, 315, 43, 282, - 283, 284, 277, 277, 69, 316, 277, 277, - 286, 287, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 277, 277, 288, 277, - 317, 313, 318, 318, 43, 282, 283, 284, - 277, 277, 277, 316, 277, 277, 286, 287, + 287, 277, 316, 312, 317, 317, 43, 282, + 283, 284, 277, 277, 277, 315, 277, 277, + 286, 277, 277, 277, 277, 277, 277, 277, + 277, 277, 277, 277, 277, 277, 287, 277, + 312, 317, 317, 43, 282, 283, 284, 277, + 277, 277, 315, 277, 277, 286, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 288, 277, 313, 318, - 318, 43, 282, 283, 284, 277, 277, 277, - 316, 277, 277, 286, 287, 277, 277, 277, + 277, 277, 277, 287, 277, 318, 277, 277, + 277, 56, 319, 277, 282, 283, 284, 277, + 277, 277, 292, 277, 318, 277, 320, 321, + 322, 323, 43, 282, 283, 284, 277, 277, + 67, 324, 277, 277, 286, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - 277, 288, 277, 319, 277, 277, 277, 56, - 320, 277, 282, 283, 284, 277, 277, 277, - 293, 277, 319, 277, 287, 277, 321, 322, - 323, 324, 43, 282, 283, 284, 277, 277, - 67, 325, 277, 277, 286, 287, 277, 277, + 277, 277, 287, 277, 325, 321, 326, 326, + 43, 282, 283, 284, 277, 277, 277, 324, + 277, 277, 286, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 288, 277, 326, 322, 327, 327, - 43, 282, 283, 284, 277, 277, 277, 325, - 277, 277, 286, 287, 277, 277, 277, 277, + 287, 277, 321, 326, 326, 43, 282, 283, + 284, 277, 277, 277, 324, 277, 277, 286, 277, 277, 277, 277, 277, 277, 277, 277, - 288, 277, 322, 327, 327, 43, 282, 283, - 284, 277, 277, 277, 325, 277, 277, 286, - 287, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 277, 288, 277, 56, - 328, 277, 282, 283, 284, 277, 277, 277, - 293, 277, 277, 277, 287, 277, 282, 283, - 284, 277, 277, 277, 293, 277, 277, 277, - 287, 277, 329, 277, 277, 330, 283, 284, - 277, 283, 284, 277, 283, 331, 277, 283, - 277, 329, 277, 277, 277, 283, 284, 277, - 332, 277, 333, 334, 277, 282, 283, 284, - 277, 277, 41, 277, 277, 277, 277, 287, + 277, 277, 277, 277, 277, 287, 277, 56, + 327, 277, 282, 283, 284, 277, 277, 277, + 292, 277, 282, 283, 284, 277, 277, 277, + 292, 277, 328, 277, 277, 329, 283, 284, + 277, 283, 284, 277, 330, 277, 283, 331, + 277, 283, 332, 277, 283, 277, 328, 277, + 277, 277, 283, 284, 277, 333, 277, 334, + 335, 277, 282, 283, 284, 277, 277, 41, 277, 40, 277, 277, 277, 277, 282, 283, - 284, 277, 277, 277, 277, 277, 277, 277, - 287, 277, 282, 283, 284, 277, 277, 277, - 277, 277, 277, 277, 287, 277, 335, 277, - 277, 277, 277, 282, 283, 284, 277, 282, - 283, 284, 277, 332, 277, 277, 277, 277, - 282, 283, 284, 277, 277, 277, 277, 277, - 277, 277, 287, 277, 332, 277, 333, 277, - 277, 282, 283, 284, 277, 277, 41, 277, - 277, 277, 277, 287, 277, 56, 277, 336, - 336, 43, 282, 283, 284, 277, 277, 277, - 293, 277, 277, 277, 287, 277, 337, 65, - 338, 339, 46, 282, 283, 284, 277, 277, - 277, 293, 277, 277, 277, 287, 277, 65, - 338, 339, 46, 282, 283, 284, 277, 277, - 277, 293, 277, 277, 277, 287, 277, 338, - 338, 46, 282, 283, 284, 277, 277, 277, - 293, 277, 277, 277, 287, 277, 340, 62, - 341, 342, 49, 282, 283, 284, 277, 277, - 277, 293, 277, 277, 277, 287, 277, 62, - 341, 342, 49, 282, 283, 284, 277, 277, - 277, 293, 277, 277, 277, 287, 277, 341, - 341, 49, 282, 283, 284, 277, 277, 277, - 293, 277, 277, 277, 287, 277, 343, 59, - 344, 345, 52, 282, 283, 284, 277, 277, - 277, 293, 277, 277, 277, 287, 277, 59, - 344, 345, 52, 282, 283, 284, 277, 277, - 277, 293, 277, 277, 277, 287, 277, 344, - 344, 52, 282, 283, 284, 277, 277, 277, - 293, 277, 277, 277, 287, 277, 346, 56, - 277, 347, 277, 282, 283, 284, 277, 277, - 277, 293, 277, 277, 277, 287, 277, 56, - 277, 347, 277, 282, 283, 284, 277, 277, - 277, 293, 277, 277, 277, 287, 277, 348, - 277, 282, 283, 284, 277, 277, 277, 293, - 277, 277, 277, 287, 277, 56, 277, 277, - 277, 277, 282, 283, 284, 277, 277, 277, - 293, 277, 277, 277, 287, 277, 39, 40, - 277, 277, 56, 328, 277, 282, 283, 284, - 277, 277, 277, 293, 277, 39, 277, 287, - 277, 322, 327, 327, 43, 282, 283, 284, - 277, 277, 277, 325, 277, 277, 277, 287, + 284, 277, 282, 283, 284, 277, 333, 277, + 277, 277, 277, 282, 283, 284, 277, 333, + 277, 334, 277, 277, 282, 283, 284, 277, + 277, 41, 277, 56, 277, 336, 336, 43, + 282, 283, 284, 277, 277, 277, 292, 277, + 337, 65, 338, 339, 46, 282, 283, 284, + 277, 277, 277, 292, 277, 65, 338, 339, + 46, 282, 283, 284, 277, 277, 277, 292, + 277, 338, 338, 46, 282, 283, 284, 277, + 277, 277, 292, 277, 340, 62, 341, 342, + 49, 282, 283, 284, 277, 277, 277, 292, + 277, 62, 341, 342, 49, 282, 283, 284, + 277, 277, 277, 292, 277, 341, 341, 49, + 282, 283, 284, 277, 277, 277, 292, 277, + 343, 59, 344, 345, 52, 282, 283, 284, + 277, 277, 277, 292, 277, 59, 344, 345, + 52, 282, 283, 284, 277, 277, 277, 292, + 277, 344, 344, 52, 282, 283, 284, 277, + 277, 277, 292, 277, 346, 56, 277, 347, + 277, 282, 283, 284, 277, 277, 277, 292, + 277, 56, 277, 347, 277, 282, 283, 284, + 277, 277, 277, 292, 277, 348, 277, 282, + 283, 284, 277, 277, 277, 292, 277, 56, + 277, 277, 277, 277, 282, 283, 284, 277, + 277, 277, 292, 277, 39, 40, 277, 277, + 56, 327, 277, 282, 283, 284, 277, 277, + 277, 292, 277, 39, 277, 321, 326, 326, + 43, 282, 283, 284, 277, 277, 277, 324, 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 288, 277, 322, 327, - 327, 43, 282, 283, 284, 277, 277, 277, - 325, 277, 277, 277, 287, 277, 321, 322, - 327, 327, 43, 282, 283, 284, 277, 277, - 277, 325, 277, 277, 286, 287, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 288, 277, 321, 322, 323, 327, - 43, 282, 283, 284, 277, 277, 67, 325, - 277, 277, 286, 287, 277, 277, 277, 277, + 287, 277, 321, 326, 326, 43, 282, 283, + 284, 277, 277, 277, 324, 277, 320, 321, + 326, 326, 43, 282, 283, 284, 277, 277, + 277, 324, 277, 277, 286, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - 288, 277, 319, 277, 349, 277, 336, 336, - 43, 282, 283, 284, 277, 277, 277, 293, - 277, 319, 277, 287, 277, 319, 277, 277, - 277, 277, 277, 277, 282, 283, 284, 277, - 277, 277, 293, 277, 319, 277, 287, 277, - 319, 277, 277, 277, 277, 350, 277, 282, - 283, 284, 277, 277, 277, 293, 277, 319, - 277, 287, 277, 319, 277, 349, 277, 277, + 277, 277, 287, 277, 320, 321, 322, 326, + 43, 282, 283, 284, 277, 277, 67, 324, + 277, 277, 286, 277, 277, 277, 277, 277, + 277, 277, 277, 277, 277, 277, 277, 277, + 287, 277, 318, 277, 349, 277, 336, 336, + 43, 282, 283, 284, 277, 277, 277, 292, + 277, 318, 277, 318, 277, 277, 277, 277, 277, 277, 282, 283, 284, 277, 277, 277, - 293, 277, 319, 277, 287, 277, 319, 40, - 277, 277, 56, 320, 277, 282, 283, 284, - 277, 277, 277, 293, 277, 319, 277, 287, - 277, 312, 313, 318, 318, 43, 282, 283, - 284, 277, 277, 277, 316, 277, 277, 286, - 287, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 277, 288, 277, 312, - 313, 314, 318, 43, 282, 283, 284, 277, - 277, 69, 316, 277, 277, 286, 287, 277, + 292, 277, 318, 277, 318, 277, 277, 277, + 277, 350, 277, 282, 283, 284, 277, 277, + 277, 292, 277, 318, 277, 318, 277, 349, + 277, 277, 277, 277, 282, 283, 284, 277, + 277, 277, 292, 277, 318, 277, 318, 40, + 277, 277, 56, 319, 277, 282, 283, 284, + 277, 277, 277, 292, 277, 318, 277, 311, + 312, 317, 317, 43, 282, 283, 284, 277, + 277, 277, 315, 277, 277, 286, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 288, 277, 310, 277, 351, - 277, 336, 336, 43, 282, 283, 284, 277, - 277, 277, 293, 277, 310, 277, 287, 277, - 310, 277, 277, 277, 277, 277, 277, 282, - 283, 284, 277, 277, 277, 293, 277, 310, - 277, 287, 277, 310, 277, 277, 277, 277, - 352, 277, 282, 283, 284, 277, 277, 277, - 293, 277, 310, 277, 287, 277, 310, 277, + 277, 277, 277, 287, 277, 311, 312, 313, + 317, 43, 282, 283, 284, 277, 277, 69, + 315, 277, 277, 286, 277, 277, 277, 277, + 277, 277, 277, 277, 277, 277, 277, 277, + 277, 287, 277, 309, 277, 351, 277, 336, + 336, 43, 282, 283, 284, 277, 277, 277, + 292, 277, 309, 277, 309, 277, 277, 277, + 277, 277, 277, 282, 283, 284, 277, 277, + 277, 292, 277, 309, 277, 309, 277, 277, + 277, 277, 352, 277, 282, 283, 284, 277, + 277, 277, 292, 277, 309, 277, 309, 277, 351, 277, 277, 277, 277, 282, 283, 284, - 277, 277, 277, 293, 277, 310, 277, 287, - 277, 310, 40, 277, 277, 56, 311, 277, - 282, 283, 284, 277, 277, 277, 293, 277, - 310, 277, 287, 277, 303, 304, 309, 309, - 43, 282, 283, 284, 277, 277, 277, 307, - 277, 277, 286, 287, 277, 277, 277, 277, + 277, 277, 277, 292, 277, 309, 277, 309, + 40, 277, 277, 56, 310, 277, 282, 283, + 284, 277, 277, 277, 292, 277, 309, 277, + 302, 303, 308, 308, 43, 282, 283, 284, + 277, 277, 277, 306, 277, 277, 286, 277, 277, 277, 277, 277, 277, 277, 277, 277, - 288, 277, 303, 304, 305, 309, 43, 282, - 283, 284, 277, 277, 71, 307, 277, 277, - 286, 287, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 277, 277, 288, 277, - 301, 277, 353, 277, 336, 336, 43, 282, - 283, 284, 277, 277, 277, 293, 277, 301, - 277, 287, 277, 301, 277, 277, 277, 277, - 277, 277, 282, 283, 284, 277, 277, 277, - 293, 277, 301, 277, 287, 277, 301, 277, + 277, 277, 277, 277, 287, 277, 302, 303, + 304, 308, 43, 282, 283, 284, 277, 277, + 71, 306, 277, 277, 286, 277, 277, 277, + 277, 277, 277, 277, 277, 277, 277, 277, + 277, 277, 287, 277, 300, 277, 353, 277, + 336, 336, 43, 282, 283, 284, 277, 277, + 277, 292, 277, 300, 277, 300, 277, 277, + 277, 277, 277, 277, 282, 283, 284, 277, + 277, 277, 292, 277, 300, 277, 300, 277, 277, 277, 277, 354, 277, 282, 283, 284, - 277, 277, 277, 293, 277, 301, 277, 287, - 277, 301, 277, 353, 277, 277, 277, 277, - 282, 283, 284, 277, 277, 277, 293, 277, - 301, 277, 287, 277, 301, 40, 277, 277, - 56, 302, 277, 282, 283, 284, 277, 277, - 277, 293, 277, 301, 277, 287, 277, 294, - 295, 300, 300, 43, 282, 283, 284, 277, - 277, 277, 298, 277, 277, 286, 287, 277, + 277, 277, 277, 292, 277, 300, 277, 300, + 277, 353, 277, 277, 277, 277, 282, 283, + 284, 277, 277, 277, 292, 277, 300, 277, + 300, 40, 277, 277, 56, 301, 277, 282, + 283, 284, 277, 277, 277, 292, 277, 300, + 277, 293, 294, 299, 299, 43, 282, 283, + 284, 277, 277, 277, 297, 277, 277, 286, 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 288, 277, 294, 295, 296, - 300, 43, 282, 283, 284, 277, 277, 73, - 298, 277, 277, 286, 287, 277, 277, 277, + 277, 277, 277, 277, 277, 287, 277, 293, + 294, 295, 299, 43, 282, 283, 284, 277, + 277, 73, 297, 277, 277, 286, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - 277, 288, 277, 291, 277, 355, 277, 336, - 336, 43, 282, 283, 284, 277, 277, 277, - 293, 277, 291, 277, 287, 277, 291, 277, + 277, 277, 277, 287, 277, 290, 277, 355, + 277, 336, 336, 43, 282, 283, 284, 277, + 277, 277, 292, 277, 290, 277, 290, 277, 277, 277, 277, 277, 277, 282, 283, 284, - 277, 277, 277, 293, 277, 291, 277, 287, - 277, 291, 277, 277, 277, 277, 356, 277, - 282, 283, 284, 277, 277, 277, 293, 277, - 291, 277, 287, 277, 291, 277, 355, 277, - 277, 277, 277, 282, 283, 284, 277, 277, - 277, 293, 277, 291, 277, 287, 277, 74, - 42, 42, 43, 277, 277, 277, 277, 277, - 277, 74, 277, 291, 40, 277, 277, 56, - 292, 277, 282, 283, 284, 277, 277, 277, - 293, 277, 291, 277, 287, 277, 278, 279, - 290, 281, 43, 282, 283, 284, 277, 277, - 277, 285, 277, 277, 286, 287, 277, 277, + 277, 277, 277, 292, 277, 290, 277, 290, + 277, 277, 277, 277, 356, 277, 282, 283, + 284, 277, 277, 277, 292, 277, 290, 277, + 290, 277, 355, 277, 277, 277, 277, 282, + 283, 284, 277, 277, 277, 292, 277, 290, + 277, 74, 42, 42, 43, 277, 277, 277, + 277, 277, 277, 74, 277, 290, 40, 277, + 277, 56, 291, 277, 282, 283, 284, 277, + 277, 277, 292, 277, 290, 277, 278, 279, + 289, 281, 43, 282, 283, 284, 277, 277, + 277, 285, 277, 277, 286, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 288, 277, 358, 184, 359, 359, + 277, 277, 287, 277, 358, 184, 359, 359, 81, 187, 188, 189, 357, 357, 357, 191, - 357, 357, 194, 360, 357, 357, 357, 357, + 357, 357, 194, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 196, 357, 184, 359, 359, 81, 187, 188, 189, 357, 357, 357, 191, 357, 357, 194, - 360, 357, 357, 357, 357, 357, 357, 357, - 357, 357, 357, 357, 357, 196, 357, 361, - 357, 357, 357, 95, 362, 357, 187, 188, - 189, 357, 357, 357, 363, 357, 361, 357, - 360, 357, 364, 365, 366, 367, 81, 187, - 188, 189, 357, 357, 112, 368, 357, 357, - 194, 360, 357, 357, 357, 357, 357, 357, - 357, 357, 357, 357, 357, 357, 196, 357, - 369, 365, 370, 370, 81, 187, 188, 189, - 357, 357, 357, 368, 357, 357, 194, 360, 357, 357, 357, 357, 357, 357, 357, 357, - 357, 357, 357, 357, 196, 357, 365, 370, - 370, 81, 187, 188, 189, 357, 357, 357, - 368, 357, 357, 194, 360, 357, 357, 357, + 357, 357, 357, 357, 357, 196, 357, 360, + 357, 357, 357, 95, 361, 357, 187, 188, + 189, 357, 357, 357, 362, 357, 360, 357, + 363, 364, 365, 366, 81, 187, 188, 189, + 357, 357, 112, 367, 357, 357, 194, 357, + 357, 357, 357, 357, 357, 357, 357, 357, + 357, 357, 357, 357, 196, 357, 368, 364, + 369, 369, 81, 187, 188, 189, 357, 357, + 357, 367, 357, 357, 194, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, - 357, 196, 357, 371, 357, 357, 357, 95, - 372, 357, 187, 188, 189, 357, 357, 357, - 363, 357, 371, 357, 360, 357, 373, 374, - 375, 376, 81, 187, 188, 189, 357, 357, - 110, 377, 357, 357, 194, 360, 357, 357, + 357, 357, 196, 357, 364, 369, 369, 81, + 187, 188, 189, 357, 357, 357, 367, 357, + 357, 194, 357, 357, 357, 357, 357, 357, + 357, 357, 357, 357, 357, 357, 357, 196, + 357, 370, 357, 357, 357, 95, 371, 357, + 187, 188, 189, 357, 357, 357, 362, 357, + 370, 357, 372, 373, 374, 375, 81, 187, + 188, 189, 357, 357, 110, 376, 357, 357, + 194, 357, 357, 357, 357, 357, 357, 357, + 357, 357, 357, 357, 357, 357, 196, 357, + 377, 373, 378, 378, 81, 187, 188, 189, + 357, 357, 357, 376, 357, 357, 194, 357, + 357, 357, 357, 357, 357, 357, 357, 357, + 357, 357, 357, 357, 196, 357, 373, 378, + 378, 81, 187, 188, 189, 357, 357, 357, + 376, 357, 357, 194, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, - 357, 357, 196, 357, 378, 374, 379, 379, - 81, 187, 188, 189, 357, 357, 357, 377, - 357, 357, 194, 360, 357, 357, 357, 357, + 357, 196, 357, 379, 357, 357, 357, 95, + 380, 357, 187, 188, 189, 357, 357, 357, + 362, 357, 379, 357, 381, 382, 383, 384, + 81, 187, 188, 189, 357, 357, 108, 385, + 357, 357, 194, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, - 196, 357, 374, 379, 379, 81, 187, 188, - 189, 357, 357, 357, 377, 357, 357, 194, - 360, 357, 357, 357, 357, 357, 357, 357, - 357, 357, 357, 357, 357, 196, 357, 380, - 357, 357, 357, 95, 381, 357, 187, 188, - 189, 357, 357, 357, 363, 357, 380, 357, - 360, 357, 382, 383, 384, 385, 81, 187, - 188, 189, 357, 357, 108, 386, 357, 357, - 194, 360, 357, 357, 357, 357, 357, 357, + 196, 357, 386, 382, 387, 387, 81, 187, + 188, 189, 357, 357, 357, 385, 357, 357, + 194, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 196, 357, - 387, 383, 388, 388, 81, 187, 188, 189, - 357, 357, 357, 386, 357, 357, 194, 360, + 382, 387, 387, 81, 187, 188, 189, 357, + 357, 357, 385, 357, 357, 194, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, - 357, 357, 357, 357, 196, 357, 383, 388, - 388, 81, 187, 188, 189, 357, 357, 357, - 386, 357, 357, 194, 360, 357, 357, 357, + 357, 357, 357, 196, 357, 388, 357, 357, + 357, 95, 389, 357, 187, 188, 189, 357, + 357, 357, 362, 357, 388, 357, 390, 391, + 392, 393, 81, 187, 188, 189, 357, 357, + 106, 394, 357, 357, 194, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, - 357, 196, 357, 389, 357, 357, 357, 95, - 390, 357, 187, 188, 189, 357, 357, 357, - 363, 357, 389, 357, 360, 357, 391, 392, - 393, 394, 81, 187, 188, 189, 357, 357, - 106, 395, 357, 357, 194, 360, 357, 357, + 357, 357, 196, 357, 395, 391, 396, 396, + 81, 187, 188, 189, 357, 357, 357, 394, + 357, 357, 194, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, - 357, 357, 196, 357, 396, 392, 397, 397, - 81, 187, 188, 189, 357, 357, 357, 395, - 357, 357, 194, 360, 357, 357, 357, 357, + 196, 357, 391, 396, 396, 81, 187, 188, + 189, 357, 357, 357, 394, 357, 357, 194, 357, 357, 357, 357, 357, 357, 357, 357, - 196, 357, 392, 397, 397, 81, 187, 188, - 189, 357, 357, 357, 395, 357, 357, 194, - 360, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 196, 357, 95, - 398, 357, 187, 188, 189, 357, 357, 357, - 363, 357, 357, 357, 360, 357, 187, 188, - 189, 357, 357, 357, 363, 357, 357, 357, - 360, 357, 399, 357, 357, 400, 188, 189, - 357, 188, 189, 357, 188, 401, 357, 188, - 357, 399, 357, 357, 357, 188, 189, 357, - 402, 357, 403, 404, 357, 187, 188, 189, - 357, 357, 79, 357, 357, 357, 357, 360, + 397, 357, 187, 188, 189, 357, 357, 357, + 362, 357, 187, 188, 189, 357, 357, 357, + 362, 357, 398, 357, 357, 399, 188, 189, + 357, 188, 189, 357, 400, 357, 188, 401, + 357, 188, 402, 357, 188, 357, 398, 357, + 357, 357, 188, 189, 357, 403, 357, 404, + 405, 357, 187, 188, 189, 357, 357, 79, 357, 78, 357, 357, 357, 357, 187, 188, - 189, 357, 357, 357, 357, 357, 357, 357, - 360, 357, 187, 188, 189, 357, 357, 357, - 357, 357, 357, 357, 360, 357, 405, 357, - 357, 357, 357, 187, 188, 189, 357, 187, - 188, 189, 357, 402, 357, 357, 357, 357, - 187, 188, 189, 357, 357, 357, 357, 357, - 357, 357, 360, 357, 402, 357, 403, 357, - 357, 187, 188, 189, 357, 357, 79, 357, - 357, 357, 357, 360, 357, 95, 357, 406, - 406, 81, 187, 188, 189, 357, 357, 357, - 363, 357, 357, 357, 360, 357, 407, 104, - 408, 409, 85, 187, 188, 189, 357, 357, - 357, 363, 357, 357, 357, 360, 357, 104, - 408, 409, 85, 187, 188, 189, 357, 357, - 357, 363, 357, 357, 357, 360, 357, 408, - 408, 85, 187, 188, 189, 357, 357, 357, - 363, 357, 357, 357, 360, 357, 410, 101, - 411, 412, 88, 187, 188, 189, 357, 357, - 357, 363, 357, 357, 357, 360, 357, 101, - 411, 412, 88, 187, 188, 189, 357, 357, - 357, 363, 357, 357, 357, 360, 357, 411, - 411, 88, 187, 188, 189, 357, 357, 357, - 363, 357, 357, 357, 360, 357, 413, 98, - 414, 415, 91, 187, 188, 189, 357, 357, - 357, 363, 357, 357, 357, 360, 357, 98, - 414, 415, 91, 187, 188, 189, 357, 357, - 357, 363, 357, 357, 357, 360, 357, 414, - 414, 91, 187, 188, 189, 357, 357, 357, - 363, 357, 357, 357, 360, 357, 416, 95, - 357, 417, 357, 187, 188, 189, 357, 357, - 357, 363, 357, 357, 357, 360, 357, 95, - 357, 417, 357, 187, 188, 189, 357, 357, - 357, 363, 357, 357, 357, 360, 357, 418, - 357, 187, 188, 189, 357, 357, 357, 363, - 357, 357, 357, 360, 357, 95, 357, 357, - 357, 357, 187, 188, 189, 357, 357, 357, - 363, 357, 357, 357, 360, 357, 77, 78, - 357, 357, 95, 398, 357, 187, 188, 189, - 357, 357, 357, 363, 357, 77, 357, 360, - 357, 392, 397, 397, 81, 187, 188, 189, - 357, 357, 357, 395, 357, 357, 357, 360, + 189, 357, 187, 188, 189, 357, 403, 357, + 357, 357, 357, 187, 188, 189, 357, 403, + 357, 404, 357, 357, 187, 188, 189, 357, + 357, 79, 357, 95, 357, 406, 406, 81, + 187, 188, 189, 357, 357, 357, 362, 357, + 407, 104, 408, 409, 85, 187, 188, 189, + 357, 357, 357, 362, 357, 104, 408, 409, + 85, 187, 188, 189, 357, 357, 357, 362, + 357, 408, 408, 85, 187, 188, 189, 357, + 357, 357, 362, 357, 410, 101, 411, 412, + 88, 187, 188, 189, 357, 357, 357, 362, + 357, 101, 411, 412, 88, 187, 188, 189, + 357, 357, 357, 362, 357, 411, 411, 88, + 187, 188, 189, 357, 357, 357, 362, 357, + 413, 98, 414, 415, 91, 187, 188, 189, + 357, 357, 357, 362, 357, 98, 414, 415, + 91, 187, 188, 189, 357, 357, 357, 362, + 357, 414, 414, 91, 187, 188, 189, 357, + 357, 357, 362, 357, 416, 95, 357, 417, + 357, 187, 188, 189, 357, 357, 357, 362, + 357, 95, 357, 417, 357, 187, 188, 189, + 357, 357, 357, 362, 357, 418, 357, 187, + 188, 189, 357, 357, 357, 362, 357, 95, + 357, 357, 357, 357, 187, 188, 189, 357, + 357, 357, 362, 357, 77, 78, 357, 357, + 95, 397, 357, 187, 188, 189, 357, 357, + 357, 362, 357, 77, 357, 391, 396, 396, + 81, 187, 188, 189, 357, 357, 357, 394, 357, 357, 357, 357, 357, 357, 357, 357, - 357, 357, 357, 357, 196, 357, 392, 397, - 397, 81, 187, 188, 189, 357, 357, 357, - 395, 357, 357, 357, 360, 357, 391, 392, - 397, 397, 81, 187, 188, 189, 357, 357, - 357, 395, 357, 357, 194, 360, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, - 357, 357, 196, 357, 391, 392, 393, 397, - 81, 187, 188, 189, 357, 357, 106, 395, - 357, 357, 194, 360, 357, 357, 357, 357, + 196, 357, 391, 396, 396, 81, 187, 188, + 189, 357, 357, 357, 394, 357, 390, 391, + 396, 396, 81, 187, 188, 189, 357, 357, + 357, 394, 357, 357, 194, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, - 196, 357, 389, 357, 419, 357, 406, 406, - 81, 187, 188, 189, 357, 357, 357, 363, - 357, 389, 357, 360, 357, 389, 357, 357, - 357, 357, 357, 357, 187, 188, 189, 357, - 357, 357, 363, 357, 389, 357, 360, 357, - 389, 357, 357, 357, 357, 420, 357, 187, - 188, 189, 357, 357, 357, 363, 357, 389, - 357, 360, 357, 389, 357, 419, 357, 357, + 357, 357, 196, 357, 390, 391, 392, 396, + 81, 187, 188, 189, 357, 357, 106, 394, + 357, 357, 194, 357, 357, 357, 357, 357, + 357, 357, 357, 357, 357, 357, 357, 357, + 196, 357, 388, 357, 419, 357, 406, 406, + 81, 187, 188, 189, 357, 357, 357, 362, + 357, 388, 357, 388, 357, 357, 357, 357, 357, 357, 187, 188, 189, 357, 357, 357, - 363, 357, 389, 357, 360, 357, 389, 78, - 357, 357, 95, 390, 357, 187, 188, 189, - 357, 357, 357, 363, 357, 389, 357, 360, - 357, 382, 383, 388, 388, 81, 187, 188, - 189, 357, 357, 357, 386, 357, 357, 194, - 360, 357, 357, 357, 357, 357, 357, 357, - 357, 357, 357, 357, 357, 196, 357, 382, - 383, 384, 388, 81, 187, 188, 189, 357, - 357, 108, 386, 357, 357, 194, 360, 357, + 362, 357, 388, 357, 388, 357, 357, 357, + 357, 420, 357, 187, 188, 189, 357, 357, + 357, 362, 357, 388, 357, 388, 357, 419, + 357, 357, 357, 357, 187, 188, 189, 357, + 357, 357, 362, 357, 388, 357, 388, 78, + 357, 357, 95, 389, 357, 187, 188, 189, + 357, 357, 357, 362, 357, 388, 357, 381, + 382, 387, 387, 81, 187, 188, 189, 357, + 357, 357, 385, 357, 357, 194, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, - 357, 357, 357, 196, 357, 380, 357, 421, - 357, 406, 406, 81, 187, 188, 189, 357, - 357, 357, 363, 357, 380, 357, 360, 357, - 380, 357, 357, 357, 357, 357, 357, 187, - 188, 189, 357, 357, 357, 363, 357, 380, - 357, 360, 357, 380, 357, 357, 357, 357, - 422, 357, 187, 188, 189, 357, 357, 357, - 363, 357, 380, 357, 360, 357, 380, 357, + 357, 357, 357, 196, 357, 381, 382, 383, + 387, 81, 187, 188, 189, 357, 357, 108, + 385, 357, 357, 194, 357, 357, 357, 357, + 357, 357, 357, 357, 357, 357, 357, 357, + 357, 196, 357, 379, 357, 421, 357, 406, + 406, 81, 187, 188, 189, 357, 357, 357, + 362, 357, 379, 357, 379, 357, 357, 357, + 357, 357, 357, 187, 188, 189, 357, 357, + 357, 362, 357, 379, 357, 379, 357, 357, + 357, 357, 422, 357, 187, 188, 189, 357, + 357, 357, 362, 357, 379, 357, 379, 357, 421, 357, 357, 357, 357, 187, 188, 189, - 357, 357, 357, 363, 357, 380, 357, 360, - 357, 380, 78, 357, 357, 95, 381, 357, - 187, 188, 189, 357, 357, 357, 363, 357, - 380, 357, 360, 357, 373, 374, 379, 379, - 81, 187, 188, 189, 357, 357, 357, 377, - 357, 357, 194, 360, 357, 357, 357, 357, + 357, 357, 357, 362, 357, 379, 357, 379, + 78, 357, 357, 95, 380, 357, 187, 188, + 189, 357, 357, 357, 362, 357, 379, 357, + 372, 373, 378, 378, 81, 187, 188, 189, + 357, 357, 357, 376, 357, 357, 194, 357, 357, 357, 357, 357, 357, 357, 357, 357, - 196, 357, 373, 374, 375, 379, 81, 187, - 188, 189, 357, 357, 110, 377, 357, 357, - 194, 360, 357, 357, 357, 357, 357, 357, - 357, 357, 357, 357, 357, 357, 196, 357, - 371, 357, 423, 357, 406, 406, 81, 187, - 188, 189, 357, 357, 357, 363, 357, 371, - 357, 360, 357, 371, 357, 357, 357, 357, - 357, 357, 187, 188, 189, 357, 357, 357, - 363, 357, 371, 357, 360, 357, 371, 357, + 357, 357, 357, 357, 196, 357, 372, 373, + 374, 378, 81, 187, 188, 189, 357, 357, + 110, 376, 357, 357, 194, 357, 357, 357, + 357, 357, 357, 357, 357, 357, 357, 357, + 357, 357, 196, 357, 370, 357, 423, 357, + 406, 406, 81, 187, 188, 189, 357, 357, + 357, 362, 357, 370, 357, 370, 357, 357, + 357, 357, 357, 357, 187, 188, 189, 357, + 357, 357, 362, 357, 370, 357, 370, 357, 357, 357, 357, 424, 357, 187, 188, 189, - 357, 357, 357, 363, 357, 371, 357, 360, - 357, 371, 357, 423, 357, 357, 357, 357, - 187, 188, 189, 357, 357, 357, 363, 357, - 371, 357, 360, 357, 371, 78, 357, 357, - 95, 372, 357, 187, 188, 189, 357, 357, - 357, 363, 357, 371, 357, 360, 357, 364, - 365, 370, 370, 81, 187, 188, 189, 357, - 357, 357, 368, 357, 357, 194, 360, 357, + 357, 357, 357, 362, 357, 370, 357, 370, + 357, 423, 357, 357, 357, 357, 187, 188, + 189, 357, 357, 357, 362, 357, 370, 357, + 370, 78, 357, 357, 95, 371, 357, 187, + 188, 189, 357, 357, 357, 362, 357, 370, + 357, 363, 364, 369, 369, 81, 187, 188, + 189, 357, 357, 357, 367, 357, 357, 194, 357, 357, 357, 357, 357, 357, 357, 357, - 357, 357, 357, 196, 357, 364, 365, 366, - 370, 81, 187, 188, 189, 357, 357, 112, - 368, 357, 357, 194, 360, 357, 357, 357, + 357, 357, 357, 357, 357, 196, 357, 363, + 364, 365, 369, 81, 187, 188, 189, 357, + 357, 112, 367, 357, 357, 194, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, - 357, 196, 357, 361, 357, 425, 357, 406, - 406, 81, 187, 188, 189, 357, 357, 357, - 363, 357, 361, 357, 360, 357, 361, 357, + 357, 357, 357, 196, 357, 360, 357, 425, + 357, 406, 406, 81, 187, 188, 189, 357, + 357, 357, 362, 357, 360, 357, 360, 357, 357, 357, 357, 357, 357, 187, 188, 189, - 357, 357, 357, 363, 357, 361, 357, 360, - 357, 361, 357, 357, 357, 357, 426, 357, - 187, 188, 189, 357, 357, 357, 363, 357, - 361, 357, 360, 357, 361, 357, 425, 357, - 357, 357, 357, 187, 188, 189, 357, 357, - 357, 363, 357, 361, 357, 360, 357, 361, - 78, 357, 357, 95, 362, 357, 187, 188, - 189, 357, 357, 357, 363, 357, 361, 357, + 357, 357, 357, 362, 357, 360, 357, 360, + 357, 357, 357, 357, 426, 357, 187, 188, + 189, 357, 357, 357, 362, 357, 360, 357, + 360, 357, 425, 357, 357, 357, 357, 187, + 188, 189, 357, 357, 357, 362, 357, 360, + 357, 360, 78, 357, 357, 95, 361, 357, + 187, 188, 189, 357, 357, 357, 362, 357, 360, 357, 113, 80, 80, 81, 427, 427, 427, 427, 427, 152, 113, 427, 183, 184, 359, 359, 81, 187, 188, 189, 357, 357, - 357, 191, 357, 357, 194, 360, 357, 357, + 357, 191, 357, 357, 194, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 196, 357, 113, 80, 80, 81, 427, 427, 427, 427, 427, 427, 113, 427, 429, 430, 431, 432, 119, 433, 434, 435, - 428, 428, 151, 436, 428, 428, 437, 438, + 428, 428, 151, 436, 428, 428, 437, 428, 428, 428, 428, 428, 428, 428, 428, 428, - 428, 428, 428, 428, 439, 428, 440, 430, + 428, 428, 428, 428, 438, 428, 439, 430, 432, 432, 119, 433, 434, 435, 428, 428, - 428, 436, 428, 428, 437, 438, 428, 428, + 428, 436, 428, 428, 437, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, - 428, 428, 439, 428, 430, 432, 432, 119, + 428, 428, 438, 428, 430, 432, 432, 119, 433, 434, 435, 428, 428, 428, 436, 428, - 428, 437, 438, 428, 428, 428, 428, 428, - 428, 428, 428, 428, 428, 428, 428, 439, - 428, 441, 428, 428, 428, 132, 442, 428, - 433, 434, 435, 428, 428, 428, 443, 428, - 441, 428, 438, 428, 444, 445, 446, 447, - 119, 433, 434, 435, 428, 428, 149, 448, - 428, 428, 437, 438, 428, 428, 428, 428, + 428, 437, 428, 428, 428, 428, 428, 428, + 428, 428, 428, 428, 428, 428, 428, 438, + 428, 440, 428, 428, 428, 132, 441, 428, + 433, 434, 435, 428, 428, 428, 442, 428, + 440, 428, 443, 444, 445, 446, 119, 433, + 434, 435, 428, 428, 149, 447, 428, 428, + 437, 428, 428, 428, 428, 428, 428, 428, + 428, 428, 428, 428, 428, 428, 438, 428, + 448, 444, 449, 449, 119, 433, 434, 435, + 428, 428, 428, 447, 428, 428, 437, 428, 428, 428, 428, 428, 428, 428, 428, 428, - 439, 428, 449, 445, 450, 450, 119, 433, - 434, 435, 428, 428, 428, 448, 428, 428, - 437, 438, 428, 428, 428, 428, 428, 428, - 428, 428, 428, 428, 428, 428, 439, 428, - 445, 450, 450, 119, 433, 434, 435, 428, - 428, 428, 448, 428, 428, 437, 438, 428, + 428, 428, 428, 428, 438, 428, 444, 449, + 449, 119, 433, 434, 435, 428, 428, 428, + 447, 428, 428, 437, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, - 428, 428, 428, 439, 428, 451, 428, 428, - 428, 132, 452, 428, 433, 434, 435, 428, - 428, 428, 443, 428, 451, 428, 438, 428, - 453, 454, 455, 456, 119, 433, 434, 435, - 428, 428, 147, 457, 428, 428, 437, 438, + 428, 438, 428, 450, 428, 428, 428, 132, + 451, 428, 433, 434, 435, 428, 428, 428, + 442, 428, 450, 428, 452, 453, 454, 455, + 119, 433, 434, 435, 428, 428, 147, 456, + 428, 428, 437, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, - 428, 428, 428, 428, 439, 428, 458, 454, - 459, 459, 119, 433, 434, 435, 428, 428, - 428, 457, 428, 428, 437, 438, 428, 428, + 438, 428, 457, 453, 458, 458, 119, 433, + 434, 435, 428, 428, 428, 456, 428, 428, + 437, 428, 428, 428, 428, 428, 428, 428, + 428, 428, 428, 428, 428, 428, 438, 428, + 453, 458, 458, 119, 433, 434, 435, 428, + 428, 428, 456, 428, 428, 437, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, - 428, 428, 439, 428, 454, 459, 459, 119, - 433, 434, 435, 428, 428, 428, 457, 428, - 428, 437, 438, 428, 428, 428, 428, 428, - 428, 428, 428, 428, 428, 428, 428, 439, - 428, 460, 428, 428, 428, 132, 461, 428, - 433, 434, 435, 428, 428, 428, 443, 428, - 460, 428, 438, 428, 462, 463, 464, 465, - 119, 433, 434, 435, 428, 428, 145, 466, - 428, 428, 437, 438, 428, 428, 428, 428, + 428, 428, 428, 438, 428, 459, 428, 428, + 428, 132, 460, 428, 433, 434, 435, 428, + 428, 428, 442, 428, 459, 428, 461, 462, + 463, 464, 119, 433, 434, 435, 428, 428, + 145, 465, 428, 428, 437, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, - 439, 428, 467, 463, 468, 468, 119, 433, - 434, 435, 428, 428, 428, 466, 428, 428, - 437, 438, 428, 428, 428, 428, 428, 428, - 428, 428, 428, 428, 428, 428, 439, 428, - 463, 468, 468, 119, 433, 434, 435, 428, - 428, 428, 466, 428, 428, 437, 438, 428, + 428, 428, 438, 428, 466, 462, 467, 467, + 119, 433, 434, 435, 428, 428, 428, 465, + 428, 428, 437, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, - 428, 428, 428, 439, 428, 469, 428, 428, - 428, 132, 470, 428, 433, 434, 435, 428, - 428, 428, 443, 428, 469, 428, 438, 428, - 471, 472, 473, 474, 119, 433, 434, 435, - 428, 428, 143, 475, 428, 428, 437, 438, + 438, 428, 462, 467, 467, 119, 433, 434, + 435, 428, 428, 428, 465, 428, 428, 437, 428, 428, 428, 428, 428, 428, 428, 428, - 428, 428, 428, 428, 439, 428, 476, 472, - 477, 477, 119, 433, 434, 435, 428, 428, - 428, 475, 428, 428, 437, 438, 428, 428, + 428, 428, 428, 428, 428, 438, 428, 468, + 428, 428, 428, 132, 469, 428, 433, 434, + 435, 428, 428, 428, 442, 428, 468, 428, + 470, 471, 472, 473, 119, 433, 434, 435, + 428, 428, 143, 474, 428, 428, 437, 428, 428, 428, 428, 428, 428, 428, 428, 428, - 428, 428, 439, 428, 472, 477, 477, 119, - 433, 434, 435, 428, 428, 428, 475, 428, - 428, 437, 438, 428, 428, 428, 428, 428, - 428, 428, 428, 428, 428, 428, 428, 439, - 428, 132, 478, 428, 433, 434, 435, 428, - 428, 428, 443, 428, 428, 428, 438, 428, - 433, 434, 435, 428, 428, 428, 443, 428, - 428, 428, 438, 428, 479, 428, 428, 480, - 434, 435, 428, 434, 435, 428, 434, 481, - 428, 434, 428, 479, 428, 428, 428, 434, - 435, 428, 482, 428, 483, 484, 428, 433, - 434, 435, 428, 428, 117, 428, 428, 428, - 428, 438, 428, 116, 428, 428, 428, 428, - 433, 434, 435, 428, 428, 428, 428, 428, - 428, 428, 438, 428, 433, 434, 435, 428, - 428, 428, 428, 428, 428, 428, 438, 428, - 485, 428, 428, 428, 428, 433, 434, 435, - 428, 433, 434, 435, 428, 482, 428, 428, - 428, 428, 433, 434, 435, 428, 428, 428, - 428, 428, 428, 428, 438, 428, 482, 428, - 483, 428, 428, 433, 434, 435, 428, 428, - 117, 428, 428, 428, 428, 438, 428, 132, - 428, 486, 486, 119, 433, 434, 435, 428, - 428, 428, 443, 428, 428, 428, 438, 428, - 487, 141, 488, 489, 122, 433, 434, 435, - 428, 428, 428, 443, 428, 428, 428, 438, - 428, 141, 488, 489, 122, 433, 434, 435, - 428, 428, 428, 443, 428, 428, 428, 438, - 428, 488, 488, 122, 433, 434, 435, 428, - 428, 428, 443, 428, 428, 428, 438, 428, - 490, 138, 491, 492, 125, 433, 434, 435, - 428, 428, 428, 443, 428, 428, 428, 438, - 428, 138, 491, 492, 125, 433, 434, 435, - 428, 428, 428, 443, 428, 428, 428, 438, - 428, 491, 491, 125, 433, 434, 435, 428, - 428, 428, 443, 428, 428, 428, 438, 428, - 493, 135, 494, 495, 128, 433, 434, 435, - 428, 428, 428, 443, 428, 428, 428, 438, - 428, 135, 494, 495, 128, 433, 434, 435, - 428, 428, 428, 443, 428, 428, 428, 438, - 428, 494, 494, 128, 433, 434, 435, 428, - 428, 428, 443, 428, 428, 428, 438, 428, - 496, 132, 428, 497, 428, 433, 434, 435, - 428, 428, 428, 443, 428, 428, 428, 438, - 428, 132, 428, 497, 428, 433, 434, 435, - 428, 428, 428, 443, 428, 428, 428, 438, - 428, 498, 428, 433, 434, 435, 428, 428, - 428, 443, 428, 428, 428, 438, 428, 132, - 428, 428, 428, 428, 433, 434, 435, 428, - 428, 428, 443, 428, 428, 428, 438, 428, - 115, 116, 428, 428, 132, 478, 428, 433, - 434, 435, 428, 428, 428, 443, 428, 115, - 428, 438, 428, 472, 477, 477, 119, 433, - 434, 435, 428, 428, 428, 475, 428, 428, - 428, 438, 428, 428, 428, 428, 428, 428, - 428, 428, 428, 428, 428, 428, 439, 428, - 472, 477, 477, 119, 433, 434, 435, 428, - 428, 428, 475, 428, 428, 428, 438, 428, - 471, 472, 477, 477, 119, 433, 434, 435, - 428, 428, 428, 475, 428, 428, 437, 438, + 428, 428, 428, 428, 438, 428, 475, 471, + 476, 476, 119, 433, 434, 435, 428, 428, + 428, 474, 428, 428, 437, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, - 428, 428, 428, 428, 439, 428, 471, 472, - 473, 477, 119, 433, 434, 435, 428, 428, - 143, 475, 428, 428, 437, 438, 428, 428, + 428, 428, 438, 428, 471, 476, 476, 119, + 433, 434, 435, 428, 428, 428, 474, 428, + 428, 437, 428, 428, 428, 428, 428, 428, + 428, 428, 428, 428, 428, 428, 428, 438, + 428, 132, 477, 428, 433, 434, 435, 428, + 428, 428, 442, 428, 433, 434, 435, 428, + 428, 428, 442, 428, 478, 428, 428, 479, + 434, 435, 428, 434, 435, 428, 480, 428, + 434, 481, 428, 434, 482, 428, 434, 428, + 478, 428, 428, 428, 434, 435, 428, 483, + 428, 484, 485, 428, 433, 434, 435, 428, + 428, 117, 428, 116, 428, 428, 428, 428, + 433, 434, 435, 428, 433, 434, 435, 428, + 483, 428, 428, 428, 428, 433, 434, 435, + 428, 483, 428, 484, 428, 428, 433, 434, + 435, 428, 428, 117, 428, 132, 428, 486, + 486, 119, 433, 434, 435, 428, 428, 428, + 442, 428, 487, 141, 488, 489, 122, 433, + 434, 435, 428, 428, 428, 442, 428, 141, + 488, 489, 122, 433, 434, 435, 428, 428, + 428, 442, 428, 488, 488, 122, 433, 434, + 435, 428, 428, 428, 442, 428, 490, 138, + 491, 492, 125, 433, 434, 435, 428, 428, + 428, 442, 428, 138, 491, 492, 125, 433, + 434, 435, 428, 428, 428, 442, 428, 491, + 491, 125, 433, 434, 435, 428, 428, 428, + 442, 428, 493, 135, 494, 495, 128, 433, + 434, 435, 428, 428, 428, 442, 428, 135, + 494, 495, 128, 433, 434, 435, 428, 428, + 428, 442, 428, 494, 494, 128, 433, 434, + 435, 428, 428, 428, 442, 428, 496, 132, + 428, 497, 428, 433, 434, 435, 428, 428, + 428, 442, 428, 132, 428, 497, 428, 433, + 434, 435, 428, 428, 428, 442, 428, 498, + 428, 433, 434, 435, 428, 428, 428, 442, + 428, 132, 428, 428, 428, 428, 433, 434, + 435, 428, 428, 428, 442, 428, 115, 116, + 428, 428, 132, 477, 428, 433, 434, 435, + 428, 428, 428, 442, 428, 115, 428, 471, + 476, 476, 119, 433, 434, 435, 428, 428, + 428, 474, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, - 428, 428, 439, 428, 469, 428, 499, 428, - 486, 486, 119, 433, 434, 435, 428, 428, - 428, 443, 428, 469, 428, 438, 428, 469, - 428, 428, 428, 428, 428, 428, 433, 434, - 435, 428, 428, 428, 443, 428, 469, 428, - 438, 428, 469, 428, 428, 428, 428, 500, - 428, 433, 434, 435, 428, 428, 428, 443, - 428, 469, 428, 438, 428, 469, 428, 499, - 428, 428, 428, 428, 433, 434, 435, 428, - 428, 428, 443, 428, 469, 428, 438, 428, - 469, 116, 428, 428, 132, 470, 428, 433, - 434, 435, 428, 428, 428, 443, 428, 469, - 428, 438, 428, 462, 463, 468, 468, 119, - 433, 434, 435, 428, 428, 428, 466, 428, - 428, 437, 438, 428, 428, 428, 428, 428, - 428, 428, 428, 428, 428, 428, 428, 439, - 428, 462, 463, 464, 468, 119, 433, 434, - 435, 428, 428, 145, 466, 428, 428, 437, - 438, 428, 428, 428, 428, 428, 428, 428, - 428, 428, 428, 428, 428, 439, 428, 460, - 428, 501, 428, 486, 486, 119, 433, 434, - 435, 428, 428, 428, 443, 428, 460, 428, - 438, 428, 460, 428, 428, 428, 428, 428, - 428, 433, 434, 435, 428, 428, 428, 443, - 428, 460, 428, 438, 428, 460, 428, 428, - 428, 428, 502, 428, 433, 434, 435, 428, - 428, 428, 443, 428, 460, 428, 438, 428, - 460, 428, 501, 428, 428, 428, 428, 433, - 434, 435, 428, 428, 428, 443, 428, 460, - 428, 438, 428, 460, 116, 428, 428, 132, - 461, 428, 433, 434, 435, 428, 428, 428, - 443, 428, 460, 428, 438, 428, 453, 454, - 459, 459, 119, 433, 434, 435, 428, 428, - 428, 457, 428, 428, 437, 438, 428, 428, + 428, 428, 438, 428, 471, 476, 476, 119, + 433, 434, 435, 428, 428, 428, 474, 428, + 470, 471, 476, 476, 119, 433, 434, 435, + 428, 428, 428, 474, 428, 428, 437, 428, 428, 428, 428, 428, 428, 428, 428, 428, - 428, 428, 439, 428, 453, 454, 455, 459, - 119, 433, 434, 435, 428, 428, 147, 457, - 428, 428, 437, 438, 428, 428, 428, 428, + 428, 428, 428, 428, 438, 428, 470, 471, + 472, 476, 119, 433, 434, 435, 428, 428, + 143, 474, 428, 428, 437, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, - 439, 428, 451, 428, 503, 428, 486, 486, - 119, 433, 434, 435, 428, 428, 428, 443, - 428, 451, 428, 438, 428, 451, 428, 428, + 428, 428, 438, 428, 468, 428, 499, 428, + 486, 486, 119, 433, 434, 435, 428, 428, + 428, 442, 428, 468, 428, 468, 428, 428, 428, 428, 428, 428, 433, 434, 435, 428, - 428, 428, 443, 428, 451, 428, 438, 428, - 451, 428, 428, 428, 428, 504, 428, 433, - 434, 435, 428, 428, 428, 443, 428, 451, - 428, 438, 428, 451, 428, 503, 428, 428, - 428, 428, 433, 434, 435, 428, 428, 428, - 443, 428, 451, 428, 438, 428, 451, 116, - 428, 428, 132, 452, 428, 433, 434, 435, - 428, 428, 428, 443, 428, 451, 428, 438, - 428, 444, 445, 450, 450, 119, 433, 434, - 435, 428, 428, 428, 448, 428, 428, 437, - 438, 428, 428, 428, 428, 428, 428, 428, - 428, 428, 428, 428, 428, 439, 428, 444, - 445, 446, 450, 119, 433, 434, 435, 428, - 428, 149, 448, 428, 428, 437, 438, 428, + 428, 428, 442, 428, 468, 428, 468, 428, + 428, 428, 428, 500, 428, 433, 434, 435, + 428, 428, 428, 442, 428, 468, 428, 468, + 428, 499, 428, 428, 428, 428, 433, 434, + 435, 428, 428, 428, 442, 428, 468, 428, + 468, 116, 428, 428, 132, 469, 428, 433, + 434, 435, 428, 428, 428, 442, 428, 468, + 428, 461, 462, 467, 467, 119, 433, 434, + 435, 428, 428, 428, 465, 428, 428, 437, 428, 428, 428, 428, 428, 428, 428, 428, - 428, 428, 428, 439, 428, 441, 428, 505, + 428, 428, 428, 428, 428, 438, 428, 461, + 462, 463, 467, 119, 433, 434, 435, 428, + 428, 145, 465, 428, 428, 437, 428, 428, + 428, 428, 428, 428, 428, 428, 428, 428, + 428, 428, 428, 438, 428, 459, 428, 501, 428, 486, 486, 119, 433, 434, 435, 428, - 428, 428, 443, 428, 441, 428, 438, 428, - 441, 428, 428, 428, 428, 428, 428, 433, - 434, 435, 428, 428, 428, 443, 428, 441, - 428, 438, 428, 441, 428, 428, 428, 428, - 506, 428, 433, 434, 435, 428, 428, 428, - 443, 428, 441, 428, 438, 428, 441, 428, - 505, 428, 428, 428, 428, 433, 434, 435, - 428, 428, 428, 443, 428, 441, 428, 438, - 428, 441, 116, 428, 428, 132, 442, 428, - 433, 434, 435, 428, 428, 428, 443, 428, - 441, 428, 438, 428, 429, 430, 432, 432, + 428, 428, 442, 428, 459, 428, 459, 428, + 428, 428, 428, 428, 428, 433, 434, 435, + 428, 428, 428, 442, 428, 459, 428, 459, + 428, 428, 428, 428, 502, 428, 433, 434, + 435, 428, 428, 428, 442, 428, 459, 428, + 459, 428, 501, 428, 428, 428, 428, 433, + 434, 435, 428, 428, 428, 442, 428, 459, + 428, 459, 116, 428, 428, 132, 460, 428, + 433, 434, 435, 428, 428, 428, 442, 428, + 459, 428, 452, 453, 458, 458, 119, 433, + 434, 435, 428, 428, 428, 456, 428, 428, + 437, 428, 428, 428, 428, 428, 428, 428, + 428, 428, 428, 428, 428, 428, 438, 428, + 452, 453, 454, 458, 119, 433, 434, 435, + 428, 428, 147, 456, 428, 428, 437, 428, + 428, 428, 428, 428, 428, 428, 428, 428, + 428, 428, 428, 428, 438, 428, 450, 428, + 503, 428, 486, 486, 119, 433, 434, 435, + 428, 428, 428, 442, 428, 450, 428, 450, + 428, 428, 428, 428, 428, 428, 433, 434, + 435, 428, 428, 428, 442, 428, 450, 428, + 450, 428, 428, 428, 428, 504, 428, 433, + 434, 435, 428, 428, 428, 442, 428, 450, + 428, 450, 428, 503, 428, 428, 428, 428, + 433, 434, 435, 428, 428, 428, 442, 428, + 450, 428, 450, 116, 428, 428, 132, 451, + 428, 433, 434, 435, 428, 428, 428, 442, + 428, 450, 428, 443, 444, 449, 449, 119, + 433, 434, 435, 428, 428, 428, 447, 428, + 428, 437, 428, 428, 428, 428, 428, 428, + 428, 428, 428, 428, 428, 428, 428, 438, + 428, 443, 444, 445, 449, 119, 433, 434, + 435, 428, 428, 149, 447, 428, 428, 437, + 428, 428, 428, 428, 428, 428, 428, 428, + 428, 428, 428, 428, 428, 438, 428, 440, + 428, 505, 428, 486, 486, 119, 433, 434, + 435, 428, 428, 428, 442, 428, 440, 428, + 440, 428, 428, 428, 428, 428, 428, 433, + 434, 435, 428, 428, 428, 442, 428, 440, + 428, 440, 428, 428, 428, 428, 506, 428, + 433, 434, 435, 428, 428, 428, 442, 428, + 440, 428, 440, 428, 505, 428, 428, 428, + 428, 433, 434, 435, 428, 428, 428, 442, + 428, 440, 428, 440, 116, 428, 428, 132, + 441, 428, 433, 434, 435, 428, 428, 428, + 442, 428, 440, 428, 429, 430, 432, 432, 119, 433, 434, 435, 428, 428, 428, 436, - 428, 428, 437, 438, 428, 428, 428, 428, + 428, 428, 437, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, - 439, 428, 181, 182, 183, 184, 507, 359, + 438, 428, 181, 182, 183, 184, 507, 359, 81, 187, 188, 189, 190, 190, 152, 191, - 357, 181, 194, 360, 357, 357, 357, 357, + 357, 181, 194, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 196, 357, 198, 508, 200, 201, 5, 202, 203, 204, 197, 197, 37, 205, 197, 197, - 206, 207, 197, 197, 197, 197, 197, 197, - 197, 197, 197, 197, 197, 197, 208, 197, - 211, 182, 183, 184, 509, 510, 81, 511, - 203, 512, 190, 190, 152, 513, 197, 211, - 194, 514, 197, 197, 197, 197, 197, 197, + 206, 197, 197, 197, 197, 197, 197, 197, + 197, 197, 197, 197, 197, 197, 207, 197, + 210, 182, 183, 184, 509, 510, 81, 511, + 512, 513, 197, 190, 152, 514, 197, 210, + 194, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 196, 197, 113, 80, 80, 81, 202, 203, 204, 197, - 197, 152, 515, 197, 197, 197, 207, 197, - 516, 2, 357, 357, 357, 426, 357, 187, - 188, 189, 357, 357, 357, 363, 357, 516, - 357, 360, 357, 517, 365, 518, 519, 81, - 511, 203, 512, 197, 197, 153, 368, 197, - 197, 194, 514, 197, 197, 197, 197, 197, + 197, 152, 515, 197, 516, 2, 357, 357, + 357, 426, 357, 187, 188, 189, 357, 357, + 357, 362, 357, 516, 357, 517, 364, 518, + 519, 81, 511, 512, 513, 197, 197, 153, + 367, 197, 197, 194, 197, 197, 197, 197, + 197, 197, 197, 197, 197, 197, 197, 197, + 197, 196, 197, 520, 364, 369, 369, 81, + 511, 512, 513, 197, 197, 197, 367, 197, + 197, 194, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 196, - 197, 520, 365, 370, 370, 81, 511, 203, - 512, 197, 197, 197, 368, 197, 197, 194, - 514, 197, 197, 197, 197, 197, 197, 197, - 197, 197, 197, 197, 197, 196, 197, 365, - 370, 370, 81, 511, 203, 512, 197, 197, - 197, 368, 197, 197, 194, 514, 197, 197, + 197, 364, 369, 369, 81, 511, 512, 513, + 197, 197, 197, 367, 197, 197, 194, 197, 197, 197, 197, 197, 197, 197, 197, 197, - 197, 197, 196, 197, 521, 197, 197, 522, - 203, 512, 197, 203, 512, 197, 203, 523, - 197, 203, 197, 521, 197, 197, 197, 203, - 512, 197, 524, 197, 197, 197, 197, 511, - 203, 512, 197, 511, 203, 512, 197, 517, - 365, 370, 370, 81, 511, 203, 512, 197, - 197, 197, 368, 197, 197, 194, 514, 197, + 197, 197, 197, 197, 196, 197, 521, 197, + 197, 522, 512, 513, 197, 512, 513, 197, + 250, 197, 512, 523, 197, 512, 524, 197, + 512, 197, 521, 197, 197, 197, 512, 513, + 197, 517, 364, 369, 369, 81, 511, 512, + 513, 197, 197, 197, 367, 197, 197, 194, 197, 197, 197, 197, 197, 197, 197, 197, - 197, 197, 197, 196, 197, 517, 365, 518, - 370, 81, 511, 203, 512, 197, 197, 153, - 368, 197, 197, 194, 514, 197, 197, 197, + 197, 197, 197, 197, 197, 196, 197, 517, + 364, 518, 369, 81, 511, 512, 513, 197, + 197, 153, 367, 197, 197, 194, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, - 197, 196, 197, 211, 197, 275, 113, 525, - 525, 155, 202, 203, 204, 197, 197, 197, - 515, 197, 211, 197, 207, 197, 526, 179, - 527, 528, 157, 511, 203, 512, 197, 197, - 197, 529, 197, 197, 197, 514, 197, 179, - 527, 528, 157, 511, 203, 512, 197, 197, - 197, 529, 197, 197, 197, 514, 197, 527, - 527, 157, 511, 203, 512, 197, 197, 197, - 529, 197, 197, 197, 514, 197, 530, 176, - 531, 532, 160, 511, 203, 512, 197, 197, - 197, 529, 197, 197, 197, 514, 197, 176, - 531, 532, 160, 511, 203, 512, 197, 197, - 197, 529, 197, 197, 197, 514, 197, 531, - 531, 160, 511, 203, 512, 197, 197, 197, - 529, 197, 197, 197, 514, 197, 533, 173, - 534, 535, 163, 511, 203, 512, 197, 197, - 197, 529, 197, 197, 197, 514, 197, 173, - 534, 535, 163, 511, 203, 512, 197, 197, - 197, 529, 197, 197, 197, 514, 197, 534, - 534, 163, 511, 203, 512, 197, 197, 197, - 529, 197, 197, 197, 514, 197, 536, 170, - 197, 537, 197, 511, 203, 512, 197, 197, - 197, 529, 197, 197, 197, 514, 197, 170, - 197, 537, 197, 511, 203, 512, 197, 197, - 197, 529, 197, 197, 197, 514, 197, 511, - 203, 512, 197, 197, 197, 529, 197, 197, - 197, 514, 197, 538, 197, 539, 540, 197, - 511, 203, 512, 197, 197, 167, 197, 197, - 197, 197, 514, 197, 166, 197, 197, 197, - 197, 511, 203, 512, 197, 197, 197, 197, - 197, 197, 197, 514, 197, 511, 203, 512, - 197, 197, 197, 197, 197, 197, 197, 514, - 197, 538, 197, 197, 197, 197, 511, 203, - 512, 197, 197, 197, 197, 197, 197, 197, - 514, 197, 538, 197, 539, 197, 197, 511, - 203, 512, 197, 197, 167, 197, 197, 197, - 197, 514, 197, 516, 166, 357, 357, 95, - 362, 357, 187, 188, 189, 357, 357, 357, - 363, 357, 516, 357, 360, 357, 542, 541, - 541, 541, 541, 543, 544, 545, 541, 543, - 544, 545, 541, 546, 541, 541, 547, 544, - 545, 541, 544, 545, 541, 544, 548, 541, - 544, 541, 546, 541, 541, 541, 544, 545, - 541, 0 + 197, 197, 197, 196, 197, 210, 197, 275, + 113, 525, 525, 155, 202, 203, 204, 197, + 197, 197, 515, 197, 210, 197, 526, 179, + 527, 528, 157, 511, 512, 513, 197, 197, + 197, 529, 197, 179, 527, 528, 157, 511, + 512, 513, 197, 197, 197, 529, 197, 527, + 527, 157, 511, 512, 513, 197, 197, 197, + 529, 197, 530, 176, 531, 532, 160, 511, + 512, 513, 197, 197, 197, 529, 197, 176, + 531, 532, 160, 511, 512, 513, 197, 197, + 197, 529, 197, 531, 531, 160, 511, 512, + 513, 197, 197, 197, 529, 197, 533, 173, + 534, 535, 163, 511, 512, 513, 197, 197, + 197, 529, 197, 173, 534, 535, 163, 511, + 512, 513, 197, 197, 197, 529, 197, 534, + 534, 163, 511, 512, 513, 197, 197, 197, + 529, 197, 536, 170, 197, 537, 197, 511, + 512, 513, 197, 197, 197, 529, 197, 170, + 197, 537, 197, 511, 512, 513, 197, 197, + 197, 529, 197, 511, 512, 513, 197, 197, + 197, 529, 197, 538, 197, 539, 540, 197, + 511, 512, 513, 197, 197, 167, 197, 166, + 197, 197, 197, 197, 511, 512, 513, 197, + 511, 512, 513, 197, 538, 197, 197, 197, + 197, 511, 512, 513, 197, 538, 197, 539, + 197, 197, 511, 512, 513, 197, 197, 167, + 197, 516, 166, 357, 357, 95, 361, 357, + 187, 188, 189, 357, 357, 357, 362, 357, + 516, 357, 542, 541, 541, 541, 541, 543, + 544, 545, 541, 543, 544, 545, 541, 546, + 541, 541, 547, 544, 545, 541, 544, 545, + 541, 548, 541, 544, 549, 541, 544, 550, + 541, 544, 541, 546, 541, 541, 541, 544, + 545, 541, 0 }; static const short _indic_syllable_machine_trans_targs[] = { - 170, 197, 199, 202, 3, 205, 4, 6, + 170, 199, 201, 202, 3, 205, 4, 6, 208, 7, 9, 211, 10, 12, 214, 13, 15, 16, 191, 18, 19, 213, 21, 22, 210, 24, 25, 207, 216, 221, 225, 228, - 232, 235, 239, 242, 246, 249, 170, 277, - 279, 282, 39, 285, 40, 42, 288, 43, + 232, 235, 239, 242, 246, 249, 170, 279, + 281, 282, 39, 285, 40, 42, 288, 43, 45, 291, 46, 48, 294, 49, 51, 52, 271, 54, 55, 293, 57, 58, 290, 60, 61, 287, 296, 301, 305, 308, 312, 315, - 319, 322, 326, 330, 170, 356, 358, 361, + 319, 322, 326, 330, 170, 358, 360, 361, 75, 364, 170, 76, 78, 367, 79, 81, 370, 82, 84, 373, 85, 87, 88, 350, 90, 91, 372, 93, 94, 369, 96, 97, 366, 375, 380, 384, 387, 391, 394, 398, - 401, 405, 170, 437, 439, 442, 110, 445, + 401, 405, 170, 439, 441, 442, 110, 445, 111, 113, 448, 114, 116, 451, 117, 119, 454, 120, 122, 123, 431, 125, 126, 453, 128, 129, 450, 131, 132, 447, 456, 461, @@ -1281,52 +1189,52 @@ static const short _indic_syllable_machine_trans_targs[] = { 514, 152, 154, 517, 155, 520, 522, 523, 159, 160, 519, 162, 163, 516, 165, 166, 513, 168, 169, 510, 170, 171, 251, 331, - 333, 408, 410, 351, 170, 353, 411, 407, + 333, 408, 410, 351, 353, 354, 411, 407, 490, 491, 378, 526, 379, 170, 172, 174, - 35, 250, 192, 170, 194, 248, 219, 200, - 220, 173, 34, 175, 244, 0, 176, 178, - 33, 243, 241, 177, 32, 179, 237, 180, - 182, 31, 236, 234, 181, 30, 183, 230, - 184, 186, 29, 229, 227, 185, 28, 187, - 223, 188, 190, 27, 222, 218, 189, 26, - 204, 193, 196, 195, 198, 1, 203, 201, + 35, 250, 192, 194, 195, 248, 219, 220, + 173, 34, 175, 244, 0, 176, 178, 33, + 243, 241, 177, 32, 179, 237, 180, 182, + 31, 236, 234, 181, 30, 183, 230, 184, + 186, 29, 229, 227, 185, 28, 187, 223, + 188, 190, 27, 222, 218, 189, 26, 204, + 193, 198, 170, 196, 197, 200, 1, 203, 2, 206, 5, 23, 209, 8, 20, 212, 11, 17, 215, 14, 217, 224, 226, 231, 233, 238, 240, 245, 247, 170, 252, 254, - 71, 328, 272, 170, 274, 329, 299, 280, - 300, 253, 70, 255, 324, 36, 256, 258, - 69, 323, 321, 257, 68, 259, 317, 260, - 262, 67, 316, 314, 261, 66, 263, 310, - 264, 266, 65, 309, 307, 265, 64, 267, - 303, 268, 270, 63, 302, 298, 269, 62, - 284, 273, 276, 275, 278, 37, 283, 281, + 71, 328, 272, 274, 275, 329, 299, 300, + 253, 70, 255, 324, 36, 256, 258, 69, + 323, 321, 257, 68, 259, 317, 260, 262, + 67, 316, 314, 261, 66, 263, 310, 264, + 266, 65, 309, 307, 265, 64, 267, 303, + 268, 270, 63, 302, 298, 269, 62, 284, + 273, 278, 170, 276, 277, 280, 37, 283, 38, 286, 41, 59, 289, 44, 56, 292, 47, 53, 295, 50, 297, 304, 306, 311, 313, 318, 320, 325, 327, 170, 332, 106, - 359, 334, 403, 72, 335, 337, 105, 402, - 400, 336, 104, 338, 396, 339, 341, 103, - 395, 393, 340, 102, 342, 389, 343, 345, - 101, 388, 386, 344, 100, 346, 382, 347, - 349, 99, 381, 377, 348, 98, 363, 352, - 355, 354, 357, 73, 362, 360, 74, 365, + 334, 403, 72, 335, 337, 105, 402, 400, + 336, 104, 338, 396, 339, 341, 103, 395, + 393, 340, 102, 342, 389, 343, 345, 101, + 388, 386, 344, 100, 346, 382, 347, 349, + 99, 381, 377, 348, 98, 363, 352, 357, + 170, 355, 356, 359, 73, 362, 74, 365, 77, 95, 368, 80, 92, 371, 83, 89, 374, 86, 376, 383, 385, 390, 392, 397, 399, 404, 406, 170, 170, 412, 414, 142, - 141, 432, 170, 434, 488, 459, 440, 460, - 413, 415, 484, 107, 416, 418, 140, 483, - 481, 417, 139, 419, 477, 420, 422, 138, - 476, 474, 421, 137, 423, 470, 424, 426, - 136, 469, 467, 425, 135, 427, 463, 428, - 430, 134, 462, 458, 429, 133, 444, 433, - 436, 435, 438, 108, 443, 441, 109, 446, + 141, 432, 434, 435, 488, 459, 460, 413, + 415, 484, 107, 416, 418, 140, 483, 481, + 417, 139, 419, 477, 420, 422, 138, 476, + 474, 421, 137, 423, 470, 424, 426, 136, + 469, 467, 425, 135, 427, 463, 428, 430, + 134, 462, 458, 429, 133, 444, 433, 438, + 170, 436, 437, 440, 108, 443, 109, 446, 112, 130, 449, 115, 127, 452, 118, 124, 455, 121, 457, 464, 466, 471, 473, 478, 480, 485, 487, 143, 492, 493, 507, 498, - 500, 525, 503, 494, 495, 496, 144, 506, - 497, 499, 502, 501, 504, 145, 509, 147, + 500, 501, 525, 494, 495, 496, 144, 506, + 497, 499, 504, 502, 503, 145, 509, 147, 167, 156, 512, 150, 164, 515, 153, 161, 518, 158, 521, 157, 524, 170, 527, 528, - 170, 530, 529, 532, 531 + 530, 531, 529, 534, 170, 532, 533 }; static const char _indic_syllable_machine_trans_actions[] = { @@ -1353,52 +1261,52 @@ static const char _indic_syllable_machine_trans_actions[] = { 2, 0, 0, 2, 0, 2, 0, 0, 0, 0, 2, 0, 0, 2, 0, 0, 2, 0, 0, 2, 11, 2, 2, 6, - 2, 12, 12, 0, 13, 0, 2, 2, - 6, 2, 6, 0, 6, 14, 2, 2, - 0, 2, 0, 15, 0, 2, 2, 0, - 2, 2, 0, 2, 2, 0, 2, 2, + 2, 12, 12, 0, 0, 0, 2, 2, + 6, 2, 6, 0, 6, 13, 2, 2, + 0, 2, 0, 0, 0, 2, 2, 2, + 2, 0, 2, 2, 0, 2, 2, 0, + 2, 2, 2, 0, 2, 2, 2, 2, 0, 2, 2, 2, 0, 2, 2, 2, 2, 0, 2, 2, 2, 0, 2, 2, 2, 2, 0, 2, 2, 2, 0, 2, - 2, 2, 2, 0, 2, 2, 2, 0, - 2, 0, 0, 0, 0, 0, 2, 0, + 0, 0, 14, 0, 0, 0, 0, 2, 0, 2, 0, 0, 2, 0, 0, 2, 0, 0, 2, 0, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 16, 2, 2, - 0, 2, 0, 17, 0, 2, 2, 0, - 2, 2, 0, 2, 2, 0, 2, 2, + 2, 2, 2, 2, 2, 15, 2, 2, + 0, 2, 0, 0, 0, 2, 2, 2, + 2, 0, 2, 2, 0, 2, 2, 0, + 2, 2, 2, 0, 2, 2, 2, 2, 0, 2, 2, 2, 0, 2, 2, 2, 2, 0, 2, 2, 2, 0, 2, 2, 2, 2, 0, 2, 2, 2, 0, 2, - 2, 2, 2, 0, 2, 2, 2, 0, - 2, 0, 0, 0, 0, 0, 2, 0, + 0, 0, 16, 0, 0, 0, 0, 2, 0, 2, 0, 0, 2, 0, 0, 2, 0, 0, 2, 0, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 18, 6, 0, - 0, 6, 6, 0, 6, 2, 0, 6, + 2, 2, 2, 2, 2, 17, 6, 0, + 6, 6, 0, 6, 2, 0, 6, 2, + 6, 0, 6, 6, 6, 2, 0, 6, 2, 6, 0, 6, 6, 6, 2, 0, 6, 2, 6, 0, 6, 6, 6, 2, - 0, 6, 2, 6, 0, 6, 6, 6, - 2, 0, 6, 2, 6, 0, 6, 0, - 0, 0, 0, 0, 2, 0, 0, 2, + 0, 6, 2, 6, 0, 6, 0, 0, + 18, 0, 0, 0, 0, 2, 0, 2, 0, 0, 2, 0, 0, 2, 0, 0, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 19, 20, 2, 2, 0, - 0, 0, 21, 0, 2, 2, 0, 2, - 2, 2, 2, 0, 2, 2, 0, 2, + 0, 0, 0, 0, 2, 2, 2, 2, + 2, 2, 0, 2, 2, 0, 2, 2, + 2, 0, 2, 2, 2, 2, 0, 2, 2, 2, 0, 2, 2, 2, 2, 0, 2, 2, 2, 0, 2, 2, 2, 2, - 0, 2, 2, 2, 0, 2, 2, 2, - 2, 0, 2, 2, 2, 0, 2, 0, - 0, 0, 0, 0, 2, 0, 0, 2, + 0, 2, 2, 2, 0, 2, 0, 0, + 21, 0, 0, 0, 0, 2, 0, 2, 0, 0, 2, 0, 0, 2, 0, 0, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 8, 2, 0, - 0, 2, 0, 2, 8, 8, 0, 8, + 0, 0, 2, 2, 8, 8, 0, 8, 8, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 2, 0, 0, 2, 0, 0, 0, 2, 22, 0, 0, - 23, 0, 0, 0, 0 + 0, 0, 0, 0, 23, 0, 0 }; static const char _indic_syllable_machine_to_state_actions[] = { @@ -1468,7 +1376,7 @@ static const char _indic_syllable_machine_to_state_actions[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0 + 0, 0, 0, 0, 0, 0, 0 }; static const char _indic_syllable_machine_from_state_actions[] = { @@ -1538,7 +1446,7 @@ static const char _indic_syllable_machine_from_state_actions[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0 + 0, 0, 0, 0, 0, 0, 0 }; static const short _indic_syllable_machine_eof_trans[] = { @@ -1608,7 +1516,7 @@ static const short _indic_syllable_machine_eof_trans[] = { 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, 358, 542, 542, - 542, 542, 542, 542, 542 + 542, 542, 542, 542, 542, 542, 542 }; static const int indic_syllable_machine_start = 170; @@ -1622,7 +1530,7 @@ static const int indic_syllable_machine_en_main = 170; -#line 98 "hb-ot-shape-complex-indic-machine.rl" +#line 97 "hb-ot-shape-complex-indic-machine.rl" #define found_syllable(syllable_type) \ @@ -1642,7 +1550,7 @@ find_syllables (hb_buffer_t *buffer) int cs; hb_glyph_info_t *info = buffer->info; -#line 1646 "hb-ot-shape-complex-indic-machine.hh" +#line 1554 "hb-ot-shape-complex-indic-machine.hh" { cs = indic_syllable_machine_start; ts = 0; @@ -1650,7 +1558,7 @@ find_syllables (hb_buffer_t *buffer) act = 0; } -#line 119 "hb-ot-shape-complex-indic-machine.rl" +#line 118 "hb-ot-shape-complex-indic-machine.rl" p = 0; @@ -1659,7 +1567,7 @@ find_syllables (hb_buffer_t *buffer) unsigned int last = 0; unsigned int syllable_serial = 1; -#line 1663 "hb-ot-shape-complex-indic-machine.hh" +#line 1571 "hb-ot-shape-complex-indic-machine.hh" { int _slen; int _trans; @@ -1673,7 +1581,7 @@ _resume: #line 1 "NONE" {ts = p;} break; -#line 1677 "hb-ot-shape-complex-indic-machine.hh" +#line 1585 "hb-ot-shape-complex-indic-machine.hh" } _keys = _indic_syllable_machine_trans_keys + (cs<<1); @@ -1695,68 +1603,68 @@ _eof_trans: #line 1 "NONE" {te = p+1;} break; - case 15: -#line 89 "hb-ot-shape-complex-indic-machine.rl" + case 14: +#line 88 "hb-ot-shape-complex-indic-machine.rl" {te = p+1;{ found_syllable (consonant_syllable); }} break; - case 17: -#line 90 "hb-ot-shape-complex-indic-machine.rl" + case 16: +#line 89 "hb-ot-shape-complex-indic-machine.rl" {te = p+1;{ found_syllable (vowel_syllable); }} break; case 21: -#line 91 "hb-ot-shape-complex-indic-machine.rl" +#line 90 "hb-ot-shape-complex-indic-machine.rl" {te = p+1;{ found_syllable (standalone_cluster); }} break; case 23: -#line 92 "hb-ot-shape-complex-indic-machine.rl" - {te = p+1;{ found_syllable (avagraha_cluster); }} +#line 91 "hb-ot-shape-complex-indic-machine.rl" + {te = p+1;{ found_syllable (symbol_cluster); }} break; - case 13: -#line 93 "hb-ot-shape-complex-indic-machine.rl" + case 18: +#line 92 "hb-ot-shape-complex-indic-machine.rl" {te = p+1;{ found_syllable (broken_cluster); }} break; case 11: -#line 94 "hb-ot-shape-complex-indic-machine.rl" +#line 93 "hb-ot-shape-complex-indic-machine.rl" {te = p+1;{ found_syllable (non_indic_cluster); }} break; - case 14: -#line 89 "hb-ot-shape-complex-indic-machine.rl" + case 13: +#line 88 "hb-ot-shape-complex-indic-machine.rl" {te = p;p--;{ found_syllable (consonant_syllable); }} break; - case 16: -#line 90 "hb-ot-shape-complex-indic-machine.rl" + case 15: +#line 89 "hb-ot-shape-complex-indic-machine.rl" {te = p;p--;{ found_syllable (vowel_syllable); }} break; case 20: -#line 91 "hb-ot-shape-complex-indic-machine.rl" +#line 90 "hb-ot-shape-complex-indic-machine.rl" {te = p;p--;{ found_syllable (standalone_cluster); }} break; case 22: -#line 92 "hb-ot-shape-complex-indic-machine.rl" - {te = p;p--;{ found_syllable (avagraha_cluster); }} +#line 91 "hb-ot-shape-complex-indic-machine.rl" + {te = p;p--;{ found_syllable (symbol_cluster); }} break; - case 18: -#line 93 "hb-ot-shape-complex-indic-machine.rl" + case 17: +#line 92 "hb-ot-shape-complex-indic-machine.rl" {te = p;p--;{ found_syllable (broken_cluster); }} break; case 19: -#line 94 "hb-ot-shape-complex-indic-machine.rl" +#line 93 "hb-ot-shape-complex-indic-machine.rl" {te = p;p--;{ found_syllable (non_indic_cluster); }} break; case 1: -#line 89 "hb-ot-shape-complex-indic-machine.rl" +#line 88 "hb-ot-shape-complex-indic-machine.rl" {{p = ((te))-1;}{ found_syllable (consonant_syllable); }} break; case 3: -#line 90 "hb-ot-shape-complex-indic-machine.rl" +#line 89 "hb-ot-shape-complex-indic-machine.rl" {{p = ((te))-1;}{ found_syllable (vowel_syllable); }} break; case 7: -#line 91 "hb-ot-shape-complex-indic-machine.rl" +#line 90 "hb-ot-shape-complex-indic-machine.rl" {{p = ((te))-1;}{ found_syllable (standalone_cluster); }} break; case 4: -#line 93 "hb-ot-shape-complex-indic-machine.rl" +#line 92 "hb-ot-shape-complex-indic-machine.rl" {{p = ((te))-1;}{ found_syllable (broken_cluster); }} break; case 5: @@ -1777,22 +1685,22 @@ _eof_trans: case 8: #line 1 "NONE" {te = p+1;} -#line 89 "hb-ot-shape-complex-indic-machine.rl" +#line 88 "hb-ot-shape-complex-indic-machine.rl" {act = 1;} break; case 6: #line 1 "NONE" {te = p+1;} -#line 93 "hb-ot-shape-complex-indic-machine.rl" +#line 92 "hb-ot-shape-complex-indic-machine.rl" {act = 5;} break; case 12: #line 1 "NONE" {te = p+1;} -#line 94 "hb-ot-shape-complex-indic-machine.rl" +#line 93 "hb-ot-shape-complex-indic-machine.rl" {act = 6;} break; -#line 1796 "hb-ot-shape-complex-indic-machine.hh" +#line 1704 "hb-ot-shape-complex-indic-machine.hh" } _again: @@ -1801,7 +1709,7 @@ _again: #line 1 "NONE" {ts = 0;} break; -#line 1805 "hb-ot-shape-complex-indic-machine.hh" +#line 1713 "hb-ot-shape-complex-indic-machine.hh" } if ( ++p != pe ) @@ -1817,7 +1725,7 @@ _again: } -#line 128 "hb-ot-shape-complex-indic-machine.rl" +#line 127 "hb-ot-shape-complex-indic-machine.rl" } diff --git a/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-indic-private.hh b/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-indic-private.hh index 3de5c203fa..d8dfc6507d 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-indic-private.hh +++ b/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-indic-private.hh @@ -53,17 +53,29 @@ enum indic_category_t { OT_SM = 8, OT_VD = 9, OT_A = 10, - OT_NBSP = 11, + OT_PLACEHOLDER = 11, OT_DOTTEDCIRCLE = 12, OT_RS = 13, /* Register Shifter, used in Khmer OT spec. */ OT_Coeng = 14, /* Khmer-style Virama. */ OT_Repha = 15, /* Atomically-encoded logical or visual repha. */ OT_Ra = 16, OT_CM = 17, /* Consonant-Medial. */ - OT_Avag = 18, /* Avagraha. */ + OT_Symbol = 18, /* Avagraha, etc that take marks (SM,A,VD). */ OT_CM2 = 31 /* Consonant-Medial, second slot. */ }; +#define MEDIAL_FLAGS (FLAG (OT_CM) | FLAG (OT_CM2)) + +/* Note: + * + * We treat Vowels and placeholders as if they were consonants. This is safe because Vowels + * cannot happen in a consonant syllable. The plus side however is, we can call the + * consonant syllable logic from the vowel syllable function and get it all right! */ +#define CONSONANT_FLAGS (FLAG (OT_C) | FLAG (OT_Ra) | MEDIAL_FLAGS | FLAG (OT_V) | FLAG (OT_PLACEHOLDER) | FLAG (OT_DOTTEDCIRCLE)) +#define JOINER_FLAGS (FLAG (OT_ZWJ) | FLAG (OT_ZWNJ)) +#define HALANT_OR_COENG_FLAGS (FLAG (OT_H) | FLAG (OT_Coeng)) + + /* Visual positions in a syllable from left to right. */ enum indic_position_t { POS_START, @@ -93,57 +105,74 @@ enum indic_position_t { /* Categories used in IndicSyllabicCategory.txt from UCD. */ enum indic_syllabic_category_t { - INDIC_SYLLABIC_CATEGORY_OTHER = OT_X, - - INDIC_SYLLABIC_CATEGORY_AVAGRAHA = OT_Avag, - INDIC_SYLLABIC_CATEGORY_BINDU = OT_SM, - INDIC_SYLLABIC_CATEGORY_CONSONANT = OT_C, - INDIC_SYLLABIC_CATEGORY_CONSONANT_DEAD = OT_C, - INDIC_SYLLABIC_CATEGORY_CONSONANT_FINAL = OT_CM, - INDIC_SYLLABIC_CATEGORY_CONSONANT_HEAD_LETTER = OT_C, - INDIC_SYLLABIC_CATEGORY_CONSONANT_MEDIAL = OT_CM, - INDIC_SYLLABIC_CATEGORY_CONSONANT_PLACEHOLDER = OT_NBSP, - INDIC_SYLLABIC_CATEGORY_CONSONANT_SUBJOINED = OT_CM, - INDIC_SYLLABIC_CATEGORY_CONSONANT_REPHA = OT_Repha, - INDIC_SYLLABIC_CATEGORY_MODIFYING_LETTER = OT_X, - INDIC_SYLLABIC_CATEGORY_NUKTA = OT_N, - INDIC_SYLLABIC_CATEGORY_REGISTER_SHIFTER = OT_RS, - INDIC_SYLLABIC_CATEGORY_TONE_LETTER = OT_X, - INDIC_SYLLABIC_CATEGORY_TONE_MARK = OT_N, - INDIC_SYLLABIC_CATEGORY_VIRAMA = OT_H, - INDIC_SYLLABIC_CATEGORY_VISARGA = OT_SM, - INDIC_SYLLABIC_CATEGORY_VOWEL = OT_V, - INDIC_SYLLABIC_CATEGORY_VOWEL_DEPENDENT = OT_M, - INDIC_SYLLABIC_CATEGORY_VOWEL_INDEPENDENT = OT_V + INDIC_SYLLABIC_CATEGORY_OTHER = OT_X, + + INDIC_SYLLABIC_CATEGORY_AVAGRAHA = OT_Symbol, + INDIC_SYLLABIC_CATEGORY_BINDU = OT_SM, + INDIC_SYLLABIC_CATEGORY_BRAHMI_JOINING_NUMBER = OT_PLACEHOLDER, /* TODO */ + INDIC_SYLLABIC_CATEGORY_CANTILLATION_MARK = OT_A, + INDIC_SYLLABIC_CATEGORY_CONSONANT = OT_C, + INDIC_SYLLABIC_CATEGORY_CONSONANT_DEAD = OT_C, + INDIC_SYLLABIC_CATEGORY_CONSONANT_FINAL = OT_CM, + INDIC_SYLLABIC_CATEGORY_CONSONANT_HEAD_LETTER = OT_C, + INDIC_SYLLABIC_CATEGORY_CONSONANT_MEDIAL = OT_CM, + INDIC_SYLLABIC_CATEGORY_CONSONANT_PLACEHOLDER = OT_PLACEHOLDER, + INDIC_SYLLABIC_CATEGORY_CONSONANT_PRECEDING_REPHA = OT_Repha, + INDIC_SYLLABIC_CATEGORY_CONSONANT_SUBJOINED = OT_CM, + INDIC_SYLLABIC_CATEGORY_CONSONANT_SUCCEEDING_REPHA = OT_N, + INDIC_SYLLABIC_CATEGORY_GEMINATION_MARK = OT_SM, + INDIC_SYLLABIC_CATEGORY_INVISIBLE_STACKER = OT_H, /* TODO */ + INDIC_SYLLABIC_CATEGORY_JOINER = OT_ZWJ, + INDIC_SYLLABIC_CATEGORY_MODIFYING_LETTER = OT_X, + INDIC_SYLLABIC_CATEGORY_NON_JOINER = OT_ZWNJ, + INDIC_SYLLABIC_CATEGORY_NUKTA = OT_N, + INDIC_SYLLABIC_CATEGORY_NUMBER = OT_PLACEHOLDER, + INDIC_SYLLABIC_CATEGORY_NUMBER_JOINER = OT_PLACEHOLDER, /* TODO */ + INDIC_SYLLABIC_CATEGORY_PURE_KILLER = OT_H, /* TODO */ + INDIC_SYLLABIC_CATEGORY_REGISTER_SHIFTER = OT_RS, + INDIC_SYLLABIC_CATEGORY_TONE_LETTER = OT_X, + INDIC_SYLLABIC_CATEGORY_TONE_MARK = OT_N, + INDIC_SYLLABIC_CATEGORY_VIRAMA = OT_H, + INDIC_SYLLABIC_CATEGORY_VISARGA = OT_SM, + INDIC_SYLLABIC_CATEGORY_VOWEL = OT_V, + INDIC_SYLLABIC_CATEGORY_VOWEL_DEPENDENT = OT_M, + INDIC_SYLLABIC_CATEGORY_VOWEL_INDEPENDENT = OT_V }; /* Categories used in IndicSMatraCategory.txt from UCD */ enum indic_matra_category_t { - INDIC_MATRA_CATEGORY_NOT_APPLICABLE = POS_END, + INDIC_MATRA_CATEGORY_NOT_APPLICABLE = POS_END, - INDIC_MATRA_CATEGORY_LEFT = POS_PRE_C, - INDIC_MATRA_CATEGORY_TOP = POS_ABOVE_C, - INDIC_MATRA_CATEGORY_BOTTOM = POS_BELOW_C, - INDIC_MATRA_CATEGORY_RIGHT = POS_POST_C, + INDIC_MATRA_CATEGORY_LEFT = POS_PRE_C, + INDIC_MATRA_CATEGORY_TOP = POS_ABOVE_C, + INDIC_MATRA_CATEGORY_BOTTOM = POS_BELOW_C, + INDIC_MATRA_CATEGORY_RIGHT = POS_POST_C, /* These should resolve to the position of the last part of the split sequence. */ - INDIC_MATRA_CATEGORY_BOTTOM_AND_RIGHT = INDIC_MATRA_CATEGORY_RIGHT, - INDIC_MATRA_CATEGORY_LEFT_AND_RIGHT = INDIC_MATRA_CATEGORY_RIGHT, - INDIC_MATRA_CATEGORY_TOP_AND_BOTTOM = INDIC_MATRA_CATEGORY_BOTTOM, - INDIC_MATRA_CATEGORY_TOP_AND_BOTTOM_AND_RIGHT = INDIC_MATRA_CATEGORY_RIGHT, - INDIC_MATRA_CATEGORY_TOP_AND_LEFT = INDIC_MATRA_CATEGORY_TOP, - INDIC_MATRA_CATEGORY_TOP_AND_LEFT_AND_RIGHT = INDIC_MATRA_CATEGORY_RIGHT, - INDIC_MATRA_CATEGORY_TOP_AND_RIGHT = INDIC_MATRA_CATEGORY_RIGHT, - - INDIC_MATRA_CATEGORY_INVISIBLE = INDIC_MATRA_CATEGORY_NOT_APPLICABLE, - INDIC_MATRA_CATEGORY_OVERSTRUCK = POS_AFTER_MAIN, - INDIC_MATRA_CATEGORY_VISUAL_ORDER_LEFT = POS_PRE_M + INDIC_MATRA_CATEGORY_BOTTOM_AND_RIGHT = INDIC_MATRA_CATEGORY_RIGHT, + INDIC_MATRA_CATEGORY_LEFT_AND_RIGHT = INDIC_MATRA_CATEGORY_RIGHT, + INDIC_MATRA_CATEGORY_TOP_AND_BOTTOM = INDIC_MATRA_CATEGORY_BOTTOM, + INDIC_MATRA_CATEGORY_TOP_AND_BOTTOM_AND_RIGHT = INDIC_MATRA_CATEGORY_RIGHT, + INDIC_MATRA_CATEGORY_TOP_AND_LEFT = INDIC_MATRA_CATEGORY_TOP, + INDIC_MATRA_CATEGORY_TOP_AND_LEFT_AND_RIGHT = INDIC_MATRA_CATEGORY_RIGHT, + INDIC_MATRA_CATEGORY_TOP_AND_RIGHT = INDIC_MATRA_CATEGORY_RIGHT, + + INDIC_MATRA_CATEGORY_OVERSTRUCK = POS_AFTER_MAIN, + INDIC_MATRA_CATEGORY_VISUAL_ORDER_LEFT = POS_PRE_M }; /* Note: We use ASSERT_STATIC_EXPR_ZERO() instead of ASSERT_STATIC_EXPR() and the comma operation * because gcc fails to optimize the latter and fills the table in at runtime. */ #define INDIC_COMBINE_CATEGORIES(S,M) \ - (ASSERT_STATIC_EXPR_ZERO (M == INDIC_MATRA_CATEGORY_NOT_APPLICABLE || (S == INDIC_SYLLABIC_CATEGORY_VIRAMA || S == INDIC_SYLLABIC_CATEGORY_VOWEL_DEPENDENT)) + \ + (ASSERT_STATIC_EXPR_ZERO (M == INDIC_MATRA_CATEGORY_NOT_APPLICABLE || \ + ( \ + S == INDIC_SYLLABIC_CATEGORY_CONSONANT_MEDIAL || \ + S == INDIC_SYLLABIC_CATEGORY_GEMINATION_MARK || \ + S == INDIC_SYLLABIC_CATEGORY_REGISTER_SHIFTER || \ + S == INDIC_SYLLABIC_CATEGORY_CONSONANT_SUCCEEDING_REPHA || \ + S == INDIC_SYLLABIC_CATEGORY_VIRAMA || \ + S == INDIC_SYLLABIC_CATEGORY_VOWEL_DEPENDENT || \ + false)) + \ ASSERT_STATIC_EXPR_ZERO (S < 255 && M < 255) + \ ((M << 8) | S)) diff --git a/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-indic-table.cc b/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-indic-table.cc index 18a022bc50..f58380e0c8 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-indic-table.cc +++ b/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-indic-table.cc @@ -6,54 +6,63 @@ * * on files with these headers: * - * # IndicSyllabicCategory-6.2.0.txt - * # Date: 2012-05-15, 21:12:00 GMT [KW] - * # IndicMatraCategory-6.2.0.txt - * # Date: 2012-05-15, 21:10:00 GMT [KW] - * # Blocks-6.2.0.txt - * # Date: 2012-05-14, 22:42:00 GMT [KW, LI] + * # IndicSyllabicCategory-7.0.0.txt + * # Date: 2014-06-03, 07:00:00 GMT [KW, LI, AG, RP] + * # IndicMatraCategory-7.0.0.txt + * # Date: 2014-06-03, 07:00:00 GMT [KW, LI, AG, RP] + * # Blocks-7.0.0.txt + * # Date: 2014-04-03, 23:23:00 GMT [RP, KW] */ #include "hb-ot-shape-complex-indic-private.hh" -#define ISC_A INDIC_SYLLABIC_CATEGORY_AVAGRAHA /* 11 chars; Avagraha */ -#define ISC_Bi INDIC_SYLLABIC_CATEGORY_BINDU /* 34 chars; Bindu */ -#define ISC_C INDIC_SYLLABIC_CATEGORY_CONSONANT /* 123 chars; Consonant */ -#define ISC_CD INDIC_SYLLABIC_CATEGORY_CONSONANT_DEAD /* 2 chars; Consonant_Dead */ -#define ISC_CF INDIC_SYLLABIC_CATEGORY_CONSONANT_FINAL /* 17 chars; Consonant_Final */ -#define ISC_CHL INDIC_SYLLABIC_CATEGORY_CONSONANT_HEAD_LETTER /* 1 chars; Consonant_Head_Letter */ -#define ISC_CM INDIC_SYLLABIC_CATEGORY_CONSONANT_MEDIAL /* 12 chars; Consonant_Medial */ -#define ISC_CP INDIC_SYLLABIC_CATEGORY_CONSONANT_PLACEHOLDER /* 4 chars; Consonant_Placeholder */ -#define ISC_CR INDIC_SYLLABIC_CATEGORY_CONSONANT_REPHA /* 5 chars; Consonant_Repha */ -#define ISC_CS INDIC_SYLLABIC_CATEGORY_CONSONANT_SUBJOINED /* 10 chars; Consonant_Subjoined */ +#define ISC_A INDIC_SYLLABIC_CATEGORY_AVAGRAHA /* 13 chars; Avagraha */ +#define ISC_Bi INDIC_SYLLABIC_CATEGORY_BINDU /* 59 chars; Bindu */ +#define ISC_BJN INDIC_SYLLABIC_CATEGORY_BRAHMI_JOINING_NUMBER /* 20 chars; Brahmi_Joining_Number */ +#define ISC_Ca INDIC_SYLLABIC_CATEGORY_CANTILLATION_MARK /* 30 chars; Cantillation_Mark */ +#define ISC_C INDIC_SYLLABIC_CATEGORY_CONSONANT /* 1744 chars; Consonant */ +#define ISC_CD INDIC_SYLLABIC_CATEGORY_CONSONANT_DEAD /* 7 chars; Consonant_Dead */ +#define ISC_CF INDIC_SYLLABIC_CATEGORY_CONSONANT_FINAL /* 61 chars; Consonant_Final */ +#define ISC_CHL INDIC_SYLLABIC_CATEGORY_CONSONANT_HEAD_LETTER /* 5 chars; Consonant_Head_Letter */ +#define ISC_CM INDIC_SYLLABIC_CATEGORY_CONSONANT_MEDIAL /* 19 chars; Consonant_Medial */ +#define ISC_CP INDIC_SYLLABIC_CATEGORY_CONSONANT_PLACEHOLDER /* 11 chars; Consonant_Placeholder */ +#define ISC_CPR INDIC_SYLLABIC_CATEGORY_CONSONANT_PRECEDING_REPHA /* 1 chars; Consonant_Preceding_Repha */ +#define ISC_CS INDIC_SYLLABIC_CATEGORY_CONSONANT_SUBJOINED /* 61 chars; Consonant_Subjoined */ +#define ISC_CSR INDIC_SYLLABIC_CATEGORY_CONSONANT_SUCCEEDING_REPHA /* 4 chars; Consonant_Succeeding_Repha */ +#define ISC_GM INDIC_SYLLABIC_CATEGORY_GEMINATION_MARK /* 2 chars; Gemination_Mark */ +#define ISC_IS INDIC_SYLLABIC_CATEGORY_INVISIBLE_STACKER /* 7 chars; Invisible_Stacker */ +#define ISC_ZWJ INDIC_SYLLABIC_CATEGORY_JOINER /* 1 chars; Joiner */ #define ISC_ML INDIC_SYLLABIC_CATEGORY_MODIFYING_LETTER /* 1 chars; Modifying_Letter */ -#define ISC_N INDIC_SYLLABIC_CATEGORY_NUKTA /* 12 chars; Nukta */ +#define ISC_ZWNJ INDIC_SYLLABIC_CATEGORY_NON_JOINER /* 1 chars; Non_Joiner */ +#define ISC_N INDIC_SYLLABIC_CATEGORY_NUKTA /* 18 chars; Nukta */ +#define ISC_Nd INDIC_SYLLABIC_CATEGORY_NUMBER /* 408 chars; Number */ +#define ISC_NJ INDIC_SYLLABIC_CATEGORY_NUMBER_JOINER /* 1 chars; Number_Joiner */ #define ISC_x INDIC_SYLLABIC_CATEGORY_OTHER /* 1 chars; Other */ -#define ISC_RS INDIC_SYLLABIC_CATEGORY_REGISTER_SHIFTER /* 1 chars; Register_Shifter */ -#define ISC_TL INDIC_SYLLABIC_CATEGORY_TONE_LETTER /* 3 chars; Tone_Letter */ -#define ISC_TM INDIC_SYLLABIC_CATEGORY_TONE_MARK /* 16 chars; Tone_Mark */ -#define ISC_V INDIC_SYLLABIC_CATEGORY_VIRAMA /* 34 chars; Virama */ -#define ISC_Vs INDIC_SYLLABIC_CATEGORY_VISARGA /* 25 chars; Visarga */ -#define ISC_Vo INDIC_SYLLABIC_CATEGORY_VOWEL /* 5 chars; Vowel */ -#define ISC_M INDIC_SYLLABIC_CATEGORY_VOWEL_DEPENDENT /* 165 chars; Vowel_Dependent */ -#define ISC_VI INDIC_SYLLABIC_CATEGORY_VOWEL_INDEPENDENT /* 59 chars; Vowel_Independent */ - -#define IMC_B INDIC_MATRA_CATEGORY_BOTTOM /* 65 chars; Bottom */ +#define ISC_PK INDIC_SYLLABIC_CATEGORY_PURE_KILLER /* 15 chars; Pure_Killer */ +#define ISC_RS INDIC_SYLLABIC_CATEGORY_REGISTER_SHIFTER /* 3 chars; Register_Shifter */ +#define ISC_TL INDIC_SYLLABIC_CATEGORY_TONE_LETTER /* 7 chars; Tone_Letter */ +#define ISC_TM INDIC_SYLLABIC_CATEGORY_TONE_MARK /* 62 chars; Tone_Mark */ +#define ISC_V INDIC_SYLLABIC_CATEGORY_VIRAMA /* 22 chars; Virama */ +#define ISC_Vs INDIC_SYLLABIC_CATEGORY_VISARGA /* 29 chars; Visarga */ +#define ISC_Vo INDIC_SYLLABIC_CATEGORY_VOWEL /* 30 chars; Vowel */ +#define ISC_M INDIC_SYLLABIC_CATEGORY_VOWEL_DEPENDENT /* 553 chars; Vowel_Dependent */ +#define ISC_VI INDIC_SYLLABIC_CATEGORY_VOWEL_INDEPENDENT /* 395 chars; Vowel_Independent */ + +#define IMC_B INDIC_MATRA_CATEGORY_BOTTOM /* 142 chars; Bottom */ #define IMC_BR INDIC_MATRA_CATEGORY_BOTTOM_AND_RIGHT /* 2 chars; Bottom_And_Right */ -#define IMC_I INDIC_MATRA_CATEGORY_INVISIBLE /* 6 chars; Invisible */ -#define IMC_L INDIC_MATRA_CATEGORY_LEFT /* 30 chars; Left */ -#define IMC_LR INDIC_MATRA_CATEGORY_LEFT_AND_RIGHT /* 8 chars; Left_And_Right */ +#define IMC_L INDIC_MATRA_CATEGORY_LEFT /* 57 chars; Left */ +#define IMC_LR INDIC_MATRA_CATEGORY_LEFT_AND_RIGHT /* 21 chars; Left_And_Right */ #define IMC_x INDIC_MATRA_CATEGORY_NOT_APPLICABLE /* 1 chars; Not_Applicable */ #define IMC_O INDIC_MATRA_CATEGORY_OVERSTRUCK /* 2 chars; Overstruck */ -#define IMC_R INDIC_MATRA_CATEGORY_RIGHT /* 75 chars; Right */ -#define IMC_T INDIC_MATRA_CATEGORY_TOP /* 83 chars; Top */ -#define IMC_TB INDIC_MATRA_CATEGORY_TOP_AND_BOTTOM /* 6 chars; Top_And_Bottom */ +#define IMC_R INDIC_MATRA_CATEGORY_RIGHT /* 163 chars; Right */ +#define IMC_T INDIC_MATRA_CATEGORY_TOP /* 169 chars; Top */ +#define IMC_TB INDIC_MATRA_CATEGORY_TOP_AND_BOTTOM /* 10 chars; Top_And_Bottom */ #define IMC_TBR INDIC_MATRA_CATEGORY_TOP_AND_BOTTOM_AND_RIGHT /* 1 chars; Top_And_Bottom_And_Right */ -#define IMC_TL INDIC_MATRA_CATEGORY_TOP_AND_LEFT /* 4 chars; Top_And_Left */ -#define IMC_TLR INDIC_MATRA_CATEGORY_TOP_AND_LEFT_AND_RIGHT /* 2 chars; Top_And_Left_And_Right */ -#define IMC_TR INDIC_MATRA_CATEGORY_TOP_AND_RIGHT /* 8 chars; Top_And_Right */ -#define IMC_VOL INDIC_MATRA_CATEGORY_VISUAL_ORDER_LEFT /* 5 chars; Visual_Order_Left */ +#define IMC_TL INDIC_MATRA_CATEGORY_TOP_AND_LEFT /* 6 chars; Top_And_Left */ +#define IMC_TLR INDIC_MATRA_CATEGORY_TOP_AND_LEFT_AND_RIGHT /* 4 chars; Top_And_Left_And_Right */ +#define IMC_TR INDIC_MATRA_CATEGORY_TOP_AND_RIGHT /* 13 chars; Top_And_Right */ +#define IMC_VOL INDIC_MATRA_CATEGORY_VISUAL_ORDER_LEFT /* 15 chars; Visual_Order_Left */ #define _(S,M) INDIC_COMBINE_CATEGORIES (ISC_##S, IMC_##M) @@ -61,10 +70,26 @@ static const INDIC_TABLE_ELEMENT_TYPE indic_table[] = { -#define indic_offset_0x0900 0 +#define indic_offset_0x0028u 0 - /* Devanagari (0900..097F) */ + /* Basic Latin */ + + /* 0028 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(CP,x), _(x,x), _(x,x), + /* 0030 */ _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), + /* 0038 */ _(Nd,x), _(Nd,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + +#define indic_offset_0x00d0u 24 + + + /* Latin-1 Supplement */ + + /* 00D0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(CP,x), + +#define indic_offset_0x0900u 32 + + + /* Devanagari */ /* 0900 */ _(Bi,x), _(Bi,x), _(Bi,x), _(Vs,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), /* 0908 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), @@ -76,14 +101,14 @@ static const INDIC_TABLE_ELEMENT_TYPE indic_table[] = { /* 0938 */ _(C,x), _(C,x), _(M,T), _(M,R), _(N,x), _(A,x), _(M,R), _(M,L), /* 0940 */ _(M,R), _(M,B), _(M,B), _(M,B), _(M,B), _(M,T), _(M,T), _(M,T), /* 0948 */ _(M,T), _(M,R), _(M,R), _(M,R), _(M,R), _(V,B), _(M,L), _(M,R), - /* 0950 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(M,T), _(M,B), _(M,B), + /* 0950 */ _(x,x), _(TM,x), _(TM,x), _(x,x), _(x,x), _(M,T), _(M,B), _(M,B), /* 0958 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 0960 */ _(VI,x), _(VI,x), _(M,B), _(M,B), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0968 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0960 */ _(VI,x), _(VI,x), _(M,B), _(M,B), _(x,x), _(x,x), _(Nd,x), _(Nd,x), + /* 0968 */ _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), /* 0970 */ _(x,x), _(x,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), - /* 0978 */ _(x,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 0978 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* Bengali (0980..09FF) */ + /* Bengali */ /* 0980 */ _(x,x), _(Bi,x), _(Bi,x), _(Vs,x), _(x,x), _(VI,x), _(VI,x), _(VI,x), /* 0988 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(x,x), _(x,x), _(VI,x), @@ -97,12 +122,12 @@ static const INDIC_TABLE_ELEMENT_TYPE indic_table[] = { /* 09C8 */ _(M,L), _(x,x), _(x,x), _(M,LR), _(M,LR), _(V,B), _(CD,x), _(x,x), /* 09D0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(M,R), /* 09D8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(C,x), _(C,x), _(x,x), _(C,x), - /* 09E0 */ _(VI,x), _(VI,x), _(M,B), _(M,B), _(x,x), _(x,x), _(x,x), _(x,x), - /* 09E8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 09E0 */ _(VI,x), _(VI,x), _(M,B), _(M,B), _(x,x), _(x,x), _(Nd,x), _(Nd,x), + /* 09E8 */ _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), /* 09F0 */ _(C,x), _(C,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), /* 09F8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* Gurmukhi (0A00..0A7F) */ + /* Gurmukhi */ /* 0A00 */ _(x,x), _(Bi,x), _(Bi,x), _(Vs,x), _(x,x), _(VI,x), _(VI,x), _(VI,x), /* 0A08 */ _(VI,x), _(VI,x), _(VI,x), _(x,x), _(x,x), _(x,x), _(x,x), _(VI,x), @@ -116,12 +141,12 @@ static const INDIC_TABLE_ELEMENT_TYPE indic_table[] = { /* 0A48 */ _(M,T), _(x,x), _(x,x), _(M,T), _(M,T), _(V,B), _(x,x), _(x,x), /* 0A50 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), /* 0A58 */ _(x,x), _(C,x), _(C,x), _(C,x), _(C,x), _(x,x), _(C,x), _(x,x), - /* 0A60 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0A68 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0A70 */ _(Bi,x), _(x,x), _(CP,x), _(CP,x), _(x,x), _(CM,x), _(x,x), _(x,x), + /* 0A60 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(Nd,x), _(Nd,x), + /* 0A68 */ _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), + /* 0A70 */ _(Bi,x), _(GM,T), _(CP,x), _(CP,x), _(x,x), _(CM,x), _(x,x), _(x,x), /* 0A78 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* Gujarati (0A80..0AFF) */ + /* Gujarati */ /* 0A80 */ _(x,x), _(Bi,x), _(Bi,x), _(Vs,x), _(x,x), _(VI,x), _(VI,x), _(VI,x), /* 0A88 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(x,x), _(VI,x), @@ -135,12 +160,12 @@ static const INDIC_TABLE_ELEMENT_TYPE indic_table[] = { /* 0AC8 */ _(M,T), _(M,TR), _(x,x), _(M,R), _(M,R), _(V,B), _(x,x), _(x,x), /* 0AD0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), /* 0AD8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0AE0 */ _(VI,x), _(VI,x), _(M,B), _(M,B), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0AE8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0AE0 */ _(VI,x), _(VI,x), _(M,B), _(M,B), _(x,x), _(x,x), _(Nd,x), _(Nd,x), + /* 0AE8 */ _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), /* 0AF0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), /* 0AF8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* Oriya (0B00..0B7F) */ + /* Oriya */ /* 0B00 */ _(x,x), _(Bi,x), _(Bi,x), _(Vs,x), _(x,x), _(VI,x), _(VI,x), _(VI,x), /* 0B08 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(x,x), _(x,x), _(VI,x), @@ -154,12 +179,12 @@ static const INDIC_TABLE_ELEMENT_TYPE indic_table[] = { /* 0B48 */ _(M,TL), _(x,x), _(x,x), _(M,LR),_(M,TLR), _(V,B), _(x,x), _(x,x), /* 0B50 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(M,T), _(M,TR), /* 0B58 */ _(x,x), _(x,x), _(x,x), _(x,x), _(C,x), _(C,x), _(x,x), _(C,x), - /* 0B60 */ _(VI,x), _(VI,x), _(M,B), _(M,B), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0B68 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0B60 */ _(VI,x), _(VI,x), _(M,B), _(M,B), _(x,x), _(x,x), _(Nd,x), _(Nd,x), + /* 0B68 */ _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), /* 0B70 */ _(x,x), _(C,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), /* 0B78 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* Tamil (0B80..0BFF) */ + /* Tamil */ /* 0B80 */ _(x,x), _(x,x), _(Bi,x), _(ML,x), _(x,x), _(VI,x), _(VI,x), _(VI,x), /* 0B88 */ _(VI,x), _(VI,x), _(VI,x), _(x,x), _(x,x), _(x,x), _(VI,x), _(VI,x), @@ -173,33 +198,33 @@ static const INDIC_TABLE_ELEMENT_TYPE indic_table[] = { /* 0BC8 */ _(M,L), _(x,x), _(M,LR), _(M,LR), _(M,LR), _(V,T), _(x,x), _(x,x), /* 0BD0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(M,R), /* 0BD8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0BE0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0BE8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0BE0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(Nd,x), _(Nd,x), + /* 0BE8 */ _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), /* 0BF0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), /* 0BF8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* Telugu (0C00..0C7F) */ + /* Telugu */ - /* 0C00 */ _(x,x), _(Bi,x), _(Bi,x), _(Vs,x), _(x,x), _(VI,x), _(VI,x), _(VI,x), + /* 0C00 */ _(Bi,x), _(Bi,x), _(Bi,x), _(Vs,x), _(x,x), _(VI,x), _(VI,x), _(VI,x), /* 0C08 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(x,x), _(VI,x), _(VI,x), /* 0C10 */ _(VI,x), _(x,x), _(VI,x), _(VI,x), _(VI,x), _(C,x), _(C,x), _(C,x), /* 0C18 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), /* 0C20 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), /* 0C28 */ _(C,x), _(x,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 0C30 */ _(C,x), _(C,x), _(C,x), _(C,x), _(x,x), _(C,x), _(C,x), _(C,x), + /* 0C30 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), /* 0C38 */ _(C,x), _(C,x), _(x,x), _(x,x), _(x,x), _(A,x), _(M,T), _(M,T), /* 0C40 */ _(M,T), _(M,R), _(M,R), _(M,R), _(M,R), _(x,x), _(M,T), _(M,T), /* 0C48 */ _(M,TB), _(x,x), _(M,T), _(M,T), _(M,T), _(V,T), _(x,x), _(x,x), /* 0C50 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(M,T), _(M,B), _(x,x), /* 0C58 */ _(C,x), _(C,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0C60 */ _(VI,x), _(VI,x), _(M,B), _(M,B), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0C68 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0C60 */ _(VI,x), _(VI,x), _(M,B), _(M,B), _(x,x), _(x,x), _(Nd,x), _(Nd,x), + /* 0C68 */ _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), /* 0C70 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), /* 0C78 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* Kannada (0C80..0CFF) */ + /* Kannada */ - /* 0C80 */ _(x,x), _(x,x), _(Bi,x), _(Vs,x), _(x,x), _(VI,x), _(VI,x), _(VI,x), + /* 0C80 */ _(x,x), _(Bi,x), _(Bi,x), _(Vs,x), _(x,x), _(VI,x), _(VI,x), _(VI,x), /* 0C88 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(x,x), _(VI,x), _(VI,x), /* 0C90 */ _(VI,x), _(x,x), _(VI,x), _(VI,x), _(VI,x), _(C,x), _(C,x), _(C,x), /* 0C98 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), @@ -211,14 +236,14 @@ static const INDIC_TABLE_ELEMENT_TYPE indic_table[] = { /* 0CC8 */ _(M,TR), _(x,x), _(M,TR), _(M,TR), _(M,T), _(V,T), _(x,x), _(x,x), /* 0CD0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(M,R), _(M,R), _(x,x), /* 0CD8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(C,x), _(x,x), - /* 0CE0 */ _(VI,x), _(VI,x), _(M,B), _(M,B), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0CE8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0CE0 */ _(VI,x), _(VI,x), _(M,B), _(M,B), _(x,x), _(x,x), _(Nd,x), _(Nd,x), + /* 0CE8 */ _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), /* 0CF0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), /* 0CF8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* Malayalam (0D00..0D7F) */ + /* Malayalam */ - /* 0D00 */ _(x,x), _(x,x), _(Bi,x), _(Vs,x), _(x,x), _(VI,x), _(VI,x), _(VI,x), + /* 0D00 */ _(x,x), _(Bi,x), _(Bi,x), _(Vs,x), _(x,x), _(VI,x), _(VI,x), _(VI,x), /* 0D08 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(x,x), _(VI,x), _(VI,x), /* 0D10 */ _(VI,x), _(x,x), _(VI,x), _(VI,x), _(VI,x), _(C,x), _(C,x), _(C,x), /* 0D18 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), @@ -227,15 +252,15 @@ static const INDIC_TABLE_ELEMENT_TYPE indic_table[] = { /* 0D30 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), /* 0D38 */ _(C,x), _(C,x), _(C,x), _(x,x), _(x,x), _(A,x), _(M,R), _(M,R), /* 0D40 */ _(M,R), _(M,R), _(M,R), _(M,B), _(M,B), _(x,x), _(M,L), _(M,L), - /* 0D48 */ _(M,L), _(x,x), _(M,LR), _(M,LR), _(M,LR), _(V,T), _(CR,x), _(x,x), + /* 0D48 */ _(M,L), _(x,x), _(M,LR), _(M,LR), _(M,LR), _(V,T),_(CPR,x), _(x,x), /* 0D50 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(M,R), /* 0D58 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0D60 */ _(VI,x), _(VI,x), _(M,B), _(M,B), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0D68 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0D60 */ _(VI,x), _(VI,x), _(M,B), _(M,B), _(x,x), _(x,x), _(Nd,x), _(Nd,x), + /* 0D68 */ _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), /* 0D70 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), /* 0D78 */ _(x,x), _(x,x), _(CD,x), _(CD,x), _(CD,x), _(CD,x), _(CD,x), _(CD,x), - /* Sinhala (0D80..0DFF) */ + /* Sinhala */ /* 0D80 */ _(x,x), _(x,x), _(Bi,x), _(Vs,x), _(x,x), _(VI,x), _(VI,x), _(VI,x), /* 0D88 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), @@ -248,86 +273,15 @@ static const INDIC_TABLE_ELEMENT_TYPE indic_table[] = { /* 0DC0 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(x,x), /* 0DC8 */ _(x,x), _(x,x), _(V,T), _(x,x), _(x,x), _(x,x), _(x,x), _(M,R), /* 0DD0 */ _(M,R), _(M,R), _(M,T), _(M,T), _(M,B), _(x,x), _(M,B), _(x,x), - /* 0DD8 */ _(M,R), _(M,L), _(M,TL), _(M,L), _(M,LR), _(M,LR), _(M,LR), _(M,R), - /* 0DE0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0DE8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 0DD8 */ _(M,R), _(M,L), _(M,TL), _(M,L), _(M,LR),_(M,TLR), _(M,LR), _(M,R), + /* 0DE0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(Nd,x), _(Nd,x), + /* 0DE8 */ _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), /* 0DF0 */ _(x,x), _(x,x), _(M,R), _(M,R), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0DF8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - - /* Thai (0E00..0E7F) */ - - /* 0E00 */ _(x,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 0E08 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 0E10 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 0E18 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 0E20 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 0E28 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(x,x), - /* 0E30 */ _(M,R), _(M,T), _(M,R), _(M,R), _(M,T), _(M,T), _(M,T), _(M,T), - /* 0E38 */ _(M,B), _(M,B), _(V,B), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0E40 */_(M,VOL),_(M,VOL),_(M,VOL),_(M,VOL),_(M,VOL), _(M,R), _(x,x), _(M,T), - /* 0E48 */ _(TM,x), _(TM,x), _(TM,x), _(TM,x), _(x,x), _(Bi,x), _(V,T), _(x,x), - /* 0E50 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0E58 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0E60 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0E68 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0E70 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0E78 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - - /* Lao (0E80..0EFF) */ - - /* 0E80 */ _(x,x), _(C,x), _(C,x), _(x,x), _(C,x), _(x,x), _(x,x), _(C,x), - /* 0E88 */ _(C,x), _(x,x), _(C,x), _(x,x), _(x,x), _(C,x), _(x,x), _(x,x), - /* 0E90 */ _(x,x), _(x,x), _(x,x), _(x,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 0E98 */ _(x,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 0EA0 */ _(x,x), _(C,x), _(C,x), _(C,x), _(x,x), _(C,x), _(x,x), _(C,x), - /* 0EA8 */ _(x,x), _(x,x), _(C,x), _(C,x), _(x,x), _(C,x), _(C,x), _(x,x), - /* 0EB0 */ _(M,R), _(M,T), _(M,R), _(M,R), _(M,T), _(M,T), _(M,T), _(M,T), - /* 0EB8 */ _(M,B), _(M,B), _(x,x), _(M,T), _(CM,x), _(CM,x), _(x,x), _(x,x), - /* 0EC0 */_(M,VOL),_(M,VOL),_(M,VOL),_(M,VOL),_(M,VOL), _(x,x), _(x,x), _(x,x), - /* 0EC8 */ _(TM,x), _(TM,x), _(TM,x), _(TM,x), _(x,x), _(Bi,x), _(x,x), _(x,x), - /* 0ED0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0ED8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(C,x), _(C,x), _(x,x), _(x,x), - /* 0EE0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0EE8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0EF0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0EF8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - - /* Tibetan (0F00..0FFF) */ - - /* 0F00 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0F08 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0F10 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0F18 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0F20 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0F28 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0F30 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0F38 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0F40 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 0F48 */ _(x,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 0F50 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 0F58 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 0F60 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 0F68 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(x,x), _(x,x), _(x,x), - /* 0F70 */ _(x,x), _(M,B), _(M,T), _(M,TB), _(M,B), _(M,B), _(M,TB), _(M,TB), - /* 0F78 */ _(M,TB), _(M,TB), _(M,T), _(M,T), _(M,T), _(M,T), _(Bi,x), _(Vs,x), - /* 0F80 */ _(M,T), _(M,TB), _(Bi,x), _(Bi,x), _(V,B), _(A,x), _(x,x), _(x,x), - /* 0F88 */_(CHL,x),_(CHL,x),_(CHL,x),_(CHL,x),_(CHL,x), _(CS,x), _(CS,x), _(CS,x), - /* 0F90 */ _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), - /* 0F98 */ _(x,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), - /* 0FA0 */ _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), - /* 0FA8 */ _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), - /* 0FB0 */ _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), - /* 0FB8 */ _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(x,x), _(x,x), _(x,x), - /* 0FC0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0FC8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0FD0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0FD8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0FE0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0FE8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0FF0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 0FF8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - - /* Myanmar (1000..109F) */ + +#define indic_offset_0x1000u 1304 + + + /* Myanmar */ /* 1000 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), /* 1008 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), @@ -336,9 +290,9 @@ static const INDIC_TABLE_ELEMENT_TYPE indic_table[] = { /* 1020 */ _(C,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), /* 1028 */ _(VI,x), _(VI,x), _(VI,x), _(M,R), _(M,R), _(M,T), _(M,T), _(M,B), /* 1030 */ _(M,B), _(M,L), _(M,T), _(M,T), _(M,T), _(M,T), _(Bi,x), _(TM,x), - /* 1038 */ _(Vs,x), _(V,I), _(V,T), _(CM,x), _(CM,x), _(CM,x), _(CM,x), _(C,x), - /* 1040 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 1048 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 1038 */ _(Vs,x), _(IS,x), _(PK,T), _(CM,x), _(CM,x), _(CM,x), _(CM,x), _(C,x), + /* 1040 */ _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), + /* 1048 */ _(Nd,x), _(Nd,x), _(x,x), _(x,x), _(x,x), _(x,x), _(CP,x), _(x,x), /* 1050 */ _(C,x), _(C,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(M,R), _(M,R), /* 1058 */ _(M,B), _(M,B), _(C,x), _(C,x), _(C,x), _(C,x), _(CM,x), _(CM,x), /* 1060 */ _(CM,x), _(C,x), _(M,R), _(TM,x), _(TM,x), _(C,x), _(C,x), _(M,R), @@ -347,41 +301,41 @@ static const INDIC_TABLE_ELEMENT_TYPE indic_table[] = { /* 1078 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), /* 1080 */ _(C,x), _(C,x), _(CM,x), _(M,R), _(M,L), _(M,T), _(M,T), _(TM,x), /* 1088 */ _(TM,x), _(TM,x), _(TM,x), _(TM,x), _(TM,x), _(TM,x), _(C,x), _(TM,x), - /* 1090 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 1098 */ _(x,x), _(x,x), _(TM,x), _(TM,x), _(M,R), _(M,T), _(x,x), _(x,x), + /* 1090 */ _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), + /* 1098 */ _(Nd,x), _(Nd,x), _(TM,x), _(TM,x), _(M,R), _(M,T), _(x,x), _(x,x), -#define indic_offset_0x1700 1952 +#define indic_offset_0x1700u 1464 - /* Tagalog (1700..171F) */ + /* Tagalog */ /* 1700 */ _(VI,x), _(VI,x), _(VI,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), /* 1708 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(x,x), _(C,x), _(C,x), - /* 1710 */ _(C,x), _(C,x), _(M,T), _(M,B), _(V,B), _(x,x), _(x,x), _(x,x), + /* 1710 */ _(C,x), _(C,x), _(M,T), _(M,B), _(PK,B), _(x,x), _(x,x), _(x,x), /* 1718 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* Hanunoo (1720..173F) */ + /* Hanunoo */ /* 1720 */ _(VI,x), _(VI,x), _(VI,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), /* 1728 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 1730 */ _(C,x), _(C,x), _(M,T), _(M,B), _(V,B), _(x,x), _(x,x), _(x,x), + /* 1730 */ _(C,x), _(C,x), _(M,T), _(M,B), _(PK,B), _(x,x), _(x,x), _(x,x), /* 1738 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* Buhid (1740..175F) */ + /* Buhid */ /* 1740 */ _(VI,x), _(VI,x), _(VI,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), /* 1748 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), /* 1750 */ _(C,x), _(C,x), _(M,T), _(M,B), _(x,x), _(x,x), _(x,x), _(x,x), /* 1758 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* Tagbanwa (1760..177F) */ + /* Tagbanwa */ /* 1760 */ _(VI,x), _(VI,x), _(VI,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), /* 1768 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(x,x), _(C,x), _(C,x), /* 1770 */ _(C,x), _(x,x), _(M,T), _(M,B), _(x,x), _(x,x), _(x,x), _(x,x), /* 1778 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* Khmer (1780..17FF) */ + /* Khmer */ /* 1780 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), /* 1788 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), @@ -392,31 +346,29 @@ static const INDIC_TABLE_ELEMENT_TYPE indic_table[] = { /* 17B0 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(x,x), _(x,x), _(M,R), _(M,T), /* 17B8 */ _(M,T), _(M,T), _(M,T), _(M,B), _(M,B), _(M,B), _(M,TL),_(M,TLR), /* 17C0 */ _(M,LR), _(M,L), _(M,L), _(M,L), _(M,LR), _(M,LR), _(Bi,x), _(Vs,x), - /* 17C8 */ _(M,R), _(RS,x), _(RS,x), _(x,x), _(CR,x), _(x,x), _(x,x), _(x,x), - /* 17D0 */ _(x,x), _(V,T), _(V,I), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 17C8 */ _(M,R), _(RS,T), _(RS,T), _(RS,T),_(CSR,T), _(M,T), _(M,T), _(M,T), + /* 17D0 */ _(M,T), _(PK,T), _(IS,x), _(M,T), _(x,x), _(x,x), _(x,x), _(x,x), /* 17D8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(A,x), _(x,x), _(x,x), _(x,x), - /* 17E0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 17E8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 17F0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 17F8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 17E0 */ _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), + /* 17E8 */ _(Nd,x), _(Nd,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), -#define indic_offset_0x1900 2208 +#define indic_offset_0x1900u 1704 - /* Limbu (1900..194F) */ + /* Limbu */ /* 1900 */ _(CP,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), /* 1908 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), /* 1910 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 1918 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(x,x), _(x,x), _(x,x), + /* 1918 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(x,x), /* 1920 */ _(M,T), _(M,T), _(M,B), _(M,R), _(M,R), _(M,TR), _(M,TR), _(M,T), /* 1928 */ _(M,T), _(CS,x), _(CS,x), _(CS,x), _(x,x), _(x,x), _(x,x), _(x,x), /* 1930 */ _(CF,x), _(CF,x), _(Bi,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), /* 1938 */ _(CF,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 1940 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 1948 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 1940 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(Nd,x), _(Nd,x), + /* 1948 */ _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), - /* Tai Le (1950..197F) */ + /* Tai Le */ /* 1950 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), /* 1958 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), @@ -425,7 +377,7 @@ static const INDIC_TABLE_ELEMENT_TYPE indic_table[] = { /* 1970 */ _(TL,x), _(TL,x), _(TL,x), _(TL,x), _(TL,x), _(x,x), _(x,x), _(x,x), /* 1978 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* New Tai Lue (1980..19DF) */ + /* New Tai Lue */ /* 1980 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), /* 1988 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), @@ -437,24 +389,21 @@ static const INDIC_TABLE_ELEMENT_TYPE indic_table[] = { /* 19B8 */ _(M,R), _(M,R), _(M,L), _(M,R), _(M,R), _(M,R), _(M,R), _(M,R), /* 19C0 */ _(M,R), _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), /* 19C8 */ _(TM,x), _(TM,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 19D0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 19D8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - - /* FILLER (19E0..19FF) */ - + /* 19D0 */ _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), + /* 19D8 */ _(Nd,x), _(Nd,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), /* 19E0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), /* 19E8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), /* 19F0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), /* 19F8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* Buginese (1A00..1A1F) */ + /* Buginese */ /* 1A00 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), /* 1A08 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), /* 1A10 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(M,T), - /* 1A18 */ _(M,B), _(M,L), _(M,R), _(M,L), _(x,x), _(x,x), _(x,x), _(x,x), + /* 1A18 */ _(M,B), _(M,L), _(M,R), _(M,T), _(x,x), _(x,x), _(x,x), _(x,x), - /* Tai Tham (1A20..1AAF) */ + /* Tai Tham */ /* 1A20 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), /* 1A28 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), @@ -462,25 +411,23 @@ static const INDIC_TABLE_ELEMENT_TYPE indic_table[] = { /* 1A38 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), /* 1A40 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), /* 1A48 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(VI,x), _(VI,x), _(VI,x), - /* 1A50 */ _(VI,x), _(VI,x), _(VI,x), _(C,x), _(C,x), _(CM,x), _(CM,x), _(CF,x), + /* 1A50 */ _(VI,x), _(VI,x), _(VI,x), _(C,x), _(C,x), _(CM,L), _(CM,x), _(CF,x), /* 1A58 */ _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(x,x), - /* 1A60 */ _(V,I), _(M,R), _(M,T), _(M,R), _(M,R), _(M,T), _(M,T), _(M,T), + /* 1A60 */ _(IS,x), _(M,R), _(M,T), _(M,R), _(M,R), _(M,T), _(M,T), _(M,T), /* 1A68 */ _(M,T), _(M,B), _(M,B), _(M,T), _(M,B), _(M,R), _(M,L), _(M,L), /* 1A70 */ _(M,L), _(M,L), _(M,L), _(M,T), _(M,T), _(TM,x), _(TM,x), _(TM,x), /* 1A78 */ _(TM,x), _(TM,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 1A80 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 1A88 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 1A90 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 1A98 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 1AA0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 1AA8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 1A80 */ _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), + /* 1A88 */ _(Nd,x), _(Nd,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 1A90 */ _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), + /* 1A98 */ _(Nd,x), _(Nd,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), -#define indic_offset_0x1b00 2640 +#define indic_offset_0x1b00u 2120 - /* Balinese (1B00..1B7F) */ + /* Balinese */ - /* 1B00 */ _(Bi,x), _(Bi,x), _(Bi,x), _(CR,x), _(Vs,x), _(VI,x), _(VI,x), _(VI,x), + /* 1B00 */ _(Bi,x), _(Bi,x), _(Bi,x),_(CSR,x), _(Vs,x), _(VI,x), _(VI,x), _(VI,x), /* 1B08 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), /* 1B10 */ _(VI,x), _(VI,x), _(VI,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), /* 1B18 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), @@ -490,36 +437,36 @@ static const INDIC_TABLE_ELEMENT_TYPE indic_table[] = { /* 1B38 */ _(M,B), _(M,B), _(M,B), _(M,BR), _(M,TB),_(M,TBR), _(M,L), _(M,L), /* 1B40 */ _(M,LR), _(M,LR), _(M,T), _(M,TR), _(V,R), _(C,x), _(C,x), _(C,x), /* 1B48 */ _(C,x), _(C,x), _(C,x), _(C,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 1B50 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 1B58 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 1B50 */ _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), + /* 1B58 */ _(Nd,x), _(Nd,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), /* 1B60 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), /* 1B68 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), /* 1B70 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), /* 1B78 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* Sundanese (1B80..1BBF) */ + /* Sundanese */ - /* 1B80 */ _(Bi,x), _(CR,x), _(Vs,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), + /* 1B80 */ _(Bi,x),_(CSR,x), _(Vs,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), /* 1B88 */ _(VI,x), _(VI,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), /* 1B90 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), /* 1B98 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), /* 1BA0 */ _(C,x), _(CS,x), _(CS,x), _(CS,x), _(M,T), _(M,B), _(M,L), _(M,R), - /* 1BA8 */ _(M,T), _(M,T), _(V,R), _(V,x), _(CS,x), _(CS,x), _(C,x), _(C,x), - /* 1BB0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 1BB8 */ _(x,x), _(x,x), _(A,x), _(C,x), _(C,x), _(C,x), _(CF,x), _(CF,x), + /* 1BA8 */ _(M,T), _(M,T), _(PK,R), _(IS,x), _(CS,x), _(CS,x), _(C,x), _(C,x), + /* 1BB0 */ _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), + /* 1BB8 */ _(Nd,x), _(Nd,x), _(A,x), _(C,x), _(C,x), _(C,x), _(CF,x), _(CF,x), - /* Batak (1BC0..1BFF) */ + /* Batak */ /* 1BC0 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), /* 1BC8 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), /* 1BD0 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), /* 1BD8 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), - /* 1BE0 */ _(C,x), _(C,x), _(C,x), _(C,x), _(VI,x), _(VI,x), _(N,x), _(M,x), - /* 1BE8 */ _(M,x), _(M,x), _(M,x), _(M,x), _(M,x), _(M,x), _(M,x), _(M,x), - /* 1BF0 */ _(CF,x), _(CF,x), _(V,R), _(V,R), _(x,x), _(x,x), _(x,x), _(x,x), + /* 1BE0 */ _(C,x), _(C,x), _(C,x), _(C,x), _(VI,x), _(VI,x), _(N,x), _(M,R), + /* 1BE8 */ _(M,T), _(M,T), _(M,R), _(M,R), _(M,R), _(M,T), _(M,R), _(M,T), + /* 1BF0 */ _(CF,x), _(CF,x), _(PK,R), _(PK,R), _(x,x), _(x,x), _(x,x), _(x,x), /* 1BF8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* Lepcha (1C00..1C4F) */ + /* Lepcha */ /* 1C00 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), /* 1C08 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), @@ -527,41 +474,45 @@ static const INDIC_TABLE_ELEMENT_TYPE indic_table[] = { /* 1C18 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), /* 1C20 */ _(C,x), _(C,x), _(C,x), _(C,x), _(CS,x), _(CS,x), _(M,R), _(M,L), /* 1C28 */ _(M,L), _(M,TL), _(M,R), _(M,R), _(M,B), _(CF,x), _(CF,x), _(CF,x), - /* 1C30 */ _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(Bi,x), _(Bi,x), _(x,x), _(N,x), + /* 1C30 */ _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(Bi,L), _(Bi,L), _(x,x), _(N,x), /* 1C38 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 1C40 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 1C48 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(C,x), _(C,x), _(C,x), + /* 1C40 */ _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), + /* 1C48 */ _(Nd,x), _(Nd,x), _(x,x), _(x,x), _(x,x), _(C,x), _(C,x), _(C,x), -#define indic_offset_0x1cd0 2976 +#define indic_offset_0x1cd0u 2456 - /* Vedic Extensions (1CD0..1CFF) */ + /* Vedic Extensions */ - /* 1CD0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 1CD8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 1CE0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 1CD0 */ _(TM,x), _(TM,x), _(TM,x), _(x,x), _(TM,x), _(TM,x), _(TM,x), _(TM,x), + /* 1CD8 */ _(TM,x), _(TM,x), _(TM,x), _(TM,x), _(TM,x), _(TM,x), _(TM,x), _(TM,x), + /* 1CE0 */ _(TM,x), _(TM,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), /* 1CE8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 1CF0 */ _(x,x), _(x,x), _(Vs,x), _(Vs,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 1CF8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 1CF0 */ _(x,x), _(x,x), _(Vs,x), _(Vs,x), _(TM,x), _(x,x), _(x,x), _(x,x), -#define indic_offset_0xa800 3024 +#define indic_offset_0x2008u 2496 - /* Syloti Nagri (A800..A82F) */ + /* General Punctuation */ - /* A800 */ _(VI,x), _(VI,x), _(x,x), _(VI,x), _(VI,x), _(VI,x), _(V,T), _(C,x), + /* 2008 */ _(x,x), _(x,x), _(x,x), _(x,x),_(ZWNJ,x),_(ZWJ,x), _(x,x), _(x,x), + /* 2010 */ _(x,x), _(x,x), _(CP,x), _(CP,x), _(CP,x), _(x,x), _(x,x), _(x,x), + +#define indic_offset_0xa800u 2512 + + + /* Syloti Nagri */ + + /* A800 */ _(VI,x), _(VI,x), _(x,x), _(VI,x), _(VI,x), _(VI,x), _(PK,T), _(C,x), /* A808 */ _(C,x), _(C,x), _(C,x), _(Bi,x), _(C,x), _(C,x), _(C,x), _(C,x), /* A810 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), /* A818 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), /* A820 */ _(C,x), _(C,x), _(C,x), _(M,R), _(M,R), _(M,B), _(M,T), _(M,R), /* A828 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - - /* FILLER (A830..A83F) */ - /* A830 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), /* A838 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* Phags-pa (A840..A87F) */ + /* Phags-pa */ /* A840 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), /* A848 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), @@ -572,7 +523,7 @@ static const INDIC_TABLE_ELEMENT_TYPE indic_table[] = { /* A870 */ _(C,x), _(CS,x), _(C,x), _(Bi,x), _(x,x), _(x,x), _(x,x), _(x,x), /* A878 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* Saurashtra (A880..A8DF) */ + /* Saurashtra */ /* A880 */ _(Bi,x), _(Vs,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), /* A888 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), @@ -584,44 +535,41 @@ static const INDIC_TABLE_ELEMENT_TYPE indic_table[] = { /* A8B8 */ _(M,R), _(M,R), _(M,R), _(M,R), _(M,R), _(M,R), _(M,R), _(M,R), /* A8C0 */ _(M,R), _(M,R), _(M,R), _(M,R), _(V,B), _(x,x), _(x,x), _(x,x), /* A8C8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* A8D0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* A8D8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* A8D0 */ _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), + /* A8D8 */ _(Nd,x), _(Nd,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* FILLER (A8E0..A8FF) */ + /* Devanagari Extended */ - /* A8E0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* A8E8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* A8F0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* A8E0 */ _(Ca,x), _(Ca,x), _(Ca,x), _(Ca,x), _(Ca,x), _(Ca,x), _(Ca,x), _(Ca,x), + /* A8E8 */ _(Ca,x), _(Ca,x), _(Ca,x), _(Ca,x), _(Ca,x), _(Ca,x), _(Ca,x), _(Ca,x), + /* A8F0 */ _(Ca,x), _(Ca,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), /* A8F8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* Kayah Li (A900..A92F) */ + /* Kayah Li */ - /* A900 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* A908 */ _(x,x), _(x,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* A900 */ _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), + /* A908 */ _(Nd,x), _(Nd,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), /* A910 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), /* A918 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), /* A920 */ _(C,x), _(C,x), _(Vo,x), _(Vo,x), _(Vo,x), _(Vo,x), _(Vo,x), _(Vo,x), /* A928 */ _(Vo,x), _(Vo,x), _(Vo,x), _(TM,x), _(TM,x), _(TM,x), _(x,x), _(x,x), - /* Rejang (A930..A95F) */ + /* Rejang */ /* A930 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), /* A938 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), /* A940 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(M,B), /* A948 */ _(M,B), _(M,B), _(M,T), _(M,B), _(M,B), _(M,B), _(M,B), _(CF,x), - /* A950 */ _(CF,x), _(CF,x), _(CF,x), _(V,R), _(x,x), _(x,x), _(x,x), _(x,x), + /* A950 */ _(CF,x), _(CF,x), _(CF,x), _(PK,R), _(x,x), _(x,x), _(x,x), _(x,x), /* A958 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - - /* FILLER (A960..A97F) */ - /* A960 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), /* A968 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), /* A970 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), /* A978 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* Javanese (A980..A9DF) */ + /* Javanese */ - /* A980 */ _(Bi,x), _(Bi,x), _(CR,x), _(Vs,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), + /* A980 */ _(Bi,x), _(Bi,x),_(CSR,x), _(Vs,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), /* A988 */ _(VI,x), _(C,x), _(C,x), _(C,x), _(VI,x), _(VI,x), _(VI,x), _(C,x), /* A990 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), /* A998 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), @@ -631,17 +579,17 @@ static const INDIC_TABLE_ELEMENT_TYPE indic_table[] = { /* A9B8 */ _(M,B), _(M,B), _(M,L), _(M,L), _(M,T), _(CS,x), _(CM,x), _(CM,x), /* A9C0 */ _(V,BR), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), /* A9C8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* A9D0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* A9D8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* A9D0 */ _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), + /* A9D8 */ _(Nd,x), _(Nd,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* FILLER (A9E0..A9FF) */ + /* Myanmar Extended-B */ - /* A9E0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* A9E8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* A9F0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* A9F8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* A9E0 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(x,x), _(x,x), _(C,x), + /* A9E8 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* A9F0 */ _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), + /* A9F8 */ _(Nd,x), _(Nd,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(x,x), - /* Cham (AA00..AA5F) */ + /* Cham */ /* AA00 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(C,x), _(C,x), /* AA08 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), @@ -649,21 +597,21 @@ static const INDIC_TABLE_ELEMENT_TYPE indic_table[] = { /* AA18 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), /* AA20 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), /* AA28 */ _(C,x), _(M,T), _(M,T), _(M,T), _(M,T), _(M,B), _(M,T), _(M,L), - /* AA30 */ _(M,L), _(M,T), _(M,B), _(CM,x), _(CM,x), _(CM,x), _(CM,x), _(x,x), + /* AA30 */ _(M,L), _(M,T), _(M,B), _(CM,x), _(CM,L), _(CM,x), _(CM,x), _(x,x), /* AA38 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), /* AA40 */ _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), /* AA48 */ _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(x,x), _(x,x), - /* AA50 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* AA58 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* AA50 */ _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), + /* AA58 */ _(Nd,x), _(Nd,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* Myanmar Extended-A (AA60..AA7F) */ + /* Myanmar Extended-A */ /* AA60 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), /* AA68 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), /* AA70 */ _(x,x), _(C,x), _(C,x), _(C,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* AA78 */ _(x,x), _(x,x), _(C,x), _(TM,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* AA78 */ _(x,x), _(x,x), _(C,x), _(TM,x), _(TM,x), _(TM,x), _(C,x), _(C,x), - /* Tai Viet (AA80..AADF) */ + /* Tai Viet */ /* AA80 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), /* AA88 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), @@ -678,31 +626,30 @@ static const INDIC_TABLE_ELEMENT_TYPE indic_table[] = { /* AAD0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), /* AAD8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* Meetei Mayek Extensions (AAE0..AAFF) */ + /* Meetei Mayek Extensions */ /* AAE0 */ _(VI,x), _(VI,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), /* AAE8 */ _(C,x), _(C,x), _(C,x), _(M,L), _(M,B), _(M,T), _(M,L), _(M,R), - /* AAF0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(Vs,x), _(V,I), _(x,x), - /* AAF8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* AAF0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(Vs,x), _(IS,x), _(x,x), -#define indic_offset_0xabc0 3792 +#define indic_offset_0xabc0u 3272 - /* Meetei Mayek (ABC0..ABFF) */ + /* Meetei Mayek */ /* ABC0 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), /* ABC8 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(VI,x), _(VI,x), /* ABD0 */ _(C,x), _(VI,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), /* ABD8 */ _(C,x), _(C,x), _(C,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), /* ABE0 */ _(CF,x), _(CF,x), _(CF,x), _(M,R), _(M,R), _(M,T), _(M,R), _(M,R), - /* ABE8 */ _(M,B), _(M,R), _(M,R), _(x,x), _(TM,x), _(V,B), _(x,x), _(x,x), - /* ABF0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* ABF8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* ABE8 */ _(M,B), _(M,R), _(M,R), _(x,x), _(TM,x), _(PK,B), _(x,x), _(x,x), + /* ABF0 */ _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), + /* ABF8 */ _(Nd,x), _(Nd,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), -#define indic_offset_0x10a00 3856 +#define indic_offset_0x10a00u 3336 - /* Kharoshthi (10A00..10A5F) */ + /* Kharoshthi */ /* 10A00 */ _(C,x), _(M,O), _(M,B), _(M,B), _(x,x), _(M,T), _(M,O), _(x,x), /* 10A08 */ _(x,x), _(x,x), _(x,x), _(x,x), _(M,B), _(x,x), _(Bi,x), _(Vs,x), @@ -711,16 +658,13 @@ static const INDIC_TABLE_ELEMENT_TYPE indic_table[] = { /* 10A20 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), /* 10A28 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), /* 10A30 */ _(C,x), _(C,x), _(C,x), _(C,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 10A38 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(V,I), - /* 10A40 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 10A48 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 10A50 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 10A58 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 10A38 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(IS,x), + /* 10A40 */ _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), -#define indic_offset_0x11000 3952 +#define indic_offset_0x11000u 3408 - /* Brahmi (11000..1107F) */ + /* Brahmi */ /* 11000 */ _(Bi,x), _(Bi,x), _(Vs,x), _(x,x), _(x,x), _(VI,x), _(VI,x), _(VI,x), /* 11008 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), @@ -732,14 +676,14 @@ static const INDIC_TABLE_ELEMENT_TYPE indic_table[] = { /* 11038 */ _(M,T), _(M,T), _(M,T), _(M,T), _(M,B), _(M,B), _(M,B), _(M,B), /* 11040 */ _(M,B), _(M,B), _(M,T), _(M,T), _(M,T), _(M,T), _(V,T), _(x,x), /* 11048 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 11050 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 11058 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 11060 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 11068 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 11050 */ _(x,x), _(x,x),_(BJN,x),_(BJN,x),_(BJN,x),_(BJN,x),_(BJN,x),_(BJN,x), + /* 11058 */_(BJN,x),_(BJN,x),_(BJN,x),_(BJN,x),_(BJN,x),_(BJN,x),_(BJN,x),_(BJN,x), + /* 11060 */_(BJN,x),_(BJN,x),_(BJN,x),_(BJN,x),_(BJN,x),_(BJN,x), _(Nd,x), _(Nd,x), + /* 11068 */ _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), /* 11070 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 11078 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 11078 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(NJ,x), - /* Kaithi (11080..110CF) */ + /* Kaithi */ /* 11080 */ _(Bi,x), _(Bi,x), _(Vs,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), /* 11088 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(C,x), _(C,x), _(C,x), @@ -749,13 +693,11 @@ static const INDIC_TABLE_ELEMENT_TYPE indic_table[] = { /* 110A8 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), /* 110B0 */ _(M,R), _(M,L), _(M,R), _(M,B), _(M,B), _(M,T), _(M,T), _(M,R), /* 110B8 */ _(M,R), _(V,B), _(N,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 110C0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 110C8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), -#define indic_offset_0x11100 4160 +#define indic_offset_0x11100u 3600 - /* Chakma (11100..1114F) */ + /* Chakma */ /* 11100 */ _(Bi,x), _(Bi,x), _(Vs,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(C,x), /* 11108 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), @@ -763,15 +705,21 @@ static const INDIC_TABLE_ELEMENT_TYPE indic_table[] = { /* 11118 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), /* 11120 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(M,T), /* 11128 */ _(M,T), _(M,T), _(M,B), _(M,B), _(M,L), _(M,T), _(M,TB), _(M,TB), - /* 11130 */ _(M,T), _(M,B), _(M,B), _(V,I), _(V,T), _(x,x), _(x,x), _(x,x), - /* 11138 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 11130 */ _(M,T), _(M,B), _(M,B), _(IS,x), _(PK,T), _(x,x), _(Nd,x), _(Nd,x), + /* 11138 */ _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), /* 11140 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), /* 11148 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), -#define indic_offset_0x11180 4240 + /* Mahajani */ + /* 11150 */ _(Vo,x), _(Vo,x), _(Vo,x), _(Vo,x), _(Vo,x), _(C,x), _(C,x), _(C,x), + /* 11158 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 11160 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 11168 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 11170 */ _(C,x), _(C,x), _(C,x), _(N,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 11178 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* Sharada (11180..111DF) */ + /* Sharada */ /* 11180 */ _(Bi,x), _(Bi,x), _(Vs,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), /* 11188 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), @@ -783,13 +731,116 @@ static const INDIC_TABLE_ELEMENT_TYPE indic_table[] = { /* 111B8 */ _(M,B), _(M,B), _(M,B), _(M,B), _(M,T), _(M,T), _(M,T), _(M,TR), /* 111C0 */ _(V,R), _(A,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), /* 111C8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 111D0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 111D8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - -#define indic_offset_0x11680 4336 - - - /* Takri (11680..116CF) */ + /* 111D0 */ _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), + /* 111D8 */ _(Nd,x), _(Nd,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + + /* Sinhala Archaic Numbers */ + + /* 111E0 */ _(x,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), + /* 111E8 */ _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), + /* 111F0 */ _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(x,x), _(x,x), _(x,x), + /* 111F8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + + /* Khojki */ + + /* 11200 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), + /* 11208 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 11210 */ _(C,x), _(C,x), _(x,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 11218 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 11220 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 11228 */ _(C,x), _(C,x), _(C,x), _(C,x), _(M,R), _(M,R), _(M,R), _(M,B), + /* 11230 */ _(M,T), _(M,T), _(M,TR), _(M,TR), _(Bi,x), _(V,R), _(N,x), _(GM,T), + +#define indic_offset_0x112b0u 3912 + + + /* Khudawadi */ + + /* 112B0 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), + /* 112B8 */ _(VI,x), _(VI,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 112C0 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 112C8 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 112D0 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 112D8 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(Bi,x), + /* 112E0 */ _(M,R), _(M,L), _(M,R), _(M,B), _(M,B), _(M,T), _(M,T), _(M,T), + /* 112E8 */ _(M,T), _(N,x), _(PK,B), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 112F0 */ _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), + /* 112F8 */ _(Nd,x), _(Nd,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + + /* Grantha */ + + /* 11300 */ _(x,x), _(Bi,x), _(Bi,x), _(Vs,x), _(x,x), _(VI,x), _(VI,x), _(VI,x), + /* 11308 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(x,x), _(x,x), _(VI,x), + /* 11310 */ _(VI,x), _(x,x), _(x,x), _(VI,x), _(VI,x), _(C,x), _(C,x), _(C,x), + /* 11318 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 11320 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 11328 */ _(C,x), _(x,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 11330 */ _(C,x), _(x,x), _(C,x), _(C,x), _(x,x), _(C,x), _(C,x), _(C,x), + /* 11338 */ _(C,x), _(C,x), _(x,x), _(x,x), _(N,x), _(A,x), _(M,R), _(M,R), + /* 11340 */ _(M,T), _(M,R), _(M,R), _(M,R), _(M,R), _(x,x), _(x,x), _(M,L), + /* 11348 */ _(M,L), _(x,x), _(x,x), _(M,LR), _(M,LR), _(V,R), _(x,x), _(x,x), + /* 11350 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(M,R), + /* 11358 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 11360 */ _(VI,x), _(VI,x), _(M,R), _(M,R), _(x,x), _(x,x), _(Ca,x), _(Ca,x), + /* 11368 */ _(Ca,x), _(Ca,x), _(Ca,x), _(Ca,x), _(Ca,x), _(x,x), _(x,x), _(x,x), + /* 11370 */ _(Ca,x), _(Ca,x), _(Ca,x), _(Ca,x), _(Ca,x), _(x,x), _(x,x), _(x,x), + +#define indic_offset_0x11480u 4112 + + + /* Tirhuta */ + + /* 11480 */ _(x,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), + /* 11488 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(C,x), + /* 11490 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 11498 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 114A0 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 114A8 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 114B0 */ _(M,R), _(M,L), _(M,R), _(M,B), _(M,B), _(M,B), _(M,B), _(M,B), + /* 114B8 */ _(M,B), _(M,L), _(M,T), _(M,TL), _(M,LR), _(M,R), _(M,LR), _(Bi,x), + /* 114C0 */ _(Bi,x), _(Vs,x), _(V,B), _(N,x), _(A,x), _(x,x), _(x,x), _(x,x), + /* 114C8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 114D0 */ _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), + /* 114D8 */ _(Nd,x), _(Nd,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + +#define indic_offset_0x11580u 4208 + + + /* Siddham */ + + /* 11580 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), + /* 11588 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(C,x), _(C,x), + /* 11590 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 11598 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 115A0 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 115A8 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(M,R), + /* 115B0 */ _(M,L), _(M,R), _(M,B), _(M,B), _(M,B), _(M,B), _(x,x), _(x,x), + /* 115B8 */ _(M,L), _(M,TL), _(M,LR),_(M,TLR), _(Bi,x), _(Bi,x), _(Vs,x), _(V,B), + /* 115C0 */ _(N,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + +#define indic_offset_0x11600u 4280 + + + /* Modi */ + + /* 11600 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), + /* 11608 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(C,x), _(C,x), + /* 11610 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 11618 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 11620 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 11628 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), + /* 11630 */ _(M,R), _(M,R), _(M,R), _(M,B), _(M,B), _(M,B), _(M,B), _(M,B), + /* 11638 */ _(M,B), _(M,T), _(M,T), _(M,R), _(M,R), _(Bi,x), _(Vs,x), _(V,B), + /* 11640 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 11648 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 11650 */ _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), + /* 11658 */ _(Nd,x), _(Nd,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 11660 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 11668 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 11670 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + /* 11678 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), + + /* Takri */ /* 11680 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), /* 11688 */ _(VI,x), _(VI,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), @@ -799,30 +850,57 @@ static const INDIC_TABLE_ELEMENT_TYPE indic_table[] = { /* 116A8 */ _(C,x), _(C,x), _(C,x), _(Bi,x), _(Vs,x), _(M,T), _(M,L), _(M,R), /* 116B0 */ _(M,B), _(M,B), _(M,T), _(M,T), _(M,T), _(M,T), _(V,T), _(N,x), /* 116B8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 116C0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - /* 116C8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), - -#define indic_offset_total 4416 + /* 116C0 */ _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), + /* 116C8 */ _(Nd,x), _(Nd,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), -}; /* Table occupancy: 60% */ +}; /* Table items: 4488; occupancy: 73% */ INDIC_TABLE_ELEMENT_TYPE hb_indic_get_categories (hb_codepoint_t u) { - if (0x0900 <= u && u <= 0x10A0) return indic_table[u - 0x0900 + indic_offset_0x0900]; - if (0x1700 <= u && u <= 0x1800) return indic_table[u - 0x1700 + indic_offset_0x1700]; - if (0x1900 <= u && u <= 0x1AB0) return indic_table[u - 0x1900 + indic_offset_0x1900]; - if (0x1B00 <= u && u <= 0x1C50) return indic_table[u - 0x1B00 + indic_offset_0x1b00]; - if (0x1CD0 <= u && u <= 0x1D00) return indic_table[u - 0x1CD0 + indic_offset_0x1cd0]; - if (0xA800 <= u && u <= 0xAB00) return indic_table[u - 0xA800 + indic_offset_0xa800]; - if (0xABC0 <= u && u <= 0xAC00) return indic_table[u - 0xABC0 + indic_offset_0xabc0]; - if (0x10A00 <= u && u <= 0x10A60) return indic_table[u - 0x10A00 + indic_offset_0x10a00]; - if (0x11000 <= u && u <= 0x110D0) return indic_table[u - 0x11000 + indic_offset_0x11000]; - if (0x11100 <= u && u <= 0x11150) return indic_table[u - 0x11100 + indic_offset_0x11100]; - if (0x11180 <= u && u <= 0x111E0) return indic_table[u - 0x11180 + indic_offset_0x11180]; - if (0x11680 <= u && u <= 0x116D0) return indic_table[u - 0x11680 + indic_offset_0x11680]; - if (unlikely (u == 0x00A0)) return _(CP,x); - if (unlikely (u == 0x25CC)) return _(CP,x); + switch (u >> 12) + { + case 0x0u: + if (hb_in_range (u, 0x0028u, 0x0040u)) return indic_table[u - 0x0028u + indic_offset_0x0028u]; + if (hb_in_range (u, 0x00D0u, 0x00D8u)) return indic_table[u - 0x00D0u + indic_offset_0x00d0u]; + if (hb_in_range (u, 0x0900u, 0x0DF8u)) return indic_table[u - 0x0900u + indic_offset_0x0900u]; + if (unlikely (u == 0x00A0u)) return _(CP,x); + break; + + case 0x1u: + if (hb_in_range (u, 0x1000u, 0x10A0u)) return indic_table[u - 0x1000u + indic_offset_0x1000u]; + if (hb_in_range (u, 0x1700u, 0x17F0u)) return indic_table[u - 0x1700u + indic_offset_0x1700u]; + if (hb_in_range (u, 0x1900u, 0x1AA0u)) return indic_table[u - 0x1900u + indic_offset_0x1900u]; + if (hb_in_range (u, 0x1B00u, 0x1C50u)) return indic_table[u - 0x1B00u + indic_offset_0x1b00u]; + if (hb_in_range (u, 0x1CD0u, 0x1CF8u)) return indic_table[u - 0x1CD0u + indic_offset_0x1cd0u]; + break; + + case 0x2u: + if (hb_in_range (u, 0x2008u, 0x2018u)) return indic_table[u - 0x2008u + indic_offset_0x2008u]; + if (unlikely (u == 0x25CCu)) return _(CP,x); + break; + + case 0xAu: + if (hb_in_range (u, 0xA800u, 0xAAF8u)) return indic_table[u - 0xA800u + indic_offset_0xa800u]; + if (hb_in_range (u, 0xABC0u, 0xAC00u)) return indic_table[u - 0xABC0u + indic_offset_0xabc0u]; + break; + + case 0x10u: + if (hb_in_range (u, 0x10A00u, 0x10A48u)) return indic_table[u - 0x10A00u + indic_offset_0x10a00u]; + break; + + case 0x11u: + if (hb_in_range (u, 0x11000u, 0x110C0u)) return indic_table[u - 0x11000u + indic_offset_0x11000u]; + if (hb_in_range (u, 0x11100u, 0x11238u)) return indic_table[u - 0x11100u + indic_offset_0x11100u]; + if (hb_in_range (u, 0x112B0u, 0x11378u)) return indic_table[u - 0x112B0u + indic_offset_0x112b0u]; + if (hb_in_range (u, 0x11480u, 0x114E0u)) return indic_table[u - 0x11480u + indic_offset_0x11480u]; + if (hb_in_range (u, 0x11580u, 0x115C8u)) return indic_table[u - 0x11580u + indic_offset_0x11580u]; + if (hb_in_range (u, 0x11600u, 0x116D0u)) return indic_table[u - 0x11600u + indic_offset_0x11600u]; + break; + + default: + break; + } return _(x,x); } @@ -830,17 +908,27 @@ hb_indic_get_categories (hb_codepoint_t u) #undef ISC_A #undef ISC_Bi +#undef ISC_BJN +#undef ISC_Ca #undef ISC_C #undef ISC_CD #undef ISC_CF #undef ISC_CHL #undef ISC_CM #undef ISC_CP -#undef ISC_CR +#undef ISC_CPR #undef ISC_CS +#undef ISC_CSR +#undef ISC_GM +#undef ISC_IS +#undef ISC_ZWJ #undef ISC_ML +#undef ISC_ZWNJ #undef ISC_N +#undef ISC_Nd +#undef ISC_NJ #undef ISC_x +#undef ISC_PK #undef ISC_RS #undef ISC_TL #undef ISC_TM @@ -852,7 +940,6 @@ hb_indic_get_categories (hb_codepoint_t u) #undef IMC_B #undef IMC_BR -#undef IMC_I #undef IMC_L #undef IMC_LR #undef IMC_x diff --git a/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-indic.cc b/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-indic.cc index 1e07d33177..33215a304f 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-indic.cc +++ b/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-indic.cc @@ -37,19 +37,19 @@ */ -#define IN_HALF_BLOCK(u, Base) (((u) & ~0x7F) == (Base)) +#define IN_HALF_BLOCK(u, Base) (((u) & ~0x7Fu) == (Base)) -#define IS_DEVA(u) (IN_HALF_BLOCK (u, 0x0900)) -#define IS_BENG(u) (IN_HALF_BLOCK (u, 0x0980)) -#define IS_GURU(u) (IN_HALF_BLOCK (u, 0x0A00)) -#define IS_GUJR(u) (IN_HALF_BLOCK (u, 0x0A80)) -#define IS_ORYA(u) (IN_HALF_BLOCK (u, 0x0B00)) -#define IS_TAML(u) (IN_HALF_BLOCK (u, 0x0B80)) -#define IS_TELU(u) (IN_HALF_BLOCK (u, 0x0C00)) -#define IS_KNDA(u) (IN_HALF_BLOCK (u, 0x0C80)) -#define IS_MLYM(u) (IN_HALF_BLOCK (u, 0x0D00)) -#define IS_SINH(u) (IN_HALF_BLOCK (u, 0x0D80)) -#define IS_KHMR(u) (IN_HALF_BLOCK (u, 0x1780)) +#define IS_DEVA(u) (IN_HALF_BLOCK (u, 0x0900u)) +#define IS_BENG(u) (IN_HALF_BLOCK (u, 0x0980u)) +#define IS_GURU(u) (IN_HALF_BLOCK (u, 0x0A00u)) +#define IS_GUJR(u) (IN_HALF_BLOCK (u, 0x0A80u)) +#define IS_ORYA(u) (IN_HALF_BLOCK (u, 0x0B00u)) +#define IS_TAML(u) (IN_HALF_BLOCK (u, 0x0B80u)) +#define IS_TELU(u) (IN_HALF_BLOCK (u, 0x0C00u)) +#define IS_KNDA(u) (IN_HALF_BLOCK (u, 0x0C80u)) +#define IS_MLYM(u) (IN_HALF_BLOCK (u, 0x0D00u)) +#define IS_SINH(u) (IN_HALF_BLOCK (u, 0x0D80u)) +#define IS_KHMR(u) (IN_HALF_BLOCK (u, 0x1780u)) #define MATRA_POS_LEFT(u) POS_PRE_M @@ -60,8 +60,8 @@ IS_GUJR(u) ? POS_AFTER_POST : \ IS_ORYA(u) ? POS_AFTER_POST : \ IS_TAML(u) ? POS_AFTER_POST : \ - IS_TELU(u) ? (u <= 0x0C42 ? POS_BEFORE_SUB : POS_AFTER_SUB) : \ - IS_KNDA(u) ? (u < 0x0CC3 || u > 0xCD6 ? POS_BEFORE_SUB : POS_AFTER_SUB) : \ + IS_TELU(u) ? (u <= 0x0C42u ? POS_BEFORE_SUB : POS_AFTER_SUB) : \ + IS_KNDA(u) ? (u < 0x0CC3u || u > 0xCD6u ? POS_BEFORE_SUB : POS_AFTER_SUB) : \ IS_MLYM(u) ? POS_AFTER_POST : \ IS_SINH(u) ? POS_AFTER_SUB : \ IS_KHMR(u) ? POS_AFTER_POST : \ @@ -112,20 +112,20 @@ matra_position (hb_codepoint_t u, indic_position_t side) * Or completely remove it and just check in the tables. */ static const hb_codepoint_t ra_chars[] = { - 0x0930, /* Devanagari */ - 0x09B0, /* Bengali */ - 0x09F0, /* Bengali */ - 0x0A30, /* Gurmukhi */ /* No Reph */ - 0x0AB0, /* Gujarati */ - 0x0B30, /* Oriya */ - 0x0BB0, /* Tamil */ /* No Reph */ - 0x0C30, /* Telugu */ /* Reph formed only with ZWJ */ - 0x0CB0, /* Kannada */ - 0x0D30, /* Malayalam */ /* No Reph, Logical Repha */ - - 0x0DBB, /* Sinhala */ /* Reph formed only with ZWJ */ - - 0x179A, /* Khmer */ /* No Reph, Visual Repha */ + 0x0930u, /* Devanagari */ + 0x09B0u, /* Bengali */ + 0x09F0u, /* Bengali */ + 0x0A30u, /* Gurmukhi */ /* No Reph */ + 0x0AB0u, /* Gujarati */ + 0x0B30u, /* Oriya */ + 0x0BB0u, /* Tamil */ /* No Reph */ + 0x0C30u, /* Telugu */ /* Reph formed only with ZWJ */ + 0x0CB0u, /* Kannada */ + 0x0D30u, /* Malayalam */ /* No Reph, Logical Repha */ + + 0x0DBBu, /* Sinhala */ /* Reph formed only with ZWJ */ + + 0x179Au, /* Khmer */ /* No Reph, Visual Repha */ }; static inline bool @@ -145,28 +145,18 @@ is_one_of (const hb_glyph_info_t &info, unsigned int flags) return !!(FLAG (info.indic_category()) & flags); } -#define JOINER_FLAGS (FLAG (OT_ZWJ) | FLAG (OT_ZWNJ)) static inline bool is_joiner (const hb_glyph_info_t &info) { return is_one_of (info, JOINER_FLAGS); } -#define MEDIAL_FLAGS (FLAG (OT_CM) | FLAG (OT_CM2)) - -/* Note: - * - * We treat Vowels and placeholders as if they were consonants. This is safe because Vowels - * cannot happen in a consonant syllable. The plus side however is, we can call the - * consonant syllable logic from the vowel syllable function and get it all right! */ -#define CONSONANT_FLAGS (FLAG (OT_C) | FLAG (OT_Ra) | MEDIAL_FLAGS | FLAG (OT_V) | FLAG (OT_NBSP) | FLAG (OT_DOTTEDCIRCLE)) static inline bool is_consonant (const hb_glyph_info_t &info) { return is_one_of (info, CONSONANT_FLAGS); } -#define HALANT_OR_COENG_FLAGS (FLAG (OT_H) | FLAG (OT_Coeng)) static inline bool is_halant_or_coeng (const hb_glyph_info_t &info) { @@ -178,7 +168,7 @@ set_indic_properties (hb_glyph_info_t &info) { hb_codepoint_t u = info.codepoint; unsigned int type = hb_indic_get_categories (u); - indic_category_t cat = (indic_category_t) (type & 0x7F); + indic_category_t cat = (indic_category_t) (type & 0x7Fu); indic_position_t pos = (indic_position_t) (type >> 8); @@ -188,48 +178,59 @@ set_indic_properties (hb_glyph_info_t &info) /* The spec says U+0952 is OT_A. However, testing shows that Uniscribe - * treats U+0951..U+0954 all behave similarly. - * TESTS: + * treats a whole bunch of characters similarly. + * TESTS: For example, for U+0951: * U+092E,U+0947,U+0952 * U+092E,U+0952,U+0947 * U+092E,U+0947,U+0951 * U+092E,U+0951,U+0947 + * U+092E,U+0951,U+0952 + * U+092E,U+0952,U+0951 */ - if (unlikely (hb_in_range (u, 0x0951, 0x0954))) + if (unlikely (hb_in_ranges (u, 0x0951u, 0x0952u, + 0x1CD0u, 0x1CD2u, + 0x1CD4u, 0x1CE1u) || + u == 0x1CF4u)) cat = OT_A; - - if (unlikely (u == 0x17D1)) - cat = OT_X; - if (cat == OT_X && - unlikely (hb_in_range (u, 0x17CB, 0x17D3))) /* Khmer Various signs */ + /* The following act more like the Bindus. */ + else if (unlikely (hb_in_range (u, 0x0953u, 0x0954u))) + cat = OT_SM; + /* The following act like consonants. */ + else if (unlikely (hb_in_ranges (u, 0x0A72u, 0x0A73u, + 0x1CF5u, 0x1CF6u))) + cat = OT_C; + /* TODO: The following should only be allowed after a Visarga. + * For now, just treat them like regular tone marks. */ + else if (unlikely (hb_in_range (u, 0x1CE2u, 0x1CE8u))) + cat = OT_A; + /* TODO: The following should only be allowed after some of + * the nasalization marks, maybe only for U+1CE9..U+1CF1. + * For now, just treat them like tone marks. */ + else if (unlikely (u == 0x1CEDu)) + cat = OT_A; + /* The following take marks in standalone clusters, similar to Avagraha. */ + else if (unlikely (hb_in_ranges (u, 0xA8F2u, 0xA8F7u, + 0x1CE9u, 0x1CECu, + 0x1CEEu, 0x1CF1u))) + { + cat = OT_Symbol; + ASSERT_STATIC ((int) INDIC_SYLLABIC_CATEGORY_AVAGRAHA == OT_Symbol); + } + else if (unlikely (hb_in_range (u, 0x17CDu, 0x17D1u) || + u == 0x17CBu || u == 0x17D3u || u == 0x17DDu)) /* Khmer Various signs */ { /* These are like Top Matras. */ cat = OT_M; pos = POS_ABOVE_C; } - if (u == 0x17C6) /* Khmer Bindu doesn't like to be repositioned. */ - cat = OT_N; - - if (unlikely (u == 0x17D2)) cat = OT_Coeng; /* Khmer coeng */ - else if (unlikely (u == 0x200C)) cat = OT_ZWNJ; - else if (unlikely (u == 0x200D)) cat = OT_ZWJ; - else if (unlikely (u == 0x25CC)) cat = OT_DOTTEDCIRCLE; - else if (unlikely (u == 0x0A71)) cat = OT_SM; /* GURMUKHI ADDAK. Move it to the end. */ - else if (unlikely (u == 0xA982)) cat = OT_SM; /* Javanese repha. */ - else if (unlikely (u == 0xA9BE)) cat = OT_CM2; /* Javanese medial ya. */ - else if (unlikely (u == 0xA9BD)) { cat = OT_M; pos = POS_POST_C; } /* Javanese vocalic r. */ - - if (cat == OT_Repha) { - /* There are two kinds of characters marked as Repha: - * - The ones that are GenCat=Mn are already positioned visually, ie. after base. (eg. Khmer) - * - The ones that are GenCat=Lo is encoded logically, ie. beginning of syllable. (eg. Malayalam) - * - * We recategorize the first kind to look like a Nukta and attached to the base directly. - */ - if (_hb_glyph_info_get_general_category (&info) == HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK) - cat = OT_N; - } - + else if (unlikely (u == 0x17C6u)) cat = OT_N; /* Khmer Bindu doesn't like to be repositioned. */ + else if (unlikely (u == 0x17D2u)) cat = OT_Coeng; /* Khmer coeng */ + else if (unlikely (hb_in_range (u, 0x2010u, 0x2011u))) + cat = OT_PLACEHOLDER; + else if (unlikely (u == 0x25CCu)) cat = OT_DOTTEDCIRCLE; + else if (unlikely (u == 0xA982u)) cat = OT_SM; /* Javanese repha. */ + else if (unlikely (u == 0xA9BEu)) cat = OT_CM2; /* Javanese medial ya. */ + else if (unlikely (u == 0xA9BDu)) { cat = OT_M; pos = POS_POST_C; } /* Javanese vocalic r. */ /* @@ -246,12 +247,12 @@ set_indic_properties (hb_glyph_info_t &info) { pos = matra_position (u, pos); } - else if ((FLAG (cat) & (FLAG (OT_SM) | FLAG (OT_VD) | FLAG (OT_A) | FLAG (OT_Avag)))) + else if ((FLAG (cat) & (FLAG (OT_SM) | FLAG (OT_VD) | FLAG (OT_A) | FLAG (OT_Symbol)))) { pos = POS_SMVD; } - if (unlikely (u == 0x0B01)) pos = POS_BEFORE_SUB; /* Oriya Bindu is BeforeSub in the spec. */ + if (unlikely (u == 0x0B01u)) pos = POS_BEFORE_SUB; /* Oriya Bindu is BeforeSub in the spec. */ @@ -315,20 +316,20 @@ struct indic_config_t static const indic_config_t indic_configs[] = { /* Default. Should be first. */ - {HB_SCRIPT_INVALID, false, 0,BASE_POS_LAST, REPH_POS_BEFORE_POST,REPH_MODE_IMPLICIT, BLWF_MODE_PRE_AND_POST, PREF_LEN_1}, - {HB_SCRIPT_DEVANAGARI,true, 0x094D,BASE_POS_LAST, REPH_POS_BEFORE_POST,REPH_MODE_IMPLICIT, BLWF_MODE_PRE_AND_POST, PREF_LEN_DONT_CARE}, - {HB_SCRIPT_BENGALI, true, 0x09CD,BASE_POS_LAST, REPH_POS_AFTER_SUB, REPH_MODE_IMPLICIT, BLWF_MODE_PRE_AND_POST, PREF_LEN_DONT_CARE}, - {HB_SCRIPT_GURMUKHI, true, 0x0A4D,BASE_POS_LAST, REPH_POS_BEFORE_SUB, REPH_MODE_IMPLICIT, BLWF_MODE_PRE_AND_POST, PREF_LEN_DONT_CARE}, - {HB_SCRIPT_GUJARATI, true, 0x0ACD,BASE_POS_LAST, REPH_POS_BEFORE_POST,REPH_MODE_IMPLICIT, BLWF_MODE_PRE_AND_POST, PREF_LEN_DONT_CARE}, - {HB_SCRIPT_ORIYA, true, 0x0B4D,BASE_POS_LAST, REPH_POS_AFTER_MAIN, REPH_MODE_IMPLICIT, BLWF_MODE_PRE_AND_POST, PREF_LEN_DONT_CARE}, - {HB_SCRIPT_TAMIL, true, 0x0BCD,BASE_POS_LAST, REPH_POS_AFTER_POST, REPH_MODE_IMPLICIT, BLWF_MODE_PRE_AND_POST, PREF_LEN_2}, - {HB_SCRIPT_TELUGU, true, 0x0C4D,BASE_POS_LAST, REPH_POS_AFTER_POST, REPH_MODE_EXPLICIT, BLWF_MODE_POST_ONLY, PREF_LEN_2}, - {HB_SCRIPT_KANNADA, true, 0x0CCD,BASE_POS_LAST, REPH_POS_AFTER_POST, REPH_MODE_IMPLICIT, BLWF_MODE_POST_ONLY, PREF_LEN_2}, - {HB_SCRIPT_MALAYALAM, true, 0x0D4D,BASE_POS_LAST, REPH_POS_AFTER_MAIN, REPH_MODE_LOG_REPHA,BLWF_MODE_PRE_AND_POST, PREF_LEN_2}, - {HB_SCRIPT_SINHALA, false,0x0DCA,BASE_POS_LAST_SINHALA, - REPH_POS_AFTER_MAIN, REPH_MODE_EXPLICIT, BLWF_MODE_PRE_AND_POST, PREF_LEN_DONT_CARE}, - {HB_SCRIPT_KHMER, false,0x17D2,BASE_POS_FIRST,REPH_POS_DONT_CARE, REPH_MODE_VIS_REPHA,BLWF_MODE_PRE_AND_POST, PREF_LEN_2}, - {HB_SCRIPT_JAVANESE, false,0xA9C0,BASE_POS_FIRST,REPH_POS_DONT_CARE, REPH_MODE_VIS_REPHA,BLWF_MODE_PRE_AND_POST, PREF_LEN_1}, + {HB_SCRIPT_INVALID, false, 0,BASE_POS_LAST, REPH_POS_BEFORE_POST,REPH_MODE_IMPLICIT, BLWF_MODE_PRE_AND_POST, PREF_LEN_1}, + {HB_SCRIPT_DEVANAGARI,true, 0x094Du,BASE_POS_LAST, REPH_POS_BEFORE_POST,REPH_MODE_IMPLICIT, BLWF_MODE_PRE_AND_POST, PREF_LEN_DONT_CARE}, + {HB_SCRIPT_BENGALI, true, 0x09CDu,BASE_POS_LAST, REPH_POS_AFTER_SUB, REPH_MODE_IMPLICIT, BLWF_MODE_PRE_AND_POST, PREF_LEN_DONT_CARE}, + {HB_SCRIPT_GURMUKHI, true, 0x0A4Du,BASE_POS_LAST, REPH_POS_BEFORE_SUB, REPH_MODE_IMPLICIT, BLWF_MODE_PRE_AND_POST, PREF_LEN_DONT_CARE}, + {HB_SCRIPT_GUJARATI, true, 0x0ACDu,BASE_POS_LAST, REPH_POS_BEFORE_POST,REPH_MODE_IMPLICIT, BLWF_MODE_PRE_AND_POST, PREF_LEN_DONT_CARE}, + {HB_SCRIPT_ORIYA, true, 0x0B4Du,BASE_POS_LAST, REPH_POS_AFTER_MAIN, REPH_MODE_IMPLICIT, BLWF_MODE_PRE_AND_POST, PREF_LEN_DONT_CARE}, + {HB_SCRIPT_TAMIL, true, 0x0BCDu,BASE_POS_LAST, REPH_POS_AFTER_POST, REPH_MODE_IMPLICIT, BLWF_MODE_PRE_AND_POST, PREF_LEN_2}, + {HB_SCRIPT_TELUGU, true, 0x0C4Du,BASE_POS_LAST, REPH_POS_AFTER_POST, REPH_MODE_EXPLICIT, BLWF_MODE_POST_ONLY, PREF_LEN_2}, + {HB_SCRIPT_KANNADA, true, 0x0CCDu,BASE_POS_LAST, REPH_POS_AFTER_POST, REPH_MODE_IMPLICIT, BLWF_MODE_POST_ONLY, PREF_LEN_2}, + {HB_SCRIPT_MALAYALAM, true, 0x0D4Du,BASE_POS_LAST, REPH_POS_AFTER_MAIN, REPH_MODE_LOG_REPHA,BLWF_MODE_PRE_AND_POST, PREF_LEN_2}, + {HB_SCRIPT_SINHALA, false,0x0DCAu,BASE_POS_LAST_SINHALA, + REPH_POS_AFTER_MAIN, REPH_MODE_EXPLICIT, BLWF_MODE_PRE_AND_POST, PREF_LEN_DONT_CARE}, + {HB_SCRIPT_KHMER, false,0x17D2u,BASE_POS_FIRST,REPH_POS_DONT_CARE, REPH_MODE_VIS_REPHA,BLWF_MODE_PRE_AND_POST, PREF_LEN_2}, + {HB_SCRIPT_JAVANESE, false,0xA9C0u,BASE_POS_FIRST,REPH_POS_DONT_CARE, REPH_MODE_VIS_REPHA,BLWF_MODE_PRE_AND_POST, PREF_LEN_1}, }; @@ -552,12 +553,12 @@ data_create_indic (const hb_ot_shape_plan_t *plan) break; } - indic_plan->is_old_spec = indic_plan->config->has_old_spec && ((plan->map.chosen_script[0] & 0x000000FF) != '2'); + indic_plan->is_old_spec = indic_plan->config->has_old_spec && ((plan->map.chosen_script[0] & 0x000000FFu) != '2'); indic_plan->virama_glyph = (hb_codepoint_t) -1; /* Use zero-context would_substitute() matching for new-spec of the main - * Indic scripts, but not for old-spec or scripts with one spec only. */ - bool zero_context = indic_plan->config->has_old_spec || !indic_plan->is_old_spec; + * Indic scripts, and scripts with one spec only, but not for old-specs. */ + bool zero_context = !indic_plan->is_old_spec; indic_plan->rphf.init (&plan->map, HB_TAG('r','p','h','f'), zero_context); indic_plan->pref.init (&plan->map, HB_TAG('p','r','e','f'), zero_context); indic_plan->blwf.init (&plan->map, HB_TAG('b','l','w','f'), zero_context); @@ -614,7 +615,7 @@ enum syllable_type_t { consonant_syllable, vowel_syllable, standalone_cluster, - avagraha_cluster, + symbol_cluster, broken_cluster, non_indic_cluster, }; @@ -634,8 +635,9 @@ setup_masks_indic (const hb_ot_shape_plan_t *plan HB_UNUSED, * and setup masks later on in a pause-callback. */ unsigned int count = buffer->len; + hb_glyph_info_t *info = buffer->info; for (unsigned int i = 0; i < count; i++) - set_indic_properties (buffer->info[i]); + set_indic_properties (info[i]); } static void @@ -672,10 +674,12 @@ update_consonant_positions (const hb_ot_shape_plan_t *plan, { hb_face_t *face = font->face; unsigned int count = buffer->len; + hb_glyph_info_t *info = buffer->info; for (unsigned int i = 0; i < count; i++) - if (buffer->info[i].indic_position() == POS_BASE_C) { - hb_codepoint_t consonant = buffer->info[i].codepoint; - buffer->info[i].indic_position() = consonant_position_from_face (indic_plan, consonant, virama, face); + if (info[i].indic_position() == POS_BASE_C) + { + hb_codepoint_t consonant = info[i].codepoint; + info[i].indic_position() = consonant_position_from_face (indic_plan, consonant, virama, face); } } } @@ -725,8 +729,13 @@ initial_reordering_consonant_syllable (const hb_ot_shape_plan_t *plan, )) { /* See if it matches the 'rphf' feature. */ - hb_codepoint_t glyphs[2] = {info[start].codepoint, info[start + 1].codepoint}; - if (indic_plan->rphf.would_substitute (glyphs, ARRAY_LENGTH (glyphs), face)) + hb_codepoint_t glyphs[3] = {info[start].codepoint, + info[start + 1].codepoint, + indic_plan->config->reph_mode == REPH_MODE_EXPLICIT ? + info[start + 2].codepoint : 0}; + if (indic_plan->rphf.would_substitute (glyphs, 2, face) || + (indic_plan->config->reph_mode == REPH_MODE_EXPLICIT && + indic_plan->rphf.would_substitute (glyphs, 3, face))) { limit += 2; while (limit < end && is_joiner (info[limit])) @@ -801,7 +810,7 @@ initial_reordering_consonant_syllable (const hb_ot_shape_plan_t *plan, case BASE_POS_LAST_SINHALA: { /* Sinhala base positioning is slightly different from main Indic, in that: - * 1. It's ZWJ behavior is different, + * 1. Its ZWJ behavior is different, * 2. We don't need to look into the font for consonant positions. */ @@ -1151,8 +1160,8 @@ initial_reordering_standalone_cluster (const hb_ot_shape_plan_t *plan, hb_buffer_t *buffer, unsigned int start, unsigned int end) { - /* We treat NBSP/dotted-circle as if they are consonants, so we should just chain. - * Only if not in compatibility mode that is... */ + /* We treat placeholder/dotted-circle as if they are consonants, so we + * should just chain. Only if not in compatibility mode that is... */ if (hb_options ().uniscribe_bug_compatible) { @@ -1177,10 +1186,10 @@ initial_reordering_broken_cluster (const hb_ot_shape_plan_t *plan, } static void -initial_reordering_avagraha_cluster (const hb_ot_shape_plan_t *plan HB_UNUSED, - hb_face_t *face HB_UNUSED, - hb_buffer_t *buffer HB_UNUSED, - unsigned int start HB_UNUSED, unsigned int end HB_UNUSED) +initial_reordering_symbol_cluster (const hb_ot_shape_plan_t *plan HB_UNUSED, + hb_face_t *face HB_UNUSED, + hb_buffer_t *buffer HB_UNUSED, + unsigned int start HB_UNUSED, unsigned int end HB_UNUSED) { /* Nothing to do right now. If we ever switch to using the output * buffer in the reordering process, we'd need to next_glyph() here. */ @@ -1208,7 +1217,7 @@ initial_reordering_syllable (const hb_ot_shape_plan_t *plan, case consonant_syllable: initial_reordering_consonant_syllable (plan, face, buffer, start, end); return; case vowel_syllable: initial_reordering_vowel_syllable (plan, face, buffer, start, end); return; case standalone_cluster: initial_reordering_standalone_cluster (plan, face, buffer, start, end); return; - case avagraha_cluster: initial_reordering_avagraha_cluster (plan, face, buffer, start, end); return; + case symbol_cluster: initial_reordering_symbol_cluster (plan, face, buffer, start, end); return; case broken_cluster: initial_reordering_broken_cluster (plan, face, buffer, start, end); return; case non_indic_cluster: initial_reordering_non_indic_cluster (plan, face, buffer, start, end); return; } @@ -1222,8 +1231,10 @@ insert_dotted_circles (const hb_ot_shape_plan_t *plan HB_UNUSED, /* Note: This loop is extra overhead, but should not be measurable. */ bool has_broken_syllables = false; unsigned int count = buffer->len; + hb_glyph_info_t *info = buffer->info; for (unsigned int i = 0; i < count; i++) - if ((buffer->info[i].syllable() & 0x0F) == broken_cluster) { + if ((info[i].syllable() & 0x0F) == broken_cluster) + { has_broken_syllables = true; break; } @@ -1232,11 +1243,11 @@ insert_dotted_circles (const hb_ot_shape_plan_t *plan HB_UNUSED, hb_codepoint_t dottedcircle_glyph; - if (!font->get_glyph (0x25CC, 0, &dottedcircle_glyph)) + if (!font->get_glyph (0x25CCu, 0, &dottedcircle_glyph)) return; hb_glyph_info_t dottedcircle = {0}; - dottedcircle.codepoint = 0x25CC; + dottedcircle.codepoint = 0x25CCu; set_indic_properties (dottedcircle); dottedcircle.codepoint = dottedcircle_glyph; @@ -1302,6 +1313,27 @@ final_reordering_syllable (const hb_ot_shape_plan_t *plan, const indic_shape_plan_t *indic_plan = (const indic_shape_plan_t *) plan->data; hb_glyph_info_t *info = buffer->info; + + /* This function relies heavily on halant glyphs. Lots of ligation + * and possibly multiplication substitutions happened prior to this + * phase, and that might have messed up our properties. Recover + * from a particular case of that where we're fairly sure that a + * class of OT_H is desired but has been lost. */ + if (indic_plan->virama_glyph) + { + unsigned int virama_glyph = indic_plan->virama_glyph; + for (unsigned int i = start; i < end; i++) + if (info[i].codepoint == virama_glyph && + _hb_glyph_info_ligated (&info[i]) && + _hb_glyph_info_multiplied (&info[i])) + { + /* This will make sure that this glyph passes is_halant_or_coeng() test. */ + info[i].indic_category() = OT_H; + _hb_glyph_info_clear_ligated_and_multiplied (&info[i]); + } + } + + /* 4. Final reordering: * * After the localized forms and basic shaping forms GSUB features have been @@ -1310,21 +1342,45 @@ final_reordering_syllable (const hb_ot_shape_plan_t *plan, * cluster. */ + bool try_pref = !!indic_plan->mask_array[PREF]; + /* Find base again */ unsigned int base; for (base = start; base < end; base++) - if (info[base].indic_position() >= POS_BASE_C) { + if (info[base].indic_position() >= POS_BASE_C) + { + if (try_pref && base + 1 < end && indic_plan->config->pref_len == 2) + { + for (unsigned int i = base + 1; i < end; i++) + if ((info[i].mask & indic_plan->mask_array[PREF]) != 0) + { + if (!(_hb_glyph_info_substituted (&info[i]) && + _hb_glyph_info_ligated_and_didnt_multiply (&info[i]))) + { + /* Ok, this was a 'pref' candidate but didn't form any. + * Base is around here... */ + base = i; + while (base < end && is_halant_or_coeng (info[base])) + base++; + info[base].indic_position() = POS_BASE_C; + + try_pref = false; + } + break; + } + } + if (start < base && info[base].indic_position() > POS_BASE_C) base--; break; } if (base == end && start < base && - info[base - 1].indic_category() != OT_ZWJ) - base--; - while (start < base && - (info[base].indic_category() == OT_H || - info[base].indic_category() == OT_N)) + is_one_of (info[base - 1], FLAG (OT_ZWJ))) base--; + if (base < end) + while (start < base && + is_one_of (info[base], (FLAG (OT_N) | HALANT_OR_COENG_FLAGS))) + base--; /* o Reorder matras: @@ -1349,7 +1405,7 @@ final_reordering_syllable (const hb_ot_shape_plan_t *plan, if (buffer->props.script != HB_SCRIPT_MALAYALAM && buffer->props.script != HB_SCRIPT_TAMIL) { while (new_pos > start && - !(is_one_of (info[new_pos], (FLAG (OT_M) | FLAG (OT_H) | FLAG (OT_Coeng))))) + !(is_one_of (info[new_pos], (FLAG (OT_M) | HALANT_OR_COENG_FLAGS)))) new_pos--; /* If we found no Halant we are done. @@ -1412,7 +1468,7 @@ final_reordering_syllable (const hb_ot_shape_plan_t *plan, if (start + 1 < end && info[start].indic_position() == POS_RA_TO_BECOME_REPH && ((info[start].indic_category() == OT_Repha) ^ - _hb_glyph_info_ligated (&info[start]))) + _hb_glyph_info_ligated_and_didnt_multiply (&info[start]))) { unsigned int new_reph_pos; reph_position_t reph_pos = indic_plan->config->reph_pos; @@ -1549,7 +1605,7 @@ final_reordering_syllable (const hb_ot_shape_plan_t *plan, * the following rules: */ - if (indic_plan->mask_array[PREF] && base + 1 < end) /* Otherwise there can't be any pre-base reordering Ra. */ + if (try_pref && base + 1 < end) /* Otherwise there can't be any pre-base reordering Ra. */ { unsigned int pref_len = indic_plan->config->pref_len; for (unsigned int i = base + 1; i < end; i++) @@ -1565,7 +1621,7 @@ final_reordering_syllable (const hb_ot_shape_plan_t *plan, * If pref len is longer than one, then only reorder if it ligated. If * pref len is one, only reorder if it didn't ligate with other things. */ if (_hb_glyph_info_substituted (&info[i]) && - ((pref_len == 1) ^ _hb_glyph_info_ligated (&info[i]))) + ((pref_len == 1) ^ _hb_glyph_info_ligated_and_didnt_multiply (&info[i]))) { /* * 2. Try to find a target position the same way as for pre-base matra. @@ -1699,37 +1755,37 @@ decompose_indic (const hb_ot_shape_normalize_context_t *c, switch (ab) { /* Don't decompose these. */ - case 0x0931 : return false; - case 0x0B94 : return false; + case 0x0931u : return false; + case 0x0B94u : return false; /* * Decompose split matras that don't have Unicode decompositions. */ - case 0x0F77 : *a = 0x0FB2; *b= 0x0F81; return true; - case 0x0F79 : *a = 0x0FB3; *b= 0x0F81; return true; - case 0x17BE : *a = 0x17C1; *b= 0x17BE; return true; - case 0x17BF : *a = 0x17C1; *b= 0x17BF; return true; - case 0x17C0 : *a = 0x17C1; *b= 0x17C0; return true; - case 0x17C4 : *a = 0x17C1; *b= 0x17C4; return true; - case 0x17C5 : *a = 0x17C1; *b= 0x17C5; return true; - case 0x1925 : *a = 0x1920; *b= 0x1923; return true; - case 0x1926 : *a = 0x1920; *b= 0x1924; return true; - case 0x1B3C : *a = 0x1B42; *b= 0x1B3C; return true; - case 0x1112E : *a = 0x11127; *b= 0x11131; return true; - case 0x1112F : *a = 0x11127; *b= 0x11132; return true; + case 0x0F77u : *a = 0x0FB2u; *b= 0x0F81u; return true; + case 0x0F79u : *a = 0x0FB3u; *b= 0x0F81u; return true; + case 0x17BEu : *a = 0x17C1u; *b= 0x17BEu; return true; + case 0x17BFu : *a = 0x17C1u; *b= 0x17BFu; return true; + case 0x17C0u : *a = 0x17C1u; *b= 0x17C0u; return true; + case 0x17C4u : *a = 0x17C1u; *b= 0x17C4u; return true; + case 0x17C5u : *a = 0x17C1u; *b= 0x17C5u; return true; + case 0x1925u : *a = 0x1920u; *b= 0x1923u; return true; + case 0x1926u : *a = 0x1920u; *b= 0x1924u; return true; + case 0x1B3Cu : *a = 0x1B42u; *b= 0x1B3Cu; return true; + case 0x1112Eu : *a = 0x11127u; *b= 0x11131u; return true; + case 0x1112Fu : *a = 0x11127u; *b= 0x11132u; return true; #if 0 /* This one has no decomposition in Unicode, but needs no decomposition either. */ - /* case 0x0AC9 : return false; */ - case 0x0B57 : *a = no decomp, -> RIGHT; return true; - case 0x1C29 : *a = no decomp, -> LEFT; return true; - case 0xA9C0 : *a = no decomp, -> RIGHT; return true; - case 0x111BF : *a = no decomp, -> ABOVE; return true; + /* case 0x0AC9u : return false; */ + case 0x0B57u : *a = no decomp, -> RIGHT; return true; + case 0x1C29u : *a = no decomp, -> LEFT; return true; + case 0xA9C0u : *a = no decomp, -> RIGHT; return true; + case 0x111BuF : *a = no decomp, -> ABOVE; return true; #endif } - if ((ab == 0x0DDA || hb_in_range (ab, 0x0DDC, 0x0DDE))) + if ((ab == 0x0DDAu || hb_in_range (ab, 0x0DDCu, 0x0DDEu))) { /* * Sinhala split matras... Let the fun begin. @@ -1766,7 +1822,7 @@ decompose_indic (const hb_ot_shape_normalize_context_t *c, indic_plan->pstf.would_substitute (&glyph, 1, c->font->face))) { /* Ok, safe to use Uniscribe-style decomposition. */ - *a = 0x0DD9; + *a = 0x0DD9u; *b = ab; return true; } @@ -1786,7 +1842,7 @@ compose_indic (const hb_ot_shape_normalize_context_t *c, return false; /* Composition-exclusion exceptions that we want to recompose. */ - if (a == 0x09AF && b == 0x09BC) { *ab = 0x09DF; return true; } + if (a == 0x09AFu && b == 0x09BCu) { *ab = 0x09DFu; return true; } return c->unicode->compose (a, b, ab); } diff --git a/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-myanmar-machine.hh b/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-myanmar-machine.hh index a9c8dbeaac..29fdf9a1ae 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-myanmar-machine.hh +++ b/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-myanmar-machine.hh @@ -62,7 +62,7 @@ static const short _myanmar_syllable_machine_index_offsets[] = { static const char _myanmar_syllable_machine_indicies[] = { 1, 1, 2, 3, 4, 4, 0, 5, - 0, 6, 0, 1, 0, 0, 0, 7, + 0, 6, 1, 0, 0, 0, 0, 7, 0, 8, 1, 0, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 0, 21, 22, 23, 23, 20, 24, 20, 25, @@ -119,14 +119,14 @@ static const char _myanmar_syllable_machine_indicies[] = { 20, 20, 20, 20, 20, 20, 20, 20, 20, 31, 20, 33, 20, 35, 20, 21, 20, 23, 23, 20, 24, 20, 25, 20, - 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 34, 20, 20, 27, 20, 29, 20, 31, 32, 33, 34, 35, 20, 21, 20, 23, 23, 20, 24, 20, 25, 20, 20, 20, 20, 20, 20, 20, 34, 20, 20, 27, 20, 20, 20, 31, 32, 33, 34, 35, 20, 21, 20, 23, 23, 20, 24, 20, 25, 20, - 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 34, 20, 20, 27, 28, 29, 20, 31, 32, 33, 34, 35, 20, 21, 22, 23, 23, 20, 24, 20, 25, 20, 20, 20, 20, 20, @@ -169,8 +169,8 @@ static const char _myanmar_syllable_machine_indicies[] = { 25, 20, 20, 20, 20, 20, 20, 20, 26, 20, 20, 27, 28, 29, 30, 31, 32, 33, 34, 35, 20, 1, 1, 2, - 3, 3, 3, 42, 5, 42, 6, 42, - 1, 42, 42, 42, 1, 42, 8, 1, + 3, 3, 3, 42, 5, 42, 6, 1, + 42, 42, 42, 42, 1, 42, 8, 1, 42, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 42, 2, 42, 3, 3, 42, 5, 42, 6, 42, 42, 42, 42, @@ -191,14 +191,14 @@ static const char _myanmar_syllable_machine_indicies[] = { 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 13, 42, 15, 42, 17, 42, 2, 42, 3, 3, 42, 5, 42, 6, - 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 16, 42, 42, 9, 42, 11, 42, 13, 14, 15, 16, 17, 42, 2, 42, 3, 3, 42, 5, 42, 6, 42, 42, 42, 42, 42, 42, 42, 16, 42, 42, 9, 42, 42, 42, 13, 14, 15, 16, 17, 42, 2, 42, 3, 3, 42, 5, 42, 6, - 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 16, 42, 42, 9, 10, 11, 42, 13, 14, 15, 16, 17, 42, 2, 3, 3, 3, 42, 5, 42, 6, 42, 42, 42, 42, diff --git a/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-myanmar.cc b/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-myanmar.cc index 50209ffb0e..258ccc470c 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-myanmar.cc +++ b/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-myanmar.cc @@ -134,7 +134,7 @@ enum myanmar_category_t { OT_D = 19, /* Digits except zero */ OT_D0 = 20, /* Digit zero */ OT_DB = OT_N, /* Dot below */ - OT_GB = OT_DOTTEDCIRCLE, + OT_GB = OT_PLACEHOLDER, OT_MH = 21, /* Various consonant medial types */ OT_MR = 22, /* Various consonant medial types */ OT_MW = 23, /* Various consonant medial types */ @@ -157,12 +157,6 @@ is_one_of (const hb_glyph_info_t &info, unsigned int flags) return !!(FLAG (info.myanmar_category()) & flags); } -/* Note: - * - * We treat Vowels and placeholders as if they were consonants. This is safe because Vowels - * cannot happen in a consonant syllable. The plus side however is, we can call the - * consonant syllable logic from the vowel syllable function and get it all right! */ -#define CONSONANT_FLAGS (FLAG (OT_C) | FLAG (OT_CM) | FLAG (OT_Ra) | FLAG (OT_V) | FLAG (OT_NBSP) | FLAG (OT_GB)) static inline bool is_consonant (const hb_glyph_info_t &info) { @@ -175,82 +169,80 @@ set_myanmar_properties (hb_glyph_info_t &info) { hb_codepoint_t u = info.codepoint; unsigned int type = hb_indic_get_categories (u); - indic_category_t cat = (indic_category_t) (type & 0x7F); + indic_category_t cat = (indic_category_t) (type & 0x7Fu); indic_position_t pos = (indic_position_t) (type >> 8); /* Myanmar * http://www.microsoft.com/typography/OpenTypeDev/myanmar/intro.htm#analyze */ - if (unlikely (hb_in_range (u, 0xFE00, 0xFE0F))) + if (unlikely (hb_in_range (u, 0xFE00u, 0xFE0Fu))) cat = (indic_category_t) OT_VS; - else if (unlikely (u == 0x200C)) cat = (indic_category_t) OT_ZWNJ; - else if (unlikely (u == 0x200D)) cat = (indic_category_t) OT_ZWJ; switch (u) { - case 0x104E: + case 0x104Eu: cat = (indic_category_t) OT_C; /* The spec says C, IndicSyllableCategory doesn't have. */ break; - case 0x002D: case 0x00A0: case 0x00D7: case 0x2012: - case 0x2013: case 0x2014: case 0x2015: case 0x2022: - case 0x25CC: case 0x25FB: case 0x25FC: case 0x25FD: - case 0x25FE: + case 0x002Du: case 0x00A0u: case 0x00D7u: case 0x2012u: + case 0x2013u: case 0x2014u: case 0x2015u: case 0x2022u: + case 0x25CCu: case 0x25FBu: case 0x25FCu: case 0x25FDu: + case 0x25FEu: cat = (indic_category_t) OT_GB; break; - case 0x1004: case 0x101B: case 0x105A: + case 0x1004u: case 0x101Bu: case 0x105Au: cat = (indic_category_t) OT_Ra; break; - case 0x1032: case 0x1036: + case 0x1032u: case 0x1036u: cat = (indic_category_t) OT_A; break; - case 0x103A: + case 0x103Au: cat = (indic_category_t) OT_As; break; - case 0x1041: case 0x1042: case 0x1043: case 0x1044: - case 0x1045: case 0x1046: case 0x1047: case 0x1048: - case 0x1049: case 0x1090: case 0x1091: case 0x1092: - case 0x1093: case 0x1094: case 0x1095: case 0x1096: - case 0x1097: case 0x1098: case 0x1099: + case 0x1041u: case 0x1042u: case 0x1043u: case 0x1044u: + case 0x1045u: case 0x1046u: case 0x1047u: case 0x1048u: + case 0x1049u: case 0x1090u: case 0x1091u: case 0x1092u: + case 0x1093u: case 0x1094u: case 0x1095u: case 0x1096u: + case 0x1097u: case 0x1098u: case 0x1099u: cat = (indic_category_t) OT_D; break; - case 0x1040: + case 0x1040u: cat = (indic_category_t) OT_D; /* XXX The spec says D0, but Uniscribe doesn't seem to do. */ break; - case 0x103E: case 0x1060: + case 0x103Eu: case 0x1060u: cat = (indic_category_t) OT_MH; break; - case 0x103C: + case 0x103Cu: cat = (indic_category_t) OT_MR; break; - case 0x103D: case 0x1082: + case 0x103Du: case 0x1082u: cat = (indic_category_t) OT_MW; break; - case 0x103B: case 0x105E: case 0x105F: + case 0x103Bu: case 0x105Eu: case 0x105Fu: cat = (indic_category_t) OT_MY; break; - case 0x1063: case 0x1064: case 0x1069: case 0x106A: - case 0x106B: case 0x106C: case 0x106D: case 0xAA7B: + case 0x1063u: case 0x1064u: case 0x1069u: case 0x106Au: + case 0x106Bu: case 0x106Cu: case 0x106Du: case 0xAA7Bu: cat = (indic_category_t) OT_PT; break; - case 0x1038: case 0x1087: case 0x1088: case 0x1089: - case 0x108A: case 0x108B: case 0x108C: case 0x108D: - case 0x108F: case 0x109A: case 0x109B: case 0x109C: + case 0x1038u: case 0x1087u: case 0x1088u: case 0x1089u: + case 0x108Au: case 0x108Bu: case 0x108Cu: case 0x108Du: + case 0x108Fu: case 0x109Au: case 0x109Bu: case 0x109Cu: cat = (indic_category_t) OT_SM; break; - case 0x104A: case 0x104B: + case 0x104Au: case 0x104Bu: cat = (indic_category_t) OT_P; break; } @@ -285,8 +277,9 @@ setup_masks_myanmar (const hb_ot_shape_plan_t *plan HB_UNUSED, * and setup masks later on in a pause-callback. */ unsigned int count = buffer->len; + hb_glyph_info_t *info = buffer->info; for (unsigned int i = 0; i < count; i++) - set_myanmar_properties (buffer->info[i]); + set_myanmar_properties (info[i]); } static void @@ -459,8 +452,10 @@ insert_dotted_circles (const hb_ot_shape_plan_t *plan HB_UNUSED, /* Note: This loop is extra overhead, but should not be measurable. */ bool has_broken_syllables = false; unsigned int count = buffer->len; + hb_glyph_info_t *info = buffer->info; for (unsigned int i = 0; i < count; i++) - if ((buffer->info[i].syllable() & 0x0F) == broken_cluster) { + if ((info[i].syllable() & 0x0F) == broken_cluster) + { has_broken_syllables = true; break; } @@ -469,11 +464,11 @@ insert_dotted_circles (const hb_ot_shape_plan_t *plan HB_UNUSED, hb_codepoint_t dottedcircle_glyph; - if (!font->get_glyph (0x25CC, 0, &dottedcircle_glyph)) + if (!font->get_glyph (0x25CCu, 0, &dottedcircle_glyph)) return; hb_glyph_info_t dottedcircle = {0}; - dottedcircle.codepoint = 0x25CC; + dottedcircle.codepoint = 0x25CCu; set_myanmar_properties (dottedcircle); dottedcircle.codepoint = dottedcircle_glyph; diff --git a/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-private.hh b/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-private.hh index 104726e8af..3e581afa9c 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-private.hh +++ b/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-private.hh @@ -173,6 +173,10 @@ hb_ot_shape_complex_categorize (const hb_ot_shape_planner_t *planner) /* Unicode-6.0 additions */ case HB_SCRIPT_MANDAIC: + /* Unicode-7.0 additions */ + case HB_SCRIPT_MANICHAEAN: + case HB_SCRIPT_PSALTER_PAHLAVI: + /* For Arabic script, use the Arabic shaper even if no OT script tag was found. * This is because we do fallback shaping for Arabic script (and not others). */ if (planner->map.chosen_script[0] != HB_OT_TAG_DEFAULT_SCRIPT || diff --git a/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-sea.cc b/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-sea.cc index 6288a90c9a..f08b7ccb9f 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-sea.cc +++ b/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-sea.cc @@ -139,11 +139,11 @@ set_sea_properties (hb_glyph_info_t &info) { hb_codepoint_t u = info.codepoint; unsigned int type = hb_indic_get_categories (u); - indic_category_t cat = (indic_category_t) (type & 0x7F); + indic_category_t cat = (indic_category_t) (type & 0x7Fu); indic_position_t pos = (indic_position_t) (type >> 8); /* Medial Ra */ - if (u == 0x1A55 || u == 0xAA34) + if (u == 0x1A55u || u == 0xAA34u) cat = (indic_category_t) OT_MR; if (cat == OT_M) @@ -174,8 +174,9 @@ setup_masks_sea (const hb_ot_shape_plan_t *plan HB_UNUSED, * and setup masks later on in a pause-callback. */ unsigned int count = buffer->len; + hb_glyph_info_t *info = buffer->info; for (unsigned int i = 0; i < count; i++) - set_sea_properties (buffer->info[i]); + set_sea_properties (info[i]); } static void @@ -278,8 +279,10 @@ insert_dotted_circles (const hb_ot_shape_plan_t *plan HB_UNUSED, /* Note: This loop is extra overhead, but should not be measurable. */ bool has_broken_syllables = false; unsigned int count = buffer->len; + hb_glyph_info_t *info = buffer->info; for (unsigned int i = 0; i < count; i++) - if ((buffer->info[i].syllable() & 0x0F) == broken_cluster) { + if ((info[i].syllable() & 0x0F) == broken_cluster) + { has_broken_syllables = true; break; } @@ -288,11 +291,11 @@ insert_dotted_circles (const hb_ot_shape_plan_t *plan HB_UNUSED, hb_codepoint_t dottedcircle_glyph; - if (!font->get_glyph (0x25CC, 0, &dottedcircle_glyph)) + if (!font->get_glyph (0x25CCu, 0, &dottedcircle_glyph)) return; hb_glyph_info_t dottedcircle = {0}; - dottedcircle.codepoint = 0x25CC; + dottedcircle.codepoint = 0x25CCu; set_sea_properties (dottedcircle); dottedcircle.codepoint = dottedcircle_glyph; diff --git a/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-thai.cc b/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-thai.cc index 8664eca45c..feb7fc7a14 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-thai.cc +++ b/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-thai.cc @@ -46,13 +46,13 @@ enum thai_consonant_type_t static thai_consonant_type_t get_consonant_type (hb_codepoint_t u) { - if (u == 0x0E1B || u == 0x0E1D || u == 0x0E1F/* || u == 0x0E2C*/) + if (u == 0x0E1Bu || u == 0x0E1Du || u == 0x0E1Fu/* || u == 0x0E2Cu*/) return AC; - if (u == 0x0E0D || u == 0x0E10) + if (u == 0x0E0Du || u == 0x0E10u) return RC; - if (u == 0x0E0E || u == 0x0E0F) + if (u == 0x0E0Eu || u == 0x0E0Fu) return DC; - if (hb_in_range (u, 0x0E01, 0x0E2E)) + if (hb_in_range (u, 0x0E01u, 0x0E2Eu)) return NC; return NOT_CONSONANT; } @@ -70,12 +70,12 @@ enum thai_mark_type_t static thai_mark_type_t get_mark_type (hb_codepoint_t u) { - if (u == 0x0E31 || hb_in_range (u, 0x0E34, 0x0E37) || - u == 0x0E47 || hb_in_range (u, 0x0E4D, 0x0E4E)) + if (u == 0x0E31u || hb_in_range (u, 0x0E34u, 0x0E37u) || + u == 0x0E47u || hb_in_range (u, 0x0E4Du, 0x0E4Eu)) return AV; - if (hb_in_range (u, 0x0E38, 0x0E3A)) + if (hb_in_range (u, 0x0E38u, 0x0E3Au)) return BV; - if (hb_in_range (u, 0x0E48, 0x0E4C)) + if (hb_in_range (u, 0x0E48u, 0x0E4Cu)) return T; return NOT_MARK; } @@ -99,43 +99,43 @@ thai_pua_shape (hb_codepoint_t u, thai_action_t action, hb_font_t *font) hb_codepoint_t mac_pua; } const *pua_mappings = NULL; static const thai_pua_mapping_t SD_mappings[] = { - {0x0E48, 0xF70A, 0xF88B}, /* MAI EK */ - {0x0E49, 0xF70B, 0xF88E}, /* MAI THO */ - {0x0E4A, 0xF70C, 0xF891}, /* MAI TRI */ - {0x0E4B, 0xF70D, 0xF894}, /* MAI CHATTAWA */ - {0x0E4C, 0xF70E, 0xF897}, /* THANTHAKHAT */ - {0x0E38, 0xF718, 0xF89B}, /* SARA U */ - {0x0E39, 0xF719, 0xF89C}, /* SARA UU */ - {0x0E3A, 0xF71A, 0xF89D}, /* PHINTHU */ - {0x0000, 0x0000, 0x0000} + {0x0E48u, 0xF70Au, 0xF88Bu}, /* MAI EK */ + {0x0E49u, 0xF70Bu, 0xF88Eu}, /* MAI THO */ + {0x0E4Au, 0xF70Cu, 0xF891u}, /* MAI TRI */ + {0x0E4Bu, 0xF70Du, 0xF894u}, /* MAI CHATTAWA */ + {0x0E4Cu, 0xF70Eu, 0xF897u}, /* THANTHAKHAT */ + {0x0E38u, 0xF718u, 0xF89Bu}, /* SARA U */ + {0x0E39u, 0xF719u, 0xF89Cu}, /* SARA UU */ + {0x0E3Au, 0xF71Au, 0xF89Du}, /* PHINTHU */ + {0x0000u, 0x0000u, 0x0000u} }; static const thai_pua_mapping_t SDL_mappings[] = { - {0x0E48, 0xF705, 0xF88C}, /* MAI EK */ - {0x0E49, 0xF706, 0xF88F}, /* MAI THO */ - {0x0E4A, 0xF707, 0xF892}, /* MAI TRI */ - {0x0E4B, 0xF708, 0xF895}, /* MAI CHATTAWA */ - {0x0E4C, 0xF709, 0xF898}, /* THANTHAKHAT */ - {0x0000, 0x0000, 0x0000} + {0x0E48u, 0xF705u, 0xF88Cu}, /* MAI EK */ + {0x0E49u, 0xF706u, 0xF88Fu}, /* MAI THO */ + {0x0E4Au, 0xF707u, 0xF892u}, /* MAI TRI */ + {0x0E4Bu, 0xF708u, 0xF895u}, /* MAI CHATTAWA */ + {0x0E4Cu, 0xF709u, 0xF898u}, /* THANTHAKHAT */ + {0x0000u, 0x0000u, 0x0000u} }; static const thai_pua_mapping_t SL_mappings[] = { - {0x0E48, 0xF713, 0xF88A}, /* MAI EK */ - {0x0E49, 0xF714, 0xF88D}, /* MAI THO */ - {0x0E4A, 0xF715, 0xF890}, /* MAI TRI */ - {0x0E4B, 0xF716, 0xF893}, /* MAI CHATTAWA */ - {0x0E4C, 0xF717, 0xF896}, /* THANTHAKHAT */ - {0x0E31, 0xF710, 0xF884}, /* MAI HAN-AKAT */ - {0x0E34, 0xF701, 0xF885}, /* SARA I */ - {0x0E35, 0xF702, 0xF886}, /* SARA II */ - {0x0E36, 0xF703, 0xF887}, /* SARA UE */ - {0x0E37, 0xF704, 0xF888}, /* SARA UEE */ - {0x0E47, 0xF712, 0xF889}, /* MAITAIKHU */ - {0x0E4D, 0xF711, 0xF899}, /* NIKHAHIT */ - {0x0000, 0x0000, 0x0000} + {0x0E48u, 0xF713u, 0xF88Au}, /* MAI EK */ + {0x0E49u, 0xF714u, 0xF88Du}, /* MAI THO */ + {0x0E4Au, 0xF715u, 0xF890u}, /* MAI TRI */ + {0x0E4Bu, 0xF716u, 0xF893u}, /* MAI CHATTAWA */ + {0x0E4Cu, 0xF717u, 0xF896u}, /* THANTHAKHAT */ + {0x0E31u, 0xF710u, 0xF884u}, /* MAI HAN-AKAT */ + {0x0E34u, 0xF701u, 0xF885u}, /* SARA I */ + {0x0E35u, 0xF702u, 0xF886u}, /* SARA II */ + {0x0E36u, 0xF703u, 0xF887u}, /* SARA UE */ + {0x0E37u, 0xF704u, 0xF888u}, /* SARA UEE */ + {0x0E47u, 0xF712u, 0xF889u}, /* MAITAIKHU */ + {0x0E4Du, 0xF711u, 0xF899u}, /* NIKHAHIT */ + {0x0000u, 0x0000u, 0x0000u} }; static const thai_pua_mapping_t RD_mappings[] = { - {0x0E0D, 0xF70F, 0xF89A}, /* YO YING */ - {0x0E10, 0xF700, 0xF89E}, /* THO THAN */ - {0x0000, 0x0000, 0x0000} + {0x0E0Du, 0xF70Fu, 0xF89Au}, /* YO YING */ + {0x0E10u, 0xF700u, 0xF89Eu}, /* THO THAN */ + {0x0000u, 0x0000u, 0x0000u} }; switch (action) { @@ -308,10 +308,10 @@ preprocess_text_thai (const hb_ot_shape_plan_t *plan, /* We only get one script at a time, so a script-agnostic implementation * is adequate here. */ -#define IS_SARA_AM(x) (((x) & ~0x0080) == 0x0E33) -#define NIKHAHIT_FROM_SARA_AM(x) ((x) - 0xE33 + 0xE4D) +#define IS_SARA_AM(x) (((x) & ~0x0080u) == 0x0E33u) +#define NIKHAHIT_FROM_SARA_AM(x) ((x) - 0x0E33u + 0x0E4Du) #define SARA_AA_FROM_SARA_AM(x) ((x) - 1) -#define IS_TONE_MARK(x) (hb_in_ranges ((x) & ~0x0080, 0x0E34, 0x0E37, 0x0E47, 0x0E4E, 0x0E31, 0x0E31)) +#define IS_TONE_MARK(x) (hb_in_ranges ((x) & ~0x0080u, 0x0E34u, 0x0E37u, 0x0E47u, 0x0E4Eu, 0x0E31u, 0x0E31u)) buffer->clear_output (); unsigned int count = buffer->len; @@ -330,8 +330,11 @@ preprocess_text_thai (const hb_ot_shape_plan_t *plan, if (unlikely (buffer->in_error)) return; - /* Ok, let's see... */ + /* Make Nikhahit be recognized as a mark when zeroing widths. */ unsigned int end = buffer->out_len; + _hb_glyph_info_set_general_category (&buffer->out_info[end - 2], HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK); + + /* Ok, let's see... */ unsigned int start = end - 2; while (start > 0 && IS_TONE_MARK (buffer->out_info[start - 1].codepoint)) start--; diff --git a/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-fallback.cc b/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-fallback.cc index 5d526c3a8e..a774f95185 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-fallback.cc +++ b/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-fallback.cc @@ -35,42 +35,42 @@ recategorize_combining_class (hb_codepoint_t u, return klass; /* Thai / Lao need some per-character work. */ - if ((u & ~0xFF) == 0x0E00) + if ((u & ~0xFF) == 0x0E00u) { if (unlikely (klass == 0)) { switch (u) { - case 0x0E31: - case 0x0E34: - case 0x0E35: - case 0x0E36: - case 0x0E37: - case 0x0E47: - case 0x0E4C: - case 0x0E4D: - case 0x0E4E: + case 0x0E31u: + case 0x0E34u: + case 0x0E35u: + case 0x0E36u: + case 0x0E37u: + case 0x0E47u: + case 0x0E4Cu: + case 0x0E4Du: + case 0x0E4Eu: klass = HB_UNICODE_COMBINING_CLASS_ABOVE_RIGHT; break; - case 0x0EB1: - case 0x0EB4: - case 0x0EB5: - case 0x0EB6: - case 0x0EB7: - case 0x0EBB: - case 0x0ECC: - case 0x0ECD: + case 0x0EB1u: + case 0x0EB4u: + case 0x0EB5u: + case 0x0EB6u: + case 0x0EB7u: + case 0x0EBBu: + case 0x0ECCu: + case 0x0ECDu: klass = HB_UNICODE_COMBINING_CLASS_ABOVE; break; - case 0x0EBC: + case 0x0EBCu: klass = HB_UNICODE_COMBINING_CLASS_BELOW; break; } } else { /* Thai virama is below-right */ - if (u == 0x0E3A) + if (u == 0x0E3Au) klass = HB_UNICODE_COMBINING_CLASS_BELOW_RIGHT; } } @@ -167,11 +167,12 @@ _hb_ot_shape_fallback_position_recategorize_marks (const hb_ot_shape_plan_t *pla hb_buffer_t *buffer) { unsigned int count = buffer->len; + hb_glyph_info_t *info = buffer->info; for (unsigned int i = 0; i < count; i++) - if (_hb_glyph_info_get_general_category (&buffer->info[i]) == HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK) { - unsigned int combining_class = _hb_glyph_info_get_modified_combining_class (&buffer->info[i]); - combining_class = recategorize_combining_class (buffer->info[i].codepoint, combining_class); - _hb_glyph_info_set_modified_combining_class (&buffer->info[i], combining_class); + if (_hb_glyph_info_get_general_category (&info[i]) == HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK) { + unsigned int combining_class = _hb_glyph_info_get_modified_combining_class (&info[i]); + combining_class = recategorize_combining_class (info[i].codepoint, combining_class); + _hb_glyph_info_set_modified_combining_class (&info[i], combining_class); } } @@ -181,8 +182,9 @@ zero_mark_advances (hb_buffer_t *buffer, unsigned int start, unsigned int end) { + hb_glyph_info_t *info = buffer->info; for (unsigned int i = start; i < end; i++) - if (_hb_glyph_info_get_general_category (&buffer->info[i]) == HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK) + if (_hb_glyph_info_get_general_category (&info[i]) == HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK) { buffer->pos[i].x_advance = 0; buffer->pos[i].y_advance = 0; @@ -327,12 +329,13 @@ position_around_base (const hb_ot_shape_plan_t *plan, unsigned int last_lig_component = (unsigned int) -1; unsigned int last_combining_class = 255; hb_glyph_extents_t cluster_extents = base_extents; /* Initialization is just to shut gcc up. */ + hb_glyph_info_t *info = buffer->info; for (unsigned int i = base + 1; i < end; i++) - if (_hb_glyph_info_get_modified_combining_class (&buffer->info[i])) + if (_hb_glyph_info_get_modified_combining_class (&info[i])) { if (num_lig_components > 1) { - unsigned int this_lig_id = _hb_glyph_info_get_lig_id (&buffer->info[i]); - unsigned int this_lig_component = _hb_glyph_info_get_lig_comp (&buffer->info[i]) - 1; + unsigned int this_lig_id = _hb_glyph_info_get_lig_id (&info[i]); + unsigned int this_lig_component = _hb_glyph_info_get_lig_comp (&info[i]) - 1; /* Conditions for attaching to the last component. */ if (!lig_id || lig_id != this_lig_id || this_lig_component >= num_lig_components) this_lig_component = num_lig_components - 1; @@ -355,7 +358,7 @@ position_around_base (const hb_ot_shape_plan_t *plan, } } - unsigned int this_combining_class = _hb_glyph_info_get_modified_combining_class (&buffer->info[i]); + unsigned int this_combining_class = _hb_glyph_info_get_modified_combining_class (&info[i]); if (last_combining_class != this_combining_class) { last_combining_class = this_combining_class; @@ -391,13 +394,14 @@ position_cluster (const hb_ot_shape_plan_t *plan, return; /* Find the base glyph */ + hb_glyph_info_t *info = buffer->info; for (unsigned int i = start; i < end; i++) - if (!HB_UNICODE_GENERAL_CATEGORY_IS_MARK (_hb_glyph_info_get_general_category (&buffer->info[i]))) + if (!HB_UNICODE_GENERAL_CATEGORY_IS_MARK (_hb_glyph_info_get_general_category (&info[i]))) { /* Find mark glyphs */ unsigned int j; for (j = i + 1; j < end; j++) - if (!HB_UNICODE_GENERAL_CATEGORY_IS_MARK (_hb_glyph_info_get_general_category (&buffer->info[j]))) + if (!HB_UNICODE_GENERAL_CATEGORY_IS_MARK (_hb_glyph_info_get_general_category (&info[j]))) break; position_around_base (plan, font, buffer, i, j); @@ -432,15 +436,13 @@ _hb_ot_shape_fallback_kern (const hb_ot_shape_plan_t *plan, { if (!plan->has_kern) return; - unsigned int count = buffer->len; - OT::hb_apply_context_t c (1, font, buffer); c.set_lookup_mask (plan->kern_mask); c.set_lookup_props (OT::LookupFlag::IgnoreMarks); + unsigned int count = buffer->len; hb_glyph_info_t *info = buffer->info; hb_glyph_position_t *pos = buffer->pos; - for (unsigned int idx = 0; idx < count;) { OT::hb_apply_context_t::skipping_forward_iterator_t skippy_iter (&c, idx, 1); diff --git a/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-private.hh b/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-private.hh index df81fa25d9..54ac2c3cf7 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-private.hh +++ b/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-private.hh @@ -44,6 +44,7 @@ struct hb_ot_shape_plan_t hb_mask_t kern_mask; unsigned int has_frac : 1; unsigned int has_kern : 1; + unsigned int has_mark : 1; inline void collect_lookups (hb_tag_t table_tag, hb_set_t *lookups) const { @@ -92,6 +93,7 @@ struct hb_ot_shape_planner_t plan.has_frac = plan.frac_mask || (plan.numr_mask && plan.dnom_mask); plan.has_kern = !!plan.kern_mask; + plan.has_mark = !!plan.map.get_1_mask (HB_TAG ('m','a','r','k')); } private: diff --git a/src/3rdparty/harfbuzz-ng/src/hb-ot-shape.cc b/src/3rdparty/harfbuzz-ng/src/hb-ot-shape.cc index 3080a1d03d..1f99014c62 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-ot-shape.cc +++ b/src/3rdparty/harfbuzz-ng/src/hb-ot-shape.cc @@ -37,6 +37,7 @@ #include "hb-ot-shape-normalize-private.hh" #include "hb-ot-layout-private.hh" +#include "hb-unicode-private.hh" #include "hb-set-private.hh" @@ -226,8 +227,9 @@ static void hb_set_unicode_props (hb_buffer_t *buffer) { unsigned int count = buffer->len; + hb_glyph_info_t *info = buffer->info; for (unsigned int i = 0; i < count; i++) - _hb_glyph_info_set_unicode_props (&buffer->info[i], buffer->unicode); + _hb_glyph_info_set_unicode_props (&info[i], buffer->unicode); } static void @@ -238,11 +240,11 @@ hb_insert_dotted_circle (hb_buffer_t *buffer, hb_font_t *font) HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK) return; - if (!font->has_glyph (0x25CC)) + if (!font->has_glyph (0x25CCu)) return; hb_glyph_info_t dottedcircle; - dottedcircle.codepoint = 0x25CC; + dottedcircle.codepoint = 0x25CCu; _hb_glyph_info_set_unicode_props (&dottedcircle, buffer->unicode); buffer->clear_output (); @@ -262,8 +264,9 @@ static void hb_form_clusters (hb_buffer_t *buffer) { unsigned int count = buffer->len; + hb_glyph_info_t *info = buffer->info; for (unsigned int i = 1; i < count; i++) - if (HB_UNICODE_GENERAL_CATEGORY_IS_MARK (_hb_glyph_info_get_general_category (&buffer->info[i]))) + if (HB_UNICODE_GENERAL_CATEGORY_IS_MARK (_hb_glyph_info_get_general_category (&info[i]))) buffer->merge_clusters (i - 1, i + 1); } @@ -321,7 +324,7 @@ hb_ot_shape_setup_masks_fraction (hb_ot_shape_context_t *c) hb_glyph_info_t *info = buffer->info; for (unsigned int i = 0; i < count; i++) { - if (info[i].codepoint == 0x2044) /* FRACTION SLASH */ + if (info[i].codepoint == 0x2044u) /* FRACTION SLASH */ { unsigned int start = i, end = i + 1; while (start && @@ -381,8 +384,9 @@ hb_ot_map_glyphs_fast (hb_buffer_t *buffer) { /* Normalization process sets up glyph_index(), we just copy it. */ unsigned int count = buffer->len; + hb_glyph_info_t *info = buffer->info; for (unsigned int i = 0; i < count; i++) - buffer->info[i].codepoint = buffer->info[i].glyph_index(); + info[i].codepoint = info[i].glyph_index(); } static inline void @@ -391,11 +395,24 @@ hb_synthesize_glyph_classes (hb_ot_shape_context_t *c) unsigned int count = c->buffer->len; hb_glyph_info_t *info = c->buffer->info; for (unsigned int i = 0; i < count; i++) - _hb_glyph_info_set_glyph_props (&info[i], - _hb_glyph_info_get_general_category (&info[i]) - == HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK ? - HB_OT_LAYOUT_GLYPH_PROPS_MARK : - HB_OT_LAYOUT_GLYPH_PROPS_BASE_GLYPH); + { + hb_ot_layout_glyph_class_mask_t klass; + + /* Never mark default-ignorables as marks. + * They won't get in the way of lookups anyway, + * but having them as mark will cause them to be skipped + * over if the lookup-flag says so, but at least for the + * Mongolian variation selectors, looks like Uniscribe + * marks them as non-mark. Some Mongolian fonts without + * GDEF rely on this. Another notable character that + * this applies to is COMBINING GRAPHEME JOINER. */ + klass = (_hb_glyph_info_get_general_category (&info[i]) != + HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK || + _hb_glyph_info_is_default_ignorable (&info[i])) ? + HB_OT_LAYOUT_GLYPH_PROPS_BASE_GLYPH : + HB_OT_LAYOUT_GLYPH_PROPS_MARK; + _hb_glyph_info_set_glyph_props (&info[i], klass); + } } static inline void @@ -452,26 +469,44 @@ hb_ot_substitute (hb_ot_shape_context_t *c) /* Position */ static inline void -zero_mark_widths_by_unicode (hb_buffer_t *buffer) +adjust_mark_offsets (hb_glyph_position_t *pos) +{ + pos->x_offset -= pos->x_advance; + pos->y_offset -= pos->y_advance; +} + +static inline void +zero_mark_width (hb_glyph_position_t *pos) +{ + pos->x_advance = 0; + pos->y_advance = 0; +} + +static inline void +zero_mark_widths_by_unicode (hb_buffer_t *buffer, bool adjust_offsets) { unsigned int count = buffer->len; + hb_glyph_info_t *info = buffer->info; for (unsigned int i = 0; i < count; i++) - if (_hb_glyph_info_get_general_category (&buffer->info[i]) == HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK) + if (_hb_glyph_info_get_general_category (&info[i]) == HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK) { - buffer->pos[i].x_advance = 0; - buffer->pos[i].y_advance = 0; + if (adjust_offsets) + adjust_mark_offsets (&buffer->pos[i]); + zero_mark_width (&buffer->pos[i]); } } static inline void -zero_mark_widths_by_gdef (hb_buffer_t *buffer) +zero_mark_widths_by_gdef (hb_buffer_t *buffer, bool adjust_offsets) { unsigned int count = buffer->len; + hb_glyph_info_t *info = buffer->info; for (unsigned int i = 0; i < count; i++) - if (_hb_glyph_info_is_mark (&buffer->info[i])) + if (_hb_glyph_info_is_mark (&info[i])) { - buffer->pos[i].x_advance = 0; - buffer->pos[i].y_advance = 0; + if (adjust_offsets) + adjust_mark_offsets (&buffer->pos[i]); + zero_mark_width (&buffer->pos[i]); } } @@ -501,16 +536,28 @@ hb_ot_position_complex (hb_ot_shape_context_t *c) { bool ret = false; unsigned int count = c->buffer->len; + bool has_positioning = hb_ot_layout_has_positioning (c->face); + /* If the font has no GPOS, AND, no fallback positioning will + * happen, AND, direction is forward, then when zeroing mark + * widths, we shift the mark with it, such that the mark + * is positioned hanging over the previous glyph. When + * direction is backward we don't shift and it will end up + * hanging over the next glyph after the final reordering. + * If fallback positinoing happens or GPOS is present, we don't + * care. + */ + bool adjust_offsets_when_zeroing = !(has_positioning || c->plan->shaper->fallback_position || + HB_DIRECTION_IS_BACKWARD (c->buffer->props.direction)); switch (c->plan->shaper->zero_width_marks) { case HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_GDEF_EARLY: - zero_mark_widths_by_gdef (c->buffer); + zero_mark_widths_by_gdef (c->buffer, adjust_offsets_when_zeroing); break; /* Not currently used for any shaper: case HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_UNICODE_EARLY: - zero_mark_widths_by_unicode (c->buffer); + zero_mark_widths_by_unicode (c->buffer, adjust_offsets_when_zeroing); break; */ @@ -521,7 +568,7 @@ hb_ot_position_complex (hb_ot_shape_context_t *c) break; } - if (hb_ot_layout_has_positioning (c->face)) + if (has_positioning) { hb_glyph_info_t *info = c->buffer->info; hb_glyph_position_t *pos = c->buffer->pos; @@ -550,11 +597,11 @@ hb_ot_position_complex (hb_ot_shape_context_t *c) switch (c->plan->shaper->zero_width_marks) { case HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_UNICODE_LATE: - zero_mark_widths_by_unicode (c->buffer); + zero_mark_widths_by_unicode (c->buffer, adjust_offsets_when_zeroing); break; case HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_GDEF_LATE: - zero_mark_widths_by_gdef (c->buffer); + zero_mark_widths_by_gdef (c->buffer, adjust_offsets_when_zeroing); break; default: @@ -731,8 +778,9 @@ hb_ot_shape_glyphs_closure (hb_font_t *font, bool mirror = hb_script_get_horizontal_direction (buffer->props.script) == HB_DIRECTION_RTL; unsigned int count = buffer->len; + hb_glyph_info_t *info = buffer->info; for (unsigned int i = 0; i < count; i++) - add_char (font, buffer->unicode, mirror, buffer->info[i].codepoint, glyphs); + add_char (font, buffer->unicode, mirror, info[i].codepoint, glyphs); hb_set_t lookups; lookups.init (); diff --git a/src/3rdparty/harfbuzz-ng/src/hb-ot-shape.h b/src/3rdparty/harfbuzz-ng/src/hb-ot-shape.h index afe6fe9618..1402f54acc 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-ot-shape.h +++ b/src/3rdparty/harfbuzz-ng/src/hb-ot-shape.h @@ -24,31 +24,30 @@ * Red Hat Author(s): Behdad Esfahbod */ +#ifndef HB_OT_H_IN +#error "Include instead." +#endif + #ifndef HB_OT_SHAPE_H #define HB_OT_SHAPE_H -#define HB_OT_SHAPE_H_IN #include "hb.h" -#include "hb-ot-layout.h" -#include "hb-ot-tag.h" - HB_BEGIN_DECLS /* TODO port to shape-plan / set. */ void hb_ot_shape_glyphs_closure (hb_font_t *font, - hb_buffer_t *buffer, - const hb_feature_t *features, - unsigned int num_features, - hb_set_t *glyphs); + hb_buffer_t *buffer, + const hb_feature_t *features, + unsigned int num_features, + hb_set_t *glyphs); void hb_ot_shape_plan_collect_lookups (hb_shape_plan_t *shape_plan, - hb_tag_t table_tag, - hb_set_t *lookup_indexes /* OUT */); + hb_tag_t table_tag, + hb_set_t *lookup_indexes /* OUT */); HB_END_DECLS -#undef HB_OT_SHAPE_H_IN #endif /* HB_OT_SHAPE_H */ diff --git a/src/3rdparty/harfbuzz-ng/src/hb-ot-tag.cc b/src/3rdparty/harfbuzz-ng/src/hb-ot-tag.cc index 5594ef5074..878dd79b62 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-ot-tag.cc +++ b/src/3rdparty/harfbuzz-ng/src/hb-ot-tag.cc @@ -57,7 +57,7 @@ hb_ot_old_tag_from_script (hb_script_t script) } /* Else, just change first char to lowercase and return */ - return ((hb_tag_t) script) | 0x20000000; + return ((hb_tag_t) script) | 0x20000000u; } static hb_script_t @@ -70,13 +70,13 @@ hb_ot_old_tag_to_script (hb_tag_t tag) /* Any spaces at the end of the tag are replaced by repeating the last * letter. Eg 'nko ' -> 'Nkoo' */ - if (unlikely ((tag & 0x0000FF00) == 0x00002000)) - tag |= (tag >> 8) & 0x0000FF00; /* Copy second letter to third */ - if (unlikely ((tag & 0x000000FF) == 0x00000020)) - tag |= (tag >> 8) & 0x000000FF; /* Copy third letter to fourth */ + if (unlikely ((tag & 0x0000FF00u) == 0x00002000u)) + tag |= (tag >> 8) & 0x0000FF00u; /* Copy second letter to third */ + if (unlikely ((tag & 0x000000FFu) == 0x00000020u)) + tag |= (tag >> 8) & 0x000000FFu; /* Copy third letter to fourth */ /* Change first char to uppercase and return */ - return (hb_script_t) (tag & ~0x20000000); + return (hb_script_t) (tag & ~0x20000000u); } static hb_tag_t @@ -146,7 +146,7 @@ hb_ot_tags_from_script (hb_script_t script, hb_script_t hb_ot_tag_to_script (hb_tag_t tag) { - if (unlikely ((tag & 0x000000FF) == '2')) + if (unlikely ((tag & 0x000000FFu) == '2')) return hb_ot_new_tag_to_script (tag); return hb_ot_old_tag_to_script (tag); @@ -156,7 +156,7 @@ hb_ot_tag_to_script (hb_tag_t tag) /* hb_language_t */ typedef struct { - char language[6]; + char language[4]; hb_tag_t tag; } LangTag; @@ -763,12 +763,18 @@ static const LangTag ot_languages[] = { /*{"??", HB_TAG('Z','H','P',' ')},*/ /* Chinese Phonetic */ }; -static const LangTag ot_languages_zh[] = { +typedef struct { + char language[8]; + hb_tag_t tag; +} LangTagLong; +static const LangTagLong ot_languages_zh[] = { {"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-sg", HB_TAG('Z','H','S',' ')}, /* Chinese (Singapore) */ - {"zh-tw", HB_TAG('Z','H','T',' ')} /* Chinese (Taiwan) */ + {"zh-tw", HB_TAG('Z','H','T',' ')}, /* Chinese (Taiwan) */ + {"zh-hans", HB_TAG('Z','H','S',' ')}, /* Chinese (Simplified) */ + {"zh-hant", HB_TAG('Z','H','T',' ')}, /* Chinese (Traditional) */ }; static int @@ -800,7 +806,6 @@ hb_tag_t hb_ot_tag_from_language (hb_language_t language) { const char *lang_str, *s; - const LangTag *lang_tag; if (language == HB_LANGUAGE_INVALID) return HB_OT_TAG_DEFAULT_LANGUAGE; @@ -822,11 +827,14 @@ hb_ot_tag_from_language (hb_language_t language) } /* Find a language matching in the first component */ - lang_tag = (LangTag *) bsearch (lang_str, ot_languages, - ARRAY_LENGTH (ot_languages), sizeof (LangTag), - (hb_compare_func_t) lang_compare_first_component); - if (lang_tag) - return lang_tag->tag; + { + const LangTag *lang_tag; + lang_tag = (LangTag *) bsearch (lang_str, ot_languages, + ARRAY_LENGTH (ot_languages), sizeof (LangTag), + (hb_compare_func_t) lang_compare_first_component); + if (lang_tag) + return lang_tag->tag; + } /* Otherwise, check the Chinese ones */ if (0 == lang_compare_first_component (lang_str, "zh")) @@ -835,8 +843,9 @@ hb_ot_tag_from_language (hb_language_t language) for (i = 0; i < ARRAY_LENGTH (ot_languages_zh); i++) { + const LangTagLong *lang_tag; lang_tag = &ot_languages_zh[i]; - if (lang_matches (lang_tag->language, lang_str)) + if (lang_matches (lang_str, lang_tag->language)) return lang_tag->tag; } @@ -849,7 +858,7 @@ hb_ot_tag_from_language (hb_language_t language) s = lang_str + strlen (lang_str); if (s - lang_str == 3) { /* Assume it's ISO-639-3 and upper-case and use it. */ - return hb_tag_from_string (lang_str, s - lang_str) & ~0x20202000; + return hb_tag_from_string (lang_str, s - lang_str) & ~0x20202000u; } return HB_OT_TAG_DEFAULT_LANGUAGE; @@ -868,21 +877,12 @@ hb_ot_tag_to_language (hb_tag_t tag) return hb_language_from_string (ot_languages[i].language, -1); /* If tag starts with ZH, it's Chinese */ - if ((tag & 0xFFFF0000) == 0x5A480000) { + if ((tag & 0xFFFF0000u) == 0x5A480000u) { switch (tag) { case HB_TAG('Z','H','H',' '): return hb_language_from_string ("zh-hk", -1); /* Hong Kong */ - default: { - /* Encode the tag... */ - unsigned char buf[14] = "zh-x-hbot"; - buf[9] = tag >> 24; - buf[10] = (tag >> 16) & 0xFF; - buf[11] = (tag >> 8) & 0xFF; - buf[12] = tag & 0xFF; - if (buf[12] == 0x20) - buf[12] = '\0'; - buf[13] = '\0'; - return hb_language_from_string ((char *) buf, -1); - } + case HB_TAG('Z','H','S',' '): return hb_language_from_string ("zh-Hans", -1); /* Simplified */ + case HB_TAG('Z','H','T',' '): return hb_language_from_string ("zh-Hant", -1); /* Traditional */ + default: break; /* Fall through */ } } diff --git a/src/3rdparty/harfbuzz-ng/src/hb-ot.h b/src/3rdparty/harfbuzz-ng/src/hb-ot.h index e9a280b7dd..47c92a58e4 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-ot.h +++ b/src/3rdparty/harfbuzz-ng/src/hb-ot.h @@ -30,6 +30,7 @@ #include "hb.h" +#include "hb-ot-font.h" #include "hb-ot-layout.h" #include "hb-ot-tag.h" #include "hb-ot-shape.h" diff --git a/src/3rdparty/harfbuzz-ng/src/hb-private.hh b/src/3rdparty/harfbuzz-ng/src/hb-private.hh index 680b21e2cc..a451d164f9 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-private.hh +++ b/src/3rdparty/harfbuzz-ng/src/hb-private.hh @@ -54,23 +54,77 @@ #include +/* Compiler attributes */ -/* Essentials */ -#ifndef NULL -# define NULL ((void *) 0) +#if defined(__GNUC__) && (__GNUC__ > 2) && defined(__OPTIMIZE__) +#define _HB_BOOLEAN_EXPR(expr) ((expr) ? 1 : 0) +#define likely(expr) (__builtin_expect (_HB_BOOLEAN_EXPR(expr), 1)) +#define unlikely(expr) (__builtin_expect (_HB_BOOLEAN_EXPR(expr), 0)) +#else +#define likely(expr) (expr) +#define unlikely(expr) (expr) #endif +#ifndef __GNUC__ +#undef __attribute__ +#define __attribute__(x) +#endif + +#if __GNUC__ >= 3 +#define HB_PURE_FUNC __attribute__((pure)) +#define HB_CONST_FUNC __attribute__((const)) +#define HB_PRINTF_FUNC(format_idx, arg_idx) __attribute__((__format__ (__printf__, format_idx, arg_idx))) +#else +#define HB_PURE_FUNC +#define HB_CONST_FUNC +#define HB_PRINTF_FUNC(format_idx, arg_idx) +#endif +#if __GNUC__ >= 4 +#define HB_UNUSED __attribute__((unused)) +#else +#define HB_UNUSED +#endif + +#ifndef HB_INTERNAL +# ifndef __MINGW32__ +# define HB_INTERNAL __attribute__((__visibility__("hidden"))) +# else +# define HB_INTERNAL +# endif +#endif + +#if (defined(__WIN32__) && !defined(__WINE__)) || defined(_MSC_VER) +#define snprintf _snprintf +#endif + +#ifdef _MSC_VER +#undef inline +#define inline __inline +#endif + +#ifdef __STRICT_ANSI__ +#undef inline +#define inline __inline__ +#endif + +#if __GNUC__ >= 3 +#define HB_FUNC __PRETTY_FUNCTION__ +#elif defined(_MSC_VER) +#define HB_FUNC __FUNCSIG__ +#else +#define HB_FUNC __func__ +#endif -/* Void! */ -struct _hb_void_t {}; -typedef const _hb_void_t &hb_void_t; -#define HB_VOID (* (const _hb_void_t *) NULL) /* Basics */ +#ifndef NULL +# define NULL ((void *) 0) +#endif + #undef MIN template static inline Type MIN (const Type &a, const Type &b) { return a < b ? a : b; } @@ -92,7 +146,7 @@ static inline unsigned int ARRAY_LENGTH (const Type (&)[n]) { return n; } #define HB_STMT_START do #define HB_STMT_END while (0) -#define _ASSERT_STATIC1(_line, _cond) typedef int _static_assert_on_line_##_line##_failed[(_cond)?1:-1] +#define _ASSERT_STATIC1(_line, _cond) HB_UNUSED typedef int _static_assert_on_line_##_line##_failed[(_cond)?1:-1] #define _ASSERT_STATIC0(_line, _cond) _ASSERT_STATIC1 (_line, (_cond)) #define ASSERT_STATIC(_cond) _ASSERT_STATIC0 (__LINE__, (_cond)) @@ -139,7 +193,7 @@ ASSERT_STATIC (sizeof (hb_var_int_t) == 4); /* Check _assertion in a method environment */ #define _ASSERT_POD1(_line) \ - inline void _static_assertion_on_line_##_line (void) const \ + HB_UNUSED inline void _static_assertion_on_line_##_line (void) const \ { _ASSERT_INSTANCE_POD1 (_line, *this); /* Make sure it's POD. */ } # define _ASSERT_POD0(_line) _ASSERT_POD1 (_line) # define ASSERT_POD() _ASSERT_POD0 (__LINE__) @@ -148,68 +202,10 @@ ASSERT_STATIC (sizeof (hb_var_int_t) == 4); /* Misc */ - -#if defined(__GNUC__) && (__GNUC__ > 2) && defined(__OPTIMIZE__) -#define _HB_BOOLEAN_EXPR(expr) ((expr) ? 1 : 0) -#define likely(expr) (__builtin_expect (_HB_BOOLEAN_EXPR(expr), 1)) -#define unlikely(expr) (__builtin_expect (_HB_BOOLEAN_EXPR(expr), 0)) -#else -#define likely(expr) (expr) -#define unlikely(expr) (expr) -#endif - -#ifndef __GNUC__ -#undef __attribute__ -#define __attribute__(x) -#endif - -#if __GNUC__ >= 3 -#define HB_PURE_FUNC __attribute__((pure)) -#define HB_CONST_FUNC __attribute__((const)) -#define HB_PRINTF_FUNC(format_idx, arg_idx) __attribute__((__format__ (__printf__, format_idx, arg_idx))) -#else -#define HB_PURE_FUNC -#define HB_CONST_FUNC -#define HB_PRINTF_FUNC(format_idx, arg_idx) -#endif -#if __GNUC__ >= 4 -#define HB_UNUSED __attribute__((unused)) -#else -#define HB_UNUSED -#endif - -#ifndef HB_INTERNAL -# ifndef __MINGW32__ -# define HB_INTERNAL __attribute__((__visibility__("hidden"))) -# else -# define HB_INTERNAL -# endif -#endif - - -#if (defined(__WIN32__) && !defined(__WINE__)) || defined(_MSC_VER) -#define snprintf _snprintf -#endif - -#ifdef _MSC_VER -#undef inline -#define inline __inline -#endif - -#ifdef __STRICT_ANSI__ -#undef inline -#define inline __inline__ -#endif - - -#if __GNUC__ >= 3 -#define HB_FUNC __PRETTY_FUNCTION__ -#elif defined(_MSC_VER) -#define HB_FUNC __FUNCSIG__ -#else -#define HB_FUNC __func__ -#endif - +/* Void! */ +struct _hb_void_t {}; +typedef const _hb_void_t &hb_void_t; +#define HB_VOID (* (const _hb_void_t *) NULL) /* Return the number of 1 bits in mask. */ static inline HB_CONST_FUNC unsigned int @@ -219,7 +215,7 @@ _hb_popcount32 (uint32_t mask) return __builtin_popcount (mask); #else /* "HACKMEM 169" */ - register uint32_t y; + uint32_t y; y = (mask >> 1) &033333333333; y = mask - y - ((y >>1) & 033333333333); return (((y + (y >> 3)) & 030707070707) % 077); @@ -233,7 +229,7 @@ _hb_bit_storage (unsigned int number) #if defined(__GNUC__) && (__GNUC__ >= 4) && defined(__OPTIMIZE__) return likely (number) ? (sizeof (unsigned int) * 8 - __builtin_clz (number)) : 0; #else - register unsigned int n_bits = 0; + unsigned int n_bits = 0; while (number) { n_bits++; number >>= 1; @@ -249,7 +245,7 @@ _hb_ctz (unsigned int number) #if defined(__GNUC__) && (__GNUC__ >= 4) && defined(__OPTIMIZE__) return likely (number) ? __builtin_ctz (number) : 0; #else - register unsigned int n_bits = 0; + unsigned int n_bits = 0; if (unlikely (!number)) return 0; while (!(number & 1)) { n_bits++; @@ -276,7 +272,7 @@ typedef int (*hb_compare_func_t) (const void *, const void *); #define HB_PREALLOCED_ARRAY_INIT {0} -template +template struct hb_prealloced_array_t { unsigned int len; @@ -357,14 +353,14 @@ struct hb_prealloced_array_t return NULL; } - inline void sort (void) + inline void qsort (void) { - qsort (array, len, sizeof (Type), (hb_compare_func_t) Type::cmp); + ::qsort (array, len, sizeof (Type), (hb_compare_func_t) Type::cmp); } - inline void sort (unsigned int start, unsigned int end) + inline void qsort (unsigned int start, unsigned int end) { - qsort (array + start, end - start, sizeof (Type), (hb_compare_func_t) Type::cmp); + ::qsort (array + start, end - start, sizeof (Type), (hb_compare_func_t) Type::cmp); } template @@ -387,12 +383,11 @@ struct hb_prealloced_array_t } }; -#define HB_AUTO_ARRAY_PREALLOCED 16 template -struct hb_auto_array_t : hb_prealloced_array_t +struct hb_auto_array_t : hb_prealloced_array_t { - hb_auto_array_t (void) { hb_prealloced_array_t::init (); } - ~hb_auto_array_t (void) { hb_prealloced_array_t::finish (); } + hb_auto_array_t (void) { hb_prealloced_array_t::init (); } + ~hb_auto_array_t (void) { hb_prealloced_array_t::finish (); } }; @@ -725,7 +720,7 @@ static inline void _hb_warn_no_return (bool returned) } } template <> -inline void _hb_warn_no_return (bool returned HB_UNUSED) +/*static*/ inline void _hb_warn_no_return (bool returned HB_UNUSED) {} template @@ -791,20 +786,23 @@ struct hb_auto_trace_t<0, ret_t> { /* Misc */ +template class hb_assert_unsigned_t; +template <> class hb_assert_unsigned_t {}; +template <> class hb_assert_unsigned_t {}; +template <> class hb_assert_unsigned_t {}; +template <> class hb_assert_unsigned_t {}; -/* Pre-mature optimization: - * Checks for lo <= u <= hi but with an optimization if lo and hi - * are only different in a contiguous set of lower-most bits. - */ template static inline bool hb_in_range (T u, T lo, T hi) { - if ( ((lo^hi) & lo) == 0 && - ((lo^hi) & hi) == (lo^hi) && - ((lo^hi) & ((lo^hi) + 1)) == 0 ) - return (u & ~(lo^hi)) == lo; - else - return lo <= u && u <= hi; + /* The sizeof() is here to force template instantiation. + * I'm sure there are better ways to do this but can't think of + * one right now. Declaring a variable won't work as HB_UNUSED + * is unsable on some platforms and unused types are less likely + * to generate a warning than unused variables. */ + ASSERT_STATIC (sizeof (hb_assert_unsigned_t) >= 0); + + return (u - lo) <= (hi - lo); } template static inline bool diff --git a/src/3rdparty/harfbuzz-ng/src/hb-shape-plan.cc b/src/3rdparty/harfbuzz-ng/src/hb-shape-plan.cc index e354f29176..5ffc6b1362 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-shape-plan.cc +++ b/src/3rdparty/harfbuzz-ng/src/hb-shape-plan.cc @@ -104,8 +104,6 @@ hb_shape_plan_create (hb_face_t *face, unsigned int num_user_features, const char * const *shaper_list) { - assert (props->direction != HB_DIRECTION_INVALID); - hb_shape_plan_t *shape_plan; hb_feature_t *features = NULL; @@ -120,6 +118,8 @@ hb_shape_plan_create (hb_face_t *face, return hb_shape_plan_get_empty (); } + assert (props->direction != HB_DIRECTION_INVALID); + hb_face_make_immutable (face); shape_plan->default_shaper_list = shaper_list == NULL; shape_plan->face_unsafe = face; diff --git a/src/3rdparty/harfbuzz-ng/src/hb-shaper-list.hh b/src/3rdparty/harfbuzz-ng/src/hb-shaper-list.hh index 5713e057a0..6c537d4921 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-shaper-list.hh +++ b/src/3rdparty/harfbuzz-ng/src/hb-shaper-list.hh @@ -34,25 +34,21 @@ /* Only picks up fonts that have a "Silf" table. */ HB_SHAPER_IMPLEMENT (graphite2) #endif - #ifdef HAVE_CORETEXT /* Only picks up fonts that have a "mort" or "morx" table. */ -HB_SHAPER_IMPLEMENT (coretext) +HB_SHAPER_IMPLEMENT (coretext_aat) #endif #ifdef HAVE_OT HB_SHAPER_IMPLEMENT (ot) /* <--- This is our main OpenType shaper. */ #endif -#ifdef HAVE_HB_OLD -HB_SHAPER_IMPLEMENT (old) -#endif -#ifdef HAVE_ICU_LE -HB_SHAPER_IMPLEMENT (icu_le) -#endif #ifdef HAVE_UNISCRIBE HB_SHAPER_IMPLEMENT (uniscribe) #endif +#ifdef HAVE_CORETEXT +HB_SHAPER_IMPLEMENT (coretext) +#endif #ifdef HAVE_FALLBACK HB_SHAPER_IMPLEMENT (fallback) /* <--- This should be last. */ diff --git a/src/3rdparty/harfbuzz-ng/src/hb-unicode-private.hh b/src/3rdparty/harfbuzz-ng/src/hb-unicode-private.hh index ba193e8fa5..a2c59da274 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-unicode-private.hh +++ b/src/3rdparty/harfbuzz-ng/src/hb-unicode-private.hh @@ -102,72 +102,70 @@ HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS_SIMPLE } - unsigned int + inline unsigned int modified_combining_class (hb_codepoint_t unicode) { /* XXX This hack belongs to the Myanmar shaper. */ - if (unlikely (unicode == 0x1037)) unicode = 0x103A; + if (unlikely (unicode == 0x1037u)) unicode = 0x103Au; /* XXX This hack belongs to the SEA shaper (for Tai Tham): * Reorder SAKOT to ensure it comes after any tone marks. */ - if (unlikely (unicode == 0x1A60)) return 254; + if (unlikely (unicode == 0x1A60u)) return 254; + + /* XXX This hack belongs to the Tibetan shaper: + * Reorder PADMA to ensure it comes after any vowel marks. */ + if (unlikely (unicode == 0x0FC6u)) return 254; return _hb_modified_combining_class[combining_class (unicode)]; } - inline hb_bool_t + static inline hb_bool_t is_variation_selector (hb_codepoint_t unicode) { - return unlikely (hb_in_ranges (unicode, - 0x180B, 0x180D, /* MONGOLIAN FREE VARIATION SELECTOR ONE..THREE */ - 0xFE00, 0xFE0F, /* VARIATION SELECTOR-1..16 */ - 0xE0100, 0xE01EF)); /* VARIATION SELECTOR-17..256 */ + /* U+180B..180D MONGOLIAN FREE VARIATION SELECTORs are handled in the + * Arabic shaper. No need to match them here. */ + return unlikely (hb_in_ranges (unicode, + 0xFE00u, 0xFE0Fu, /* VARIATION SELECTOR-1..16 */ + 0xE0100u, 0xE01EFu)); /* VARIATION SELECTOR-17..256 */ } /* Default_Ignorable codepoints: - * - * Note that as of Oct 2012 (Unicode 6.2), U+180E MONGOLIAN VOWEL SEPARATOR - * is NOT Default_Ignorable, but it really behaves in a way that it should - * be. That has been reported to the Unicode Technical Committee for - * consideration. As such, we include it here, since Uniscribe removes it. - * It *is* in Unicode 6.3 however. U+061C ARABIC LETTER MARK from Unicode - * 6.3 is also added manually. The new Unicode 6.3 bidi formatting - * characters are encoded in a block that was Default_Ignorable already. * * Note: While U+115F, U+1160, U+3164 and U+FFA0 are Default_Ignorable, * we do NOT want to hide them, as the way Uniscribe has implemented them * is with regular spacing glyphs, and that's the way fonts are made to work. * As such, we make exceptions for those four. * - * Gathered from: - * http://unicode.org/cldr/utility/list-unicodeset.jsp?a=[:DI:]&abb=on&ucd=on&esc=on - * - * Last updated to the page with the following versions: - * Version 3.6; ICU version: 50.0.1.0; Unicode version: 6.1.0.0 - * - * 4,167 Code Points - * - * [\u00AD\u034F\u115F\u1160\u17B4\u17B5\u180B-\u180D\u200B-\u200F\u202A-\u202E\u2060-\u206F\u3164\uFE00-\uFE0F\uFEFF\uFFA0\uFFF0-\uFFF8\U0001D173-\U0001D17A\U000E0000-\U000E0FFF] - * - * 00AD ;SOFT HYPHEN - * 034F ;COMBINING GRAPHEME JOINER - * #115F ;HANGUL CHOSEONG FILLER - * #1160 ;HANGUL JUNGSEONG FILLER - * 17B4 ;KHMER VOWEL INHERENT AQ - * 17B5 ;KHMER VOWEL INHERENT AA - * 180B..180D ;MONGOLIAN FREE VARIATION SELECTOR THREE - * 200B..200F ;RIGHT-TO-LEFT MARK - * 202A..202E ;RIGHT-TO-LEFT OVERRIDE - * 2060..206F ;NOMINAL DIGIT SHAPES - * #3164 ;HANGUL FILLER - * FE00..FE0F ;VARIATION SELECTOR-16 - * FEFF ;ZERO WIDTH NO-BREAK SPACE - * #FFA0 ;HALFWIDTH HANGUL FILLER - * FFF0..FFF8 ; - * 1D173..1D17A ;MUSICAL SYMBOL END PHRASE - * E0000..E0FFF ; + * Unicode 7.0: + * $ grep '; Default_Ignorable_Code_Point ' DerivedCoreProperties.txt | sed 's/;.*#/#/' + * 00AD # Cf SOFT HYPHEN + * 034F # Mn COMBINING GRAPHEME JOINER + * 061C # Cf ARABIC LETTER MARK + * 115F..1160 # Lo [2] HANGUL CHOSEONG FILLER..HANGUL JUNGSEONG FILLER + * 17B4..17B5 # Mn [2] KHMER VOWEL INHERENT AQ..KHMER VOWEL INHERENT AA + * 180B..180D # Mn [3] MONGOLIAN FREE VARIATION SELECTOR ONE..MONGOLIAN FREE VARIATION SELECTOR THREE + * 180E # Cf MONGOLIAN VOWEL SEPARATOR + * 200B..200F # Cf [5] ZERO WIDTH SPACE..RIGHT-TO-LEFT MARK + * 202A..202E # Cf [5] LEFT-TO-RIGHT EMBEDDING..RIGHT-TO-LEFT OVERRIDE + * 2060..2064 # Cf [5] WORD JOINER..INVISIBLE PLUS + * 2065 # Cn + * 2066..206F # Cf [10] LEFT-TO-RIGHT ISOLATE..NOMINAL DIGIT SHAPES + * 3164 # Lo HANGUL FILLER + * FE00..FE0F # Mn [16] VARIATION SELECTOR-1..VARIATION SELECTOR-16 + * FEFF # Cf ZERO WIDTH NO-BREAK SPACE + * FFA0 # Lo HALFWIDTH HANGUL FILLER + * FFF0..FFF8 # Cn [9] .. + * 1BCA0..1BCA3 # Cf [4] SHORTHAND FORMAT LETTER OVERLAP..SHORTHAND FORMAT UP STEP + * 1D173..1D17A # Cf [8] MUSICAL SYMBOL BEGIN BEAM..MUSICAL SYMBOL END PHRASE + * E0000 # Cn + * E0001 # Cf LANGUAGE TAG + * E0002..E001F # Cn [30] .. + * E0020..E007F # Cf [96] TAG SPACE..CANCEL TAG + * E0080..E00FF # Cn [128] .. + * E0100..E01EF # Mn [240] VARIATION SELECTOR-17..VARIATION SELECTOR-256 + * E01F0..E0FFF # Cn [3600] .. */ - inline hb_bool_t + static inline hb_bool_t is_default_ignorable (hb_codepoint_t ch) { hb_codepoint_t plane = ch >> 16; @@ -176,16 +174,16 @@ HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS_SIMPLE /* BMP */ hb_codepoint_t page = ch >> 8; switch (page) { - case 0x00: return unlikely (ch == 0x00AD); - case 0x03: return unlikely (ch == 0x034F); - case 0x06: return unlikely (ch == 0x061C); - case 0x17: return hb_in_range (ch, 0x17B4, 0x17B5); - case 0x18: return hb_in_range (ch, 0x180B, 0x180E); - case 0x20: return hb_in_ranges (ch, 0x200B, 0x200F, - 0x202A, 0x202E, - 0x2060, 0x206F); - case 0xFE: return hb_in_range (ch, 0xFE00, 0xFE0F) || ch == 0xFEFF; - case 0xFF: return hb_in_range (ch, 0xFFF0, 0xFFF8); + case 0x00: return unlikely (ch == 0x00ADu); + case 0x03: return unlikely (ch == 0x034Fu); + case 0x06: return unlikely (ch == 0x061Cu); + case 0x17: return hb_in_range (ch, 0x17B4u, 0x17B5u); + case 0x18: return hb_in_range (ch, 0x180Bu, 0x180Eu); + case 0x20: return hb_in_ranges (ch, 0x200Bu, 0x200Fu, + 0x202Au, 0x202Eu, + 0x2060u, 0x206Fu); + case 0xFE: return hb_in_range (ch, 0xFE00u, 0xFE0Fu) || ch == 0xFEFFu; + case 0xFF: return hb_in_range (ch, 0xFFF0u, 0xFFF8u); default: return false; } } @@ -193,8 +191,9 @@ HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS_SIMPLE { /* Other planes */ switch (plane) { - case 0x01: return hb_in_range (ch, 0x0001D173, 0x0001D17A); - case 0x0E: return hb_in_range (ch, 0x000E0000, 0x000E0FFF); + case 0x01: return hb_in_ranges (ch, 0x1BCA0u, 0x1BCA3u, + 0x1D173u, 0x1D17Au); + case 0x0E: return hb_in_range (ch, 0xE0000u, 0xE0FFFu); default: return false; } } diff --git a/src/3rdparty/harfbuzz-ng/src/hb-unicode.cc b/src/3rdparty/harfbuzz-ng/src/hb-unicode.cc index 5b44913bd3..84e5c06fd3 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-unicode.cc +++ b/src/3rdparty/harfbuzz-ng/src/hb-unicode.cc @@ -133,7 +133,7 @@ hb_unicode_funcs_get_default (void) #ifdef HAVE_GLIB HB_UNICODE_FUNCS_IMPLEMENT(glib) -#elif 0 && defined(HAVE_ICU) +#elif defined(HAVE_ICU) && defined(HAVE_ICU_BUILTIN) HB_UNICODE_FUNCS_IMPLEMENT(icu) #elif defined(HAVE_UCDN) HB_UNICODE_FUNCS_IMPLEMENT(ucdn) @@ -146,8 +146,13 @@ hb_unicode_funcs_get_default (void) } #if !defined(HB_NO_UNICODE_FUNCS) && defined(HB_UNICODE_FUNCS_NIL) -#pragma message("Could not find any Unicode functions implementation, you have to provide your own.") -#pragma message("To suppress this warnings, define HB_NO_UNICODE_FUNCS.") +#ifdef _MSC_VER +#pragma message("Could not find any Unicode functions implementation, you have to provide your own") +#pragma message("To suppress this warnings, define HB_NO_UNICODE_FUNCS") +#else +#warning "Could not find any Unicode functions implementation, you have to provide your own" +#warning "To suppress this warning, define HB_NO_UNICODE_FUNCS" +#endif #endif /** diff --git a/src/3rdparty/harfbuzz-ng/src/hb-utf-private.hh b/src/3rdparty/harfbuzz-ng/src/hb-utf-private.hh index b9a6519d28..0b798a05c3 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-utf-private.hh +++ b/src/3rdparty/harfbuzz-ng/src/hb-utf-private.hh @@ -1,5 +1,5 @@ /* - * Copyright © 2011,2012 Google, Inc. + * Copyright © 2011,2012,2014 Google, Inc. * * This is part of HarfBuzz, a text shaping library. * @@ -29,176 +29,221 @@ #include "hb-private.hh" +template struct hb_utf_t; + /* UTF-8 */ -#define HB_UTF8_COMPUTE(Char, Mask, Len) \ - if (Char < 128) { Len = 1; Mask = 0x7f; } \ - else if ((Char & 0xe0) == 0xc0) { Len = 2; Mask = 0x1f; } \ - else if ((Char & 0xf0) == 0xe0) { Len = 3; Mask = 0x0f; } \ - else if ((Char & 0xf8) == 0xf0) { Len = 4; Mask = 0x07; } \ - else Len = 0; - -static inline const uint8_t * -hb_utf_next (const uint8_t *text, - const uint8_t *end, - hb_codepoint_t *unicode) +template <> +struct hb_utf_t { - hb_codepoint_t c = *text, mask; - unsigned int len; - - /* TODO check for overlong sequences? */ - - HB_UTF8_COMPUTE (c, mask, len); - if (unlikely (!len || (unsigned int) (end - text) < len)) { - *unicode = -1; - return text + 1; - } else { - hb_codepoint_t result; - unsigned int i; - result = c & mask; - for (i = 1; i < len; i++) + static inline const uint8_t * + next (const uint8_t *text, + const uint8_t *end, + hb_codepoint_t *unicode, + hb_codepoint_t replacement) + { + /* Written to only accept well-formed sequences. + * Based on ideas from ICU's U8_NEXT. + * Generates one "replacement" for each ill-formed byte. */ + + hb_codepoint_t c = *text++; + + if (c > 0x7Fu) + { + if (hb_in_range (c, 0xC2u, 0xDFu)) /* Two-byte */ { - if (unlikely ((text[i] & 0xc0) != 0x80)) - { - *unicode = -1; - return text + 1; - } - result <<= 6; - result |= (text[i] & 0x3f); + unsigned int t1; + if (likely (text < end && + (t1 = text[0] - 0x80u) <= 0x3Fu)) + { + c = ((c&0x1Fu)<<6) | t1; + text++; + } + else + goto error; } - *unicode = result; - return text + len; - } -} + else if (hb_in_range (c, 0xE0u, 0xEFu)) /* Three-byte */ + { + unsigned int t1, t2; + if (likely (1 < end - text && + (t1 = text[0] - 0x80u) <= 0x3Fu && + (t2 = text[1] - 0x80u) <= 0x3Fu)) + { + c = ((c&0xFu)<<12) | (t1<<6) | t2; + if (unlikely (c < 0x0800u || hb_in_range (c, 0xD800u, 0xDFFFu))) + goto error; + text += 2; + } + else + goto error; + } + else if (hb_in_range (c, 0xF0u, 0xF4u)) /* Four-byte */ + { + unsigned int t1, t2, t3; + if (likely (2 < end - text && + (t1 = text[0] - 0x80u) <= 0x3Fu && + (t2 = text[1] - 0x80u) <= 0x3Fu && + (t3 = text[2] - 0x80u) <= 0x3Fu)) + { + c = ((c&0x7u)<<18) | (t1<<12) | (t2<<6) | t3; + if (unlikely (!hb_in_range (c, 0x10000u, 0x10FFFFu))) + goto error; + text += 3; + } + else + goto error; + } + else + goto error; + } -static inline const uint8_t * -hb_utf_prev (const uint8_t *text, - const uint8_t *start, - hb_codepoint_t *unicode) -{ - const uint8_t *end = text--; - while (start < text && (*text & 0xc0) == 0x80 && end - text < 4) - text--; + *unicode = c; + return text; + + error: + *unicode = replacement; + return text; + } - hb_codepoint_t c = *text, mask; - unsigned int len; + static inline const uint8_t * + prev (const uint8_t *text, + const uint8_t *start, + hb_codepoint_t *unicode, + hb_codepoint_t replacement) + { + const uint8_t *end = text--; + while (start < text && (*text & 0xc0) == 0x80 && end - text < 4) + text--; - /* TODO check for overlong sequences? */ + if (likely (next (text, end, unicode, replacement) == end)) + return text; - HB_UTF8_COMPUTE (c, mask, len); - if (unlikely (!len || (unsigned int) (end - text) != len)) { - *unicode = -1; + *unicode = replacement; return end - 1; - } else { - hb_codepoint_t result; - unsigned int i; - result = c & mask; - for (i = 1; i < len; i++) - { - result <<= 6; - result |= (text[i] & 0x3f); - } - *unicode = result; - return text; } -} - -static inline unsigned int -hb_utf_strlen (const uint8_t *text) -{ - return strlen ((const char *) text); -} + static inline unsigned int + strlen (const uint8_t *text) + { + return ::strlen ((const char *) text); + } +}; /* UTF-16 */ -static inline const uint16_t * -hb_utf_next (const uint16_t *text, - const uint16_t *end, - hb_codepoint_t *unicode) +template <> +struct hb_utf_t { - hb_codepoint_t c = *text++; - - if (unlikely (hb_in_range (c, 0xd800, 0xdbff))) + static inline const uint16_t * + next (const uint16_t *text, + const uint16_t *end, + hb_codepoint_t *unicode, + hb_codepoint_t replacement) { - /* high surrogate */ - hb_codepoint_t l; - if (text < end && ((l = *text), likely (hb_in_range (l, 0xdc00, 0xdfff)))) + hb_codepoint_t c = *text++; + + if (likely (!hb_in_range (c, 0xD800u, 0xDFFFu))) { - /* low surrogate */ - *unicode = (c << 10) + l - ((0xd800 << 10) - 0x10000 + 0xdc00); - text++; - } else - *unicode = -1; - } else - *unicode = c; + *unicode = c; + return text; + } - return text; -} + if (likely (hb_in_range (c, 0xD800u, 0xDBFFu))) + { + /* High-surrogate in c */ + hb_codepoint_t l; + if (text < end && ((l = *text), likely (hb_in_range (l, 0xDC00u, 0xDFFFu)))) + { + /* Low-surrogate in l */ + *unicode = (c << 10) + l - ((0xD800u << 10) - 0x10000u + 0xDC00u); + text++; + return text; + } + } -static inline const uint16_t * -hb_utf_prev (const uint16_t *text, - const uint16_t *start, - hb_codepoint_t *unicode) -{ - hb_codepoint_t c = *--text; + /* Lonely / out-of-order surrogate. */ + *unicode = replacement; + return text; + } - if (unlikely (hb_in_range (c, 0xdc00, 0xdfff))) + static inline const uint16_t * + prev (const uint16_t *text, + const uint16_t *start, + hb_codepoint_t *unicode, + hb_codepoint_t replacement) { - /* low surrogate */ - hb_codepoint_t h; - if (start < text && ((h = *(text - 1)), likely (hb_in_range (h, 0xd800, 0xdbff)))) + const uint16_t *end = text--; + hb_codepoint_t c = *text; + + if (likely (!hb_in_range (c, 0xD800u, 0xDFFFu))) { - /* high surrogate */ - *unicode = (h << 10) + c - ((0xd800 << 10) - 0x10000 + 0xdc00); - text--; - } else - *unicode = -1; - } else - *unicode = c; + *unicode = c; + return text; + } - return text; -} + if (likely (start < text && hb_in_range (c, 0xDC00u, 0xDFFFu))) + text--; + if (likely (next (text, end, unicode, replacement) == end)) + return text; -static inline unsigned int -hb_utf_strlen (const uint16_t *text) -{ - unsigned int l = 0; - while (*text++) l++; - return l; -} + *unicode = replacement; + return end - 1; + } + + + static inline unsigned int + strlen (const uint16_t *text) + { + unsigned int l = 0; + while (*text++) l++; + return l; + } +}; /* UTF-32 */ -static inline const uint32_t * -hb_utf_next (const uint32_t *text, - const uint32_t *end HB_UNUSED, - hb_codepoint_t *unicode) +template +struct hb_utf_t { - *unicode = *text++; - return text; -} - -static inline const uint32_t * -hb_utf_prev (const uint32_t *text, - const uint32_t *start HB_UNUSED, - hb_codepoint_t *unicode) -{ - *unicode = *--text; - return text; -} + static inline const uint32_t * + next (const uint32_t *text, + const uint32_t *end HB_UNUSED, + hb_codepoint_t *unicode, + hb_codepoint_t replacement) + { + hb_codepoint_t c = *text++; + if (validate && unlikely (c > 0x10FFFFu || hb_in_range (c, 0xD800u, 0xDFFFu))) + goto error; + *unicode = c; + return text; -static inline unsigned int -hb_utf_strlen (const uint32_t *text) -{ - unsigned int l = 0; - while (*text++) l++; - return l; -} + error: + *unicode = replacement; + return text; + } + + static inline const uint32_t * + prev (const uint32_t *text, + const uint32_t *start HB_UNUSED, + hb_codepoint_t *unicode, + hb_codepoint_t replacement) + { + next (text - 1, text, unicode, replacement); + return text - 1; + } + + static inline unsigned int + strlen (const uint32_t *text) + { + unsigned int l = 0; + while (*text++) l++; + return l; + } +}; #endif /* HB_UTF_PRIVATE_HH */ diff --git a/src/3rdparty/harfbuzz-ng/src/hb-version.h b/src/3rdparty/harfbuzz-ng/src/hb-version.h index 790e0ecbae..517cc8f26e 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-version.h +++ b/src/3rdparty/harfbuzz-ng/src/hb-version.h @@ -38,12 +38,12 @@ HB_BEGIN_DECLS #define HB_VERSION_MAJOR 0 #define HB_VERSION_MINOR 9 -#define HB_VERSION_MICRO 25 +#define HB_VERSION_MICRO 32 -#define HB_VERSION_STRING "0.9.25" +#define HB_VERSION_STRING "0.9.32" -#define HB_VERSION_CHECK(major,minor,micro) \ - ((major)*10000+(minor)*100+(micro) >= \ +#define HB_VERSION_ATLEAST(major,minor,micro) \ + ((major)*10000+(minor)*100+(micro) <= \ HB_VERSION_MAJOR*10000+HB_VERSION_MINOR*100+HB_VERSION_MICRO) @@ -56,9 +56,9 @@ const char * hb_version_string (void); hb_bool_t -hb_version_check (unsigned int major, - unsigned int minor, - unsigned int micro); +hb_version_atleast (unsigned int major, + unsigned int minor, + unsigned int micro); HB_END_DECLS diff --git a/src/3rdparty/harfbuzz-ng/src/hb-warning.cc b/src/3rdparty/harfbuzz-ng/src/hb-warning.cc index 4f1f65f5a2..e0f88e2d4a 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-warning.cc +++ b/src/3rdparty/harfbuzz-ng/src/hb-warning.cc @@ -53,14 +53,3 @@ #endif -#include "hb-unicode-private.hh" - -#if !defined(HB_NO_UNICODE_FUNCS) && defined(HB_UNICODE_FUNCS_NIL) -#ifdef _MSC_VER -#pragma message("Could not find any Unicode functions implementation, you have to provide your own") -#pragma message("To suppress this warnings, define HB_NO_UNICODE_FUNCS") -#else -#warning "Could not find any Unicode functions implementation, you have to provide your own" -#warning "To suppress this warning, define HB_NO_UNICODE_FUNCS" -#endif -#endif -- cgit v1.2.3