summaryrefslogtreecommitdiff
path: root/Build/source/libs/harfbuzz/harfbuzz-src/src
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2017-07-18 21:30:24 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2017-07-18 21:30:24 +0000
commit1259233aec698e07b7aedb390f151aec2f552a22 (patch)
treea2786914cdcbc0c3406ac8904add1cec02ae4e2e /Build/source/libs/harfbuzz/harfbuzz-src/src
parent82ea6625f41c38023b6d4fe3e712492b5ac53073 (diff)
harfbuzz-1.4.7
git-svn-id: svn://tug.org/texlive/trunk@44840 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/harfbuzz/harfbuzz-src/src')
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.am4
-rwxr-xr-xBuild/source/libs/harfbuzz/harfbuzz-src/src/gen-arabic-table.py2
-rwxr-xr-xBuild/source/libs/harfbuzz/harfbuzz-src/src/gen-indic-table.py2
-rwxr-xr-xBuild/source/libs/harfbuzz/harfbuzz-src/src/gen-use-table.py8
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-atomic-private.hh8
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer.cc4
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-common.cc48
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-coretext.cc41
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-font.cc2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsubgpos-private.hh47
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-private.hh13
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout.cc3
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-map-private.hh10
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-map.cc8
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic-table.hh14
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic.cc9
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-hangul.cc16
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic-private.hh2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic-table.cc22
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic.cc25
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-myanmar.cc2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-thai.cc12
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-machine.hh284
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-machine.rl3
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-table.cc46
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-private.hh11
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-unicode-private.hh25
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-utf-private.hh18
28 files changed, 395 insertions, 294 deletions
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.am b/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.am
index 958972a1445..0c077d99013 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.am
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.am
@@ -151,7 +151,7 @@ CLEANFILES += libharfbuzz-fuzzing.la
if HAVE_ICU
if HAVE_ICU_BUILTIN
HBCFLAGS += $(ICU_CFLAGS)
-HBLIBS += $(ICU_LIBS) $(ICU_LIBS_EXTRA)
+HBLIBS += $(ICU_LIBS)
HBSOURCES += $(HB_ICU_sources)
HBHEADERS += $(HB_ICU_headers)
else
@@ -159,7 +159,7 @@ lib_LTLIBRARIES += libharfbuzz-icu.la
libharfbuzz_icu_la_SOURCES = $(HB_ICU_sources)
libharfbuzz_icu_la_CPPFLAGS = $(ICU_CFLAGS)
libharfbuzz_icu_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(HB_LIBTOOL_VERSION_INFO) -no-undefined
-libharfbuzz_icu_la_LIBADD = $(ICU_LIBS) $(ICU_LIBS_EXTRA) libharfbuzz.la
+libharfbuzz_icu_la_LIBADD = $(ICU_LIBS) libharfbuzz.la
pkginclude_HEADERS += $(HB_ICU_headers)
pkgconfig_DATA += harfbuzz-icu.pc
endif
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-arabic-table.py b/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-arabic-table.py
index 308435f991e..59bd7601296 100755
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-arabic-table.py
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-arabic-table.py
@@ -134,7 +134,7 @@ def print_joining_table(f):
for (start,end) in ranges:
if p not in [start>>page_bits, end>>page_bits]: continue
offset = "joining_offset_0x%04xu" % start
- print " if (hb_in_range (u, 0x%04Xu, 0x%04Xu)) return joining_table[u - 0x%04Xu + %s];" % (start, end, start, offset)
+ print " if (hb_in_range<hb_codepoint_t> (u, 0x%04Xu, 0x%04Xu)) return joining_table[u - 0x%04Xu + %s];" % (start, end, start, offset)
print " break;"
print ""
print " default:"
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-indic-table.py b/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-indic-table.py
index 3016cd07b68..a849db18e26 100755
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-indic-table.py
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-indic-table.py
@@ -232,7 +232,7 @@ for p in sorted(pages):
for (start,end) in zip (starts, ends):
if p not in [start>>page_bits, end>>page_bits]: continue
offset = "indic_offset_0x%04xu" % start
- print " if (hb_in_range (u, 0x%04Xu, 0x%04Xu)) return indic_table[u - 0x%04Xu + %s];" % (start, end-1, start, offset)
+ print " if (hb_in_range<hb_codepoint_t> (u, 0x%04Xu, 0x%04Xu)) return indic_table[u - 0x%04Xu + %s];" % (start, end-1, start, offset)
for u,d in singles.items ():
if p != u>>page_bits: continue
print " if (unlikely (u == 0x%04Xu)) return _(%s,%s);" % (u, short[0][d[0]], short[1][d[1]])
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-use-table.py b/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-use-table.py
index a922c92faeb..fcb66a58022 100755
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-use-table.py
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-use-table.py
@@ -210,11 +210,13 @@ def is_SYM_MOD(U, UISC, UGC):
def is_VARIATION_SELECTOR(U, UISC, UGC):
return 0xFE00 <= U <= 0xFE0F
def is_VOWEL(U, UISC, UGC):
+ # https://github.com/roozbehp/unicode-data/issues/6
return (UISC == Pure_Killer or
- (UGC != Lo and UISC in [Vowel, Vowel_Dependent]))
+ (UGC != Lo and UISC in [Vowel, Vowel_Dependent] and U not in [0xAA29]))
def is_VOWEL_MOD(U, UISC, UGC):
+ # https://github.com/roozbehp/unicode-data/issues/6
return (UISC in [Tone_Mark, Cantillation_Mark, Register_Shifter, Visarga] or
- (UGC != Lo and UISC == Bindu))
+ (UGC != Lo and (UISC == Bindu or U in [0xAA29])))
use_mapping = {
'B': is_BASE,
@@ -449,7 +451,7 @@ for p in sorted(pages):
for (start,end) in zip (starts, ends):
if p not in [start>>page_bits, end>>page_bits]: continue
offset = "use_offset_0x%04xu" % start
- print " if (hb_in_range (u, 0x%04Xu, 0x%04Xu)) return use_table[u - 0x%04Xu + %s];" % (start, end-1, start, offset)
+ print " if (hb_in_range<hb_codepoint_t> (u, 0x%04Xu, 0x%04Xu)) return use_table[u - 0x%04Xu + %s];" % (start, end-1, start, offset)
for u,d in singles.items ():
if p != u>>page_bits: continue
print " if (unlikely (u == 0x%04Xu)) return %s;" % (u, d[0])
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-atomic-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-atomic-private.hh
index 100ba539e3a..2d5675792de 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-atomic-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-atomic-private.hh
@@ -124,13 +124,13 @@ typedef unsigned int hb_atomic_int_impl_t;
#include <builtins.h>
-static inline int hb_fetch_and_add(volatile int* AI, unsigned int V) {
+static inline int _hb_fetch_and_add(volatile int* AI, unsigned int V) {
__lwsync();
int result = __fetch_and_add(AI, V);
__isync();
return result;
}
-static inline int hb_compare_and_swaplp(volatile long* P, long O, long N) {
+static inline int _hb_compare_and_swaplp(volatile long* P, long O, long N) {
__sync();
int result = __compare_and_swaplp (P, &O, N);
__sync();
@@ -139,10 +139,10 @@ static inline int hb_compare_and_swaplp(volatile long* P, long O, long N) {
typedef int hb_atomic_int_impl_t;
#define HB_ATOMIC_INT_IMPL_INIT(V) (V)
-#define hb_atomic_int_impl_add(AI, V) hb_fetch_and_add (&(AI), (V))
+#define hb_atomic_int_impl_add(AI, V) _hb_fetch_and_add (&(AI), (V))
#define hb_atomic_ptr_impl_get(P) (__sync(), (void *) *(P))
-#define hb_atomic_ptr_impl_cmpexch(P,O,N) hb_compare_and_swaplp ((long*)(P), (long)(O), (long)(N))
+#define hb_atomic_ptr_impl_cmpexch(P,O,N) _hb_compare_and_swaplp ((long*)(P), (long)(O), (long)(N))
#elif !defined(HB_NO_MT)
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer.cc
index 3940a3dbf8e..3777f7f8f3e 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer.cc
@@ -552,7 +552,7 @@ hb_buffer_t::merge_clusters_impl (unsigned int start,
if (cluster_level == HB_BUFFER_CLUSTER_LEVEL_CHARACTERS)
return;
- unsigned int cluster = info[start].cluster;
+ uint32_t cluster = info[start].cluster;
for (unsigned int i = start + 1; i < end; i++)
cluster = MIN (cluster, info[i].cluster);
@@ -583,7 +583,7 @@ hb_buffer_t::merge_out_clusters (unsigned int start,
if (unlikely (end - start < 2))
return;
- unsigned int cluster = out_info[start].cluster;
+ uint32_t cluster = out_info[start].cluster;
for (unsigned int i = start + 1; i < end; i++)
cluster = MIN (cluster, out_info[i].cluster);
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-common.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-common.cc
index 39006237a0c..0483816d37b 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-common.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-common.cc
@@ -221,9 +221,18 @@ struct hb_language_item_t {
}
inline hb_language_item_t & operator = (const char *s) {
- lang = (hb_language_t) strdup (s);
- for (unsigned char *p = (unsigned char *) lang; *p; p++)
- *p = canon_map[*p];
+ /* If a custom allocated is used calling strdup() pairs
+ badly with a call to the custom free() in finish() below.
+ Therefore don't call strdup(), implement its behavior.
+ */
+ size_t len = strlen(s) + 1;
+ lang = (hb_language_t) malloc(len);
+ if (likely (lang))
+ {
+ memcpy((unsigned char *) lang, s, len);
+ for (unsigned char *p = (unsigned char *) lang; *p; p++)
+ *p = canon_map[*p];
+ }
return *this;
}
@@ -265,6 +274,11 @@ retry:
return NULL;
lang->next = first_lang;
*lang = key;
+ if (unlikely (!lang->lang))
+ {
+ free (lang);
+ return NULL;
+ }
if (!hb_atomic_ptr_cmpexch (&langs, first_lang, lang)) {
lang->finish ();
@@ -657,6 +671,30 @@ parse_uint (const char **pp, const char *end, unsigned int *pv)
}
static bool
+parse_uint32 (const char **pp, const char *end, uint32_t *pv)
+{
+ char buf[32];
+ unsigned int len = MIN (ARRAY_LENGTH (buf) - 1, (unsigned int) (end - *pp));
+ strncpy (buf, *pp, len);
+ buf[len] = '\0';
+
+ char *p = buf;
+ char *pend = p;
+ unsigned int v;
+
+ /* Intentionally use strtol instead of strtoul, such that
+ * -1 turns into "big number"... */
+ errno = 0;
+ v = strtol (p, &pend, 0);
+ if (errno || p == pend)
+ return false;
+
+ *pv = v;
+ *pp += pend - p;
+ return true;
+}
+
+static bool
parse_float (const char **pp, const char *end, float *pv)
{
char buf[32];
@@ -679,7 +717,7 @@ parse_float (const char **pp, const char *end, float *pv)
}
static bool
-parse_bool (const char **pp, const char *end, unsigned int *pv)
+parse_bool (const char **pp, const char *end, uint32_t *pv)
{
parse_space (pp, end);
@@ -778,7 +816,7 @@ static bool
parse_feature_value_postfix (const char **pp, const char *end, hb_feature_t *feature)
{
bool had_equal = parse_char (pp, end, '=');
- bool had_value = parse_uint (pp, end, &feature->value) ||
+ bool had_value = parse_uint32 (pp, end, &feature->value) ||
parse_bool (pp, end, &feature->value);
/* CSS doesn't use equal-sign between tag and value.
* If there was an equal-sign, then there *must* be a value.
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-coretext.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-coretext.cc
index 8f2483b0806..e237335e7d3 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-coretext.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-coretext.cc
@@ -641,22 +641,23 @@ _hb_coretext_shape (hb_shape_plan_t *shape_plan,
/* active_features.qsort (); */
for (unsigned int j = 0; j < active_features.len; j++)
{
- CFStringRef keys[2] = {
+ CFStringRef keys[] = {
kCTFontFeatureTypeIdentifierKey,
kCTFontFeatureSelectorIdentifierKey
};
- CFNumberRef values[2] = {
+ CFNumberRef values[] = {
CFNumberCreate (kCFAllocatorDefault, kCFNumberIntType, &active_features[j].rec.feature),
CFNumberCreate (kCFAllocatorDefault, kCFNumberIntType, &active_features[j].rec.setting)
};
+ ASSERT_STATIC (ARRAY_LENGTH (keys) == ARRAY_LENGTH (values));
CFDictionaryRef dict = CFDictionaryCreate (kCFAllocatorDefault,
(const void **) keys,
(const void **) values,
- 2,
+ ARRAY_LENGTH (keys),
&kCFTypeDictionaryKeyCallBacks,
&kCFTypeDictionaryValueCallBacks);
- CFRelease (values[0]);
- CFRelease (values[1]);
+ for (unsigned int i = 0; i < ARRAY_LENGTH (values); i++)
+ CFRelease (values[i]);
CFArrayAppendValue (features_array, dict);
CFRelease (dict);
@@ -699,9 +700,6 @@ _hb_coretext_shape (hb_shape_plan_t *shape_plan,
active_features.remove (feature - active_features.array);
}
}
-
- if (!range_records.len) /* No active feature found. */
- goto fail_features;
}
else
{
@@ -833,7 +831,7 @@ resize_and_retry:
CFAttributedStringSetAttribute (attr_string, CFRangeMake (0, chars_len),
kCTFontAttributeName, face_data->ct_font);
- if (num_features)
+ if (num_features && range_records.len)
{
unsigned int start = 0;
range_record_t *last_range = &range_records[0];
@@ -859,6 +857,30 @@ resize_and_retry:
CFAttributedStringSetAttribute (attr_string, CFRangeMake (start, chars_len - start),
kCTFontAttributeName, last_range->font);
}
+ /* Enable/disable kern if requested.
+ *
+ * Note: once kern is disabled, reenabling it doesn't currently seem to work in CoreText.
+ */
+ if (num_features)
+ {
+ unsigned int zeroint = 0;
+ CFNumberRef zero = CFNumberCreate (kCFAllocatorDefault, kCFNumberIntType, &zeroint);
+ for (unsigned int i = 0; i < num_features; i++)
+ {
+ const hb_feature_t &feature = features[i];
+ if (feature.tag == HB_TAG('k','e','r','n') &&
+ feature.start < chars_len && feature.start < feature.end)
+ {
+ CFRange feature_range = CFRangeMake (feature.start,
+ MIN (feature.end, chars_len) - feature.start);
+ if (feature.value)
+ CFAttributedStringRemoveAttribute (attr_string, feature_range, kCTKernAttributeName);
+ else
+ CFAttributedStringSetAttribute (attr_string, feature_range, kCTKernAttributeName, zero);
+ }
+ }
+ CFRelease (zero);
+ }
int level = HB_DIRECTION_IS_FORWARD (buffer->props.direction) ? 0 : 1;
CFNumberRef level_number = CFNumberCreate (kCFAllocatorDefault, kCFNumberIntType, &level);
@@ -868,6 +890,7 @@ resize_and_retry:
1,
&kCFTypeDictionaryKeyCallBacks,
&kCFTypeDictionaryValueCallBacks);
+ CFRelease (level_number);
if (unlikely (!options))
FAIL ("CFDictionaryCreate failed");
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-font.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-font.cc
index 009db20ae59..2ce29cdffbf 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-font.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-font.cc
@@ -138,7 +138,7 @@ struct hb_ot_face_metrics_accelerator_t
return this->default_advance;
}
- return this->table->longMetric[MIN (glyph, this->num_advances - 1)].advance
+ return this->table->longMetric[MIN (glyph, (uint32_t) this->num_advances - 1)].advance
+ this->var->get_advance_var (glyph, font->coords, font->num_coords); // TODO Optimize?!
}
};
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsubgpos-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsubgpos-private.hh
index 921859a6603..2235d3a0ad7 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsubgpos-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsubgpos-private.hh
@@ -319,7 +319,7 @@ struct hb_apply_context_t :
if (!c->check_glyph_property (&info, lookup_props))
return SKIP_YES;
- if (unlikely (_hb_glyph_info_is_default_ignorable_and_not_fvs (&info) &&
+ if (unlikely (_hb_glyph_info_is_default_ignorable_and_not_hidden (&info) &&
(ignore_zwnj || !_hb_glyph_info_is_zwnj (&info)) &&
(ignore_zwj || !_hb_glyph_info_is_zwj (&info))))
return SKIP_MAYBE;
@@ -346,9 +346,9 @@ struct hb_apply_context_t :
matcher.set_match_func (NULL, NULL);
matcher.set_lookup_props (c->lookup_props);
/* Ignore ZWNJ if we are matching GSUB context, or matching GPOS. */
- matcher.set_ignore_zwnj (context_match || c->table_index == 1);
+ matcher.set_ignore_zwnj (c->table_index == 1 || (context_match && c->auto_zwnj));
/* Ignore ZWJ if we are matching GSUB context, or matching GPOS, or if asked to. */
- matcher.set_ignore_zwj (context_match || c->table_index == 1 || c->auto_zwj);
+ matcher.set_ignore_zwj (c->table_index == 1 || (context_match || c->auto_zwj));
matcher.set_mask (context_match ? -1 : c->lookup_mask);
}
inline void set_lookup_props (unsigned int lookup_props)
@@ -457,45 +457,50 @@ struct hb_apply_context_t :
return ret;
}
- unsigned int table_index; /* GSUB/GPOS */
+ skipping_iterator_t iter_input, iter_context;
+
hb_font_t *font;
hb_face_t *face;
hb_buffer_t *buffer;
- hb_direction_t direction;
- hb_mask_t lookup_mask;
- bool auto_zwj;
recurse_func_t recurse_func;
- unsigned int nesting_level_left;
- unsigned int lookup_props;
const GDEF &gdef;
- bool has_glyph_classes;
const VariationStore &var_store;
- skipping_iterator_t iter_input, iter_context;
+
+ hb_direction_t direction;
+ hb_mask_t lookup_mask;
+ unsigned int table_index; /* GSUB/GPOS */
unsigned int lookup_index;
+ unsigned int lookup_props;
+ unsigned int nesting_level_left;
unsigned int debug_depth;
+ bool auto_zwnj;
+ bool auto_zwj;
+ bool has_glyph_classes;
+
hb_apply_context_t (unsigned int table_index_,
hb_font_t *font_,
hb_buffer_t *buffer_) :
- table_index (table_index_),
+ iter_input (), iter_context (),
font (font_), face (font->face), buffer (buffer_),
- direction (buffer_->props.direction),
- lookup_mask (1),
- auto_zwj (true),
recurse_func (NULL),
- nesting_level_left (HB_MAX_NESTING_LEVEL),
- lookup_props (0),
gdef (*hb_ot_layout_from_face (face)->gdef),
- has_glyph_classes (gdef.has_glyph_classes ()),
var_store (gdef.get_var_store ()),
- iter_input (),
- iter_context (),
+ direction (buffer_->props.direction),
+ lookup_mask (1),
+ table_index (table_index_),
lookup_index ((unsigned int) -1),
- debug_depth (0) {}
+ lookup_props (0),
+ nesting_level_left (HB_MAX_NESTING_LEVEL),
+ debug_depth (0),
+ auto_zwnj (true),
+ auto_zwj (true),
+ has_glyph_classes (gdef.has_glyph_classes ()) {}
inline void set_lookup_mask (hb_mask_t mask) { lookup_mask = mask; }
inline void set_auto_zwj (bool auto_zwj_) { auto_zwj = auto_zwj_; }
+ inline void set_auto_zwnj (bool auto_zwnj_) { auto_zwnj = auto_zwnj_; }
inline void set_recurse_func (recurse_func_t func) { recurse_func = func; }
inline void set_lookup_index (unsigned int lookup_index_) { lookup_index = lookup_index_; }
inline void set_lookup_props (unsigned int lookup_props_)
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-private.hh
index 071a439d60c..b476339e1c0 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-private.hh
@@ -240,7 +240,8 @@ _next_syllable (hb_buffer_t *buffer, unsigned int start)
enum hb_unicode_props_flags_t {
UPROPS_MASK_GEN_CAT = 0x001Fu,
UPROPS_MASK_IGNORABLE = 0x0020u,
- UPROPS_MASK_FVS = 0x0040u, /* MONGOLIAN FREE VARIATION SELECTOR 1..3 */
+ UPROPS_MASK_HIDDEN = 0x0040u, /* MONGOLIAN FREE VARIATION SELECTOR 1..3,
+ * or TAG characters */
/* If GEN_CAT=FORMAT, top byte masks: */
UPROPS_MASK_Cf_ZWJ = 0x0100u,
@@ -273,7 +274,11 @@ _hb_glyph_info_set_unicode_props (hb_glyph_info_t *info, hb_buffer_t *buffer)
* Fixes:
* https://github.com/behdad/harfbuzz/issues/234
*/
- if (unlikely (hb_in_range (u, 0x180Bu, 0x180Du))) props |= UPROPS_MASK_FVS;
+ if (unlikely (hb_in_range (u, 0x180Bu, 0x180Du))) props |= UPROPS_MASK_HIDDEN;
+ /* TAG characters need similar treatment. Fixes:
+ * https://github.com/behdad/harfbuzz/issues/463
+ */
+ if (unlikely (hb_in_range (u, 0xE0020u, 0xE007Fu))) props |= UPROPS_MASK_HIDDEN;
}
else if (unlikely (HB_UNICODE_GENERAL_CATEGORY_IS_NON_ENCLOSING_MARK_OR_MODIFIER_SYMBOL (gen_cat)))
{
@@ -373,9 +378,9 @@ _hb_glyph_info_is_default_ignorable (const hb_glyph_info_t *info)
!_hb_glyph_info_ligated (info);
}
static inline hb_bool_t
-_hb_glyph_info_is_default_ignorable_and_not_fvs (const hb_glyph_info_t *info)
+_hb_glyph_info_is_default_ignorable_and_not_hidden (const hb_glyph_info_t *info)
{
- return ((info->unicode_props() & (UPROPS_MASK_IGNORABLE|UPROPS_MASK_FVS))
+ return ((info->unicode_props() & (UPROPS_MASK_IGNORABLE|UPROPS_MASK_HIDDEN))
== UPROPS_MASK_IGNORABLE) &&
!_hb_glyph_info_ligated (info);
}
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout.cc
index 7f4e0184427..977e5830150 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout.cc
@@ -279,7 +279,7 @@ hb_ot_layout_get_ligature_carets (hb_font_t *font,
hb_codepoint_t glyph,
unsigned int start_offset,
unsigned int *caret_count /* IN/OUT */,
- int *caret_array /* OUT */)
+ hb_position_t *caret_array /* OUT */)
{
return _get_gdef (font->face).get_lig_carets (font, direction, glyph, start_offset, caret_count, caret_array);
}
@@ -1219,6 +1219,7 @@ inline void hb_ot_map_t::apply (const Proxy &proxy,
c.set_lookup_index (lookup_index);
c.set_lookup_mask (lookups[table_index][i].mask);
c.set_auto_zwj (lookups[table_index][i].auto_zwj);
+ c.set_auto_zwnj (lookups[table_index][i].auto_zwnj);
apply_string<Proxy> (&c,
proxy.table.get_lookup (lookup_index),
proxy.accels[lookup_index]);
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-map-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-map-private.hh
index b69e5344c14..6f774dde02f 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-map-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-map-private.hh
@@ -50,6 +50,7 @@ struct hb_ot_map_t
hb_mask_t mask;
hb_mask_t _1_mask; /* mask for value=1, for quick access */
unsigned int needs_fallback : 1;
+ unsigned int auto_zwnj : 1;
unsigned int auto_zwj : 1;
static int cmp (const feature_map_t *a, const feature_map_t *b)
@@ -58,6 +59,7 @@ struct hb_ot_map_t
struct lookup_map_t {
unsigned short index;
+ unsigned short auto_zwnj : 1;
unsigned short auto_zwj : 1;
hb_mask_t mask;
@@ -150,8 +152,9 @@ enum hb_ot_map_feature_flags_t {
F_NONE = 0x0000u,
F_GLOBAL = 0x0001u, /* Feature applies to all characters; results in no mask allocated for it. */
F_HAS_FALLBACK = 0x0002u, /* Has fallback implementation, so include mask bit even if feature not found. */
- F_MANUAL_ZWJ = 0x0004u, /* Don't skip over ZWJ when matching. */
- F_GLOBAL_SEARCH = 0x0008u /* If feature not found in LangSys, look for it in global feature list and pick one. */
+ F_MANUAL_ZWNJ = 0x0004u, /* Don't skip over ZWNJ when matching **context**. */
+ F_MANUAL_ZWJ = 0x0008u, /* Don't skip over ZWJ when matching **input**. */
+ F_GLOBAL_SEARCH = 0x0010u /* If feature not found in LangSys, look for it in global feature list and pick one. */
};
HB_MARK_AS_FLAG_T (hb_ot_map_feature_flags_t);
/* Macro version for where const is desired. */
@@ -196,7 +199,8 @@ struct hb_ot_map_builder_t
unsigned int feature_index,
unsigned int variations_index,
hb_mask_t mask,
- bool auto_zwj);
+ bool auto_zwnj = true,
+ bool auto_zwj = true);
struct feature_info_t {
hb_tag_t tag;
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-map.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-map.cc
index 9b331d5210f..014e4430a6c 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-map.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-map.cc
@@ -85,6 +85,7 @@ hb_ot_map_builder_t::add_lookups (hb_ot_map_t &m,
unsigned int feature_index,
unsigned int variations_index,
hb_mask_t mask,
+ bool auto_zwnj,
bool auto_zwj)
{
unsigned int lookup_indices[32];
@@ -112,6 +113,7 @@ hb_ot_map_builder_t::add_lookups (hb_ot_map_t &m,
return;
lookup->mask = mask;
lookup->index = lookup_indices[i];
+ lookup->auto_zwnj = auto_zwnj;
lookup->auto_zwj = auto_zwj;
}
@@ -243,6 +245,7 @@ hb_ot_map_builder_t::compile (hb_ot_map_t &m,
map->index[1] = feature_index[1];
map->stage[0] = info->stage[0];
map->stage[1] = info->stage[1];
+ map->auto_zwnj = !(info->flags & F_MANUAL_ZWNJ);
map->auto_zwj = !(info->flags & F_MANUAL_ZWJ);
if ((info->flags & F_GLOBAL) && info->max_value == 1) {
/* Uses the global bit */
@@ -284,8 +287,7 @@ hb_ot_map_builder_t::compile (hb_ot_map_t &m,
add_lookups (m, face, table_index,
required_feature_index[table_index],
variations_index,
- 1 /* mask */,
- true /* auto_zwj */);
+ 1 /* mask */);
for (unsigned i = 0; i < m.features.len; i++)
if (m.features[i].stage[table_index] == stage)
@@ -293,6 +295,7 @@ hb_ot_map_builder_t::compile (hb_ot_map_t &m,
m.features[i].index[table_index],
variations_index,
m.features[i].mask,
+ m.features[i].auto_zwnj,
m.features[i].auto_zwj);
/* Sort lookups and merge duplicates */
@@ -307,6 +310,7 @@ hb_ot_map_builder_t::compile (hb_ot_map_t &m,
else
{
m.lookups[table_index][j].mask |= m.lookups[table_index][i].mask;
+ m.lookups[table_index][j].auto_zwnj &= m.lookups[table_index][i].auto_zwnj;
m.lookups[table_index][j].auto_zwj &= m.lookups[table_index][i].auto_zwj;
}
m.lookups[table_index].shrink (j + 1);
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic-table.hh
index 736c7f76b36..228f3665901 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic-table.hh
@@ -139,28 +139,28 @@ joining_type (hb_codepoint_t u)
switch (u >> 12)
{
case 0x0u:
- if (hb_in_range (u, 0x0600u, 0x08E2u)) return joining_table[u - 0x0600u + joining_offset_0x0600u];
+ if (hb_in_range<hb_codepoint_t> (u, 0x0600u, 0x08E2u)) 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];
+ if (hb_in_range<hb_codepoint_t> (u, 0x1806u, 0x18AAu)) return joining_table[u - 0x1806u + joining_offset_0x1806u];
break;
case 0x2u:
- if (hb_in_range (u, 0x200Cu, 0x2069u)) return joining_table[u - 0x200Cu + joining_offset_0x200cu];
+ if (hb_in_range<hb_codepoint_t> (u, 0x200Cu, 0x2069u)) return joining_table[u - 0x200Cu + joining_offset_0x200cu];
break;
case 0xAu:
- if (hb_in_range (u, 0xA840u, 0xA873u)) return joining_table[u - 0xA840u + joining_offset_0xa840u];
+ if (hb_in_range<hb_codepoint_t> (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];
+ if (hb_in_range<hb_codepoint_t> (u, 0x10AC0u, 0x10AEFu)) return joining_table[u - 0x10AC0u + joining_offset_0x10ac0u];
+ if (hb_in_range<hb_codepoint_t> (u, 0x10B80u, 0x10BAFu)) return joining_table[u - 0x10B80u + joining_offset_0x10b80u];
break;
case 0x1Eu:
- if (hb_in_range (u, 0x1E900u, 0x1E943u)) return joining_table[u - 0x1E900u + joining_offset_0x1e900u];
+ if (hb_in_range<hb_codepoint_t> (u, 0x1E900u, 0x1E943u)) return joining_table[u - 0x1E900u + joining_offset_0x1e900u];
break;
default:
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic.cc
index 57ffc1dc5fe..5dbbcd9af99 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic.cc
@@ -199,6 +199,9 @@ collect_features_arabic (hb_ot_shape_planner_t *plan)
* 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.
+ *
+ * A pause after calt is required to make KFGQPC Uthmanic Script HAFS
+ * work correctly. See https://github.com/behdad/harfbuzz/issues/505
*/
map->add_gsub_pause (nuke_joiners);
@@ -222,7 +225,10 @@ collect_features_arabic (hb_ot_shape_planner_t *plan)
if (plan->props.script == HB_SCRIPT_ARABIC)
map->add_gsub_pause (arabic_fallback_shape);
+ /* No pause after rclt. See 98460779bae19e4d64d29461ff154b3527bf8420. */
+ map->add_global_bool_feature (HB_TAG('r','c','l','t'));
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
@@ -232,7 +238,6 @@ collect_features_arabic (hb_ot_shape_planner_t *plan)
* Note that IranNastaliq uses this feature extensively
* to fixup broken glyph sequences. Oh well...
* Test case: U+0643,U+0640,U+0631. */
- //map->add_gsub_pause (NULL);
//map->add_global_bool_feature (HB_TAG('c','s','w','h'));
map->add_global_bool_feature (HB_TAG('m','s','e','t'));
}
@@ -345,7 +350,7 @@ mongolian_variation_selectors (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 (unlikely (hb_in_range (info[i].codepoint, 0x180Bu, 0x180Du)))
+ if (unlikely (hb_in_range<hb_codepoint_t> (info[i].codepoint, 0x180Bu, 0x180Du)))
info[i].arabic_shaping_action() = info[i - 1].arabic_shaping_action();
}
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-hangul.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-hangul.cc
index af50565225b..23e07e59f39 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-hangul.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-hangul.cc
@@ -105,16 +105,16 @@ data_destroy_hangul (void *data)
#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<hb_codepoint_t> ((u), LBase, LBase+LCount-1))
+#define isCombiningV(u) (hb_in_range<hb_codepoint_t> ((u), VBase, VBase+VCount-1))
+#define isCombiningT(u) (hb_in_range<hb_codepoint_t> ((u), TBase+1, TBase+TCount-1))
+#define isCombinedS(u) (hb_in_range<hb_codepoint_t> ((u), SBase, SBase+SCount-1))
-#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 isL(u) (hb_in_ranges<hb_codepoint_t> ((u), 0x1100u, 0x115Fu, 0xA960u, 0xA97Cu))
+#define isV(u) (hb_in_ranges<hb_codepoint_t> ((u), 0x1160u, 0x11A7u, 0xD7B0u, 0xD7C6u))
+#define isT(u) (hb_in_ranges<hb_codepoint_t> ((u), 0x11A8u, 0x11FFu, 0xD7CBu, 0xD7FBu))
-#define isHangulTone(u) (hb_in_range ((u), 0x302Eu, 0x302Fu))
+#define isHangulTone(u) (hb_in_range<hb_codepoint_t> ((u), 0x302Eu, 0x302Fu))
/* buffer var allocations */
#define hangul_shaping_feature() complex_var_u8_0() /* hangul jamo shaping feature */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic-private.hh
index 5879c3e4914..58be4222465 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic-private.hh
@@ -132,7 +132,7 @@ enum indic_syllabic_category_t {
INDIC_SYLLABIC_CATEGORY_NUMBER_JOINER = OT_PLACEHOLDER, /* Don't care. */
INDIC_SYLLABIC_CATEGORY_PURE_KILLER = OT_M, /* Is like a vowel matra. */
INDIC_SYLLABIC_CATEGORY_REGISTER_SHIFTER = OT_RS,
- INDIC_SYLLABIC_CATEGORY_SYLLABLE_MODIFIER = OT_M, /* Misc Khmer signs. */
+ INDIC_SYLLABIC_CATEGORY_SYLLABLE_MODIFIER = OT_SM,
INDIC_SYLLABIC_CATEGORY_TONE_LETTER = OT_X,
INDIC_SYLLABIC_CATEGORY_TONE_MARK = OT_N,
INDIC_SYLLABIC_CATEGORY_VIRAMA = OT_H,
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic-table.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic-table.cc
index e10a4d25f5f..3bf5285e6bb 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic-table.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic-table.cc
@@ -398,28 +398,28 @@ hb_indic_get_categories (hb_codepoint_t u)
switch (u >> 12)
{
case 0x0u:
- if (hb_in_range (u, 0x0028u, 0x003Fu)) return indic_table[u - 0x0028u + indic_offset_0x0028u];
- if (hb_in_range (u, 0x00B0u, 0x00D7u)) return indic_table[u - 0x00B0u + indic_offset_0x00b0u];
- if (hb_in_range (u, 0x0900u, 0x0DF7u)) return indic_table[u - 0x0900u + indic_offset_0x0900u];
+ if (hb_in_range<hb_codepoint_t> (u, 0x0028u, 0x003Fu)) return indic_table[u - 0x0028u + indic_offset_0x0028u];
+ if (hb_in_range<hb_codepoint_t> (u, 0x00B0u, 0x00D7u)) return indic_table[u - 0x00B0u + indic_offset_0x00b0u];
+ if (hb_in_range<hb_codepoint_t> (u, 0x0900u, 0x0DF7u)) return indic_table[u - 0x0900u + indic_offset_0x0900u];
if (unlikely (u == 0x00A0u)) return _(CP,x);
break;
case 0x1u:
- if (hb_in_range (u, 0x1000u, 0x109Fu)) return indic_table[u - 0x1000u + indic_offset_0x1000u];
- if (hb_in_range (u, 0x1780u, 0x17EFu)) return indic_table[u - 0x1780u + indic_offset_0x1780u];
- if (hb_in_range (u, 0x1CD0u, 0x1CFFu)) return indic_table[u - 0x1CD0u + indic_offset_0x1cd0u];
+ if (hb_in_range<hb_codepoint_t> (u, 0x1000u, 0x109Fu)) return indic_table[u - 0x1000u + indic_offset_0x1000u];
+ if (hb_in_range<hb_codepoint_t> (u, 0x1780u, 0x17EFu)) return indic_table[u - 0x1780u + indic_offset_0x1780u];
+ if (hb_in_range<hb_codepoint_t> (u, 0x1CD0u, 0x1CFFu)) return indic_table[u - 0x1CD0u + indic_offset_0x1cd0u];
break;
case 0x2u:
- if (hb_in_range (u, 0x2008u, 0x2017u)) return indic_table[u - 0x2008u + indic_offset_0x2008u];
- if (hb_in_range (u, 0x2070u, 0x2087u)) return indic_table[u - 0x2070u + indic_offset_0x2070u];
+ if (hb_in_range<hb_codepoint_t> (u, 0x2008u, 0x2017u)) return indic_table[u - 0x2008u + indic_offset_0x2008u];
+ if (hb_in_range<hb_codepoint_t> (u, 0x2070u, 0x2087u)) return indic_table[u - 0x2070u + indic_offset_0x2070u];
if (unlikely (u == 0x25CCu)) return _(CP,x);
break;
case 0xAu:
- if (hb_in_range (u, 0xA8E0u, 0xA8F7u)) return indic_table[u - 0xA8E0u + indic_offset_0xa8e0u];
- if (hb_in_range (u, 0xA9E0u, 0xA9FFu)) return indic_table[u - 0xA9E0u + indic_offset_0xa9e0u];
- if (hb_in_range (u, 0xAA60u, 0xAA7Fu)) return indic_table[u - 0xAA60u + indic_offset_0xaa60u];
+ if (hb_in_range<hb_codepoint_t> (u, 0xA8E0u, 0xA8F7u)) return indic_table[u - 0xA8E0u + indic_offset_0xa8e0u];
+ if (hb_in_range<hb_codepoint_t> (u, 0xA9E0u, 0xA9FFu)) return indic_table[u - 0xA9E0u + indic_offset_0xa9e0u];
+ if (hb_in_range<hb_codepoint_t> (u, 0xAA60u, 0xAA7Fu)) return indic_table[u - 0xAA60u + indic_offset_0xaa60u];
break;
case 0x11u:
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic.cc
index ec12ce69e0b..0232b3057a2 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic.cc
@@ -177,15 +177,15 @@ set_indic_properties (hb_glyph_info_t &info)
*/
/* The following act more like the Bindus. */
- if (unlikely (hb_in_range (u, 0x0953u, 0x0954u)))
+ if (unlikely (hb_in_range<hb_codepoint_t> (u, 0x0953u, 0x0954u)))
cat = OT_SM;
/* The following act like consonants. */
- else if (unlikely (hb_in_ranges (u, 0x0A72u, 0x0A73u,
+ else if (unlikely (hb_in_ranges<hb_codepoint_t> (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)))
+ else if (unlikely (hb_in_range<hb_codepoint_t> (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.
@@ -193,15 +193,24 @@ set_indic_properties (hb_glyph_info_t &info)
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,
+ else if (unlikely (hb_in_ranges<hb_codepoint_t> (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 can occur mid-syllable (eg. before matras), even though Unicode marks them as Syllable_Modifier.
+ * https://github.com/roozbehp/unicode-data/issues/5 */
+ cat = OT_M;
+ pos = POS_ABOVE_C;
+ }
+
else if (unlikely (u == 0x17C6u)) cat = OT_N; /* Khmer Bindu doesn't like to be repositioned. */
- else if (unlikely (hb_in_range (u, 0x2010u, 0x2011u)))
+ else if (unlikely (hb_in_range<hb_codepoint_t> (u, 0x2010u, 0x2011u)))
cat = OT_PLACEHOLDER;
else if (unlikely (u == 0x25CCu)) cat = OT_DOTTEDCIRCLE;
@@ -411,12 +420,12 @@ collect_features_indic (hb_ot_shape_planner_t *plan)
unsigned int i = 0;
map->add_gsub_pause (initial_reordering);
for (; i < INDIC_BASIC_FEATURES; i++) {
- map->add_feature (indic_features[i].tag, 1, indic_features[i].flags | F_MANUAL_ZWJ);
+ map->add_feature (indic_features[i].tag, 1, indic_features[i].flags | F_MANUAL_ZWJ | F_MANUAL_ZWNJ);
map->add_gsub_pause (NULL);
}
map->add_gsub_pause (final_reordering);
for (; i < INDIC_NUM_FEATURES; i++) {
- map->add_feature (indic_features[i].tag, 1, indic_features[i].flags | F_MANUAL_ZWJ);
+ map->add_feature (indic_features[i].tag, 1, indic_features[i].flags | F_MANUAL_ZWJ | F_MANUAL_ZWNJ);
}
map->add_global_bool_feature (HB_TAG('c','a','l','t'));
@@ -1738,7 +1747,7 @@ decompose_indic (const hb_ot_shape_normalize_context_t *c,
#endif
}
- if ((ab == 0x0DDAu || hb_in_range (ab, 0x0DDCu, 0x0DDEu)))
+ if ((ab == 0x0DDAu || hb_in_range<hb_codepoint_t> (ab, 0x0DDCu, 0x0DDEu)))
{
/*
* Sinhala split matras... Let the fun begin.
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-myanmar.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-myanmar.cc
index bb68622e2a7..4e912c361fc 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-myanmar.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-myanmar.cc
@@ -175,7 +175,7 @@ set_myanmar_properties (hb_glyph_info_t &info)
/* Myanmar
* http://www.microsoft.com/typography/OpenTypeDev/myanmar/intro.htm#analyze
*/
- if (unlikely (hb_in_range (u, 0xFE00u, 0xFE0Fu)))
+ if (unlikely (hb_in_range<hb_codepoint_t> (u, 0xFE00u, 0xFE0Fu)))
cat = (indic_category_t) OT_VS;
switch (u)
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-thai.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-thai.cc
index e6f80f59e7f..e75b3537927 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-thai.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-thai.cc
@@ -52,7 +52,7 @@ get_consonant_type (hb_codepoint_t u)
return RC;
if (u == 0x0E0Eu || u == 0x0E0Fu)
return DC;
- if (hb_in_range (u, 0x0E01u, 0x0E2Eu))
+ if (hb_in_range<hb_codepoint_t> (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 == 0x0E31u || hb_in_range (u, 0x0E34u, 0x0E37u) ||
- u == 0x0E47u || hb_in_range (u, 0x0E4Du, 0x0E4Eu))
+ if (u == 0x0E31u || hb_in_range<hb_codepoint_t> (u, 0x0E34u, 0x0E37u) ||
+ u == 0x0E47u || hb_in_range<hb_codepoint_t> (u, 0x0E4Du, 0x0E4Eu))
return AV;
- if (hb_in_range (u, 0x0E38u, 0x0E3Au))
+ if (hb_in_range<hb_codepoint_t> (u, 0x0E38u, 0x0E3Au))
return BV;
- if (hb_in_range (u, 0x0E48u, 0x0E4Cu))
+ if (hb_in_range<hb_codepoint_t> (u, 0x0E48u, 0x0E4Cu))
return T;
return NOT_MARK;
}
@@ -310,7 +310,7 @@ preprocess_text_thai (const hb_ot_shape_plan_t *plan,
#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) & ~0x0080u, 0x0E34u, 0x0E37u, 0x0E47u, 0x0E4Eu, 0x0E31u, 0x0E31u))
+#define IS_TONE_MARK(x) (hb_in_ranges<hb_codepoint_t> ((x) & ~0x0080u, 0x0E34u, 0x0E37u, 0x0E47u, 0x0E4Eu, 0x0E31u, 0x0E31u))
buffer->clear_output ();
unsigned int count = buffer->len;
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-machine.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-machine.hh
index 44e5d0d56b2..1847c48afd9 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-machine.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-machine.hh
@@ -38,31 +38,31 @@
static const unsigned char _use_syllable_machine_trans_keys[] = {
1u, 1u, 0u, 39u, 21u, 21u, 8u, 39u, 8u, 39u, 1u, 1u, 8u, 39u, 8u, 39u,
8u, 39u, 8u, 26u, 8u, 26u, 8u, 26u, 8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u,
- 8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u, 13u, 21u,
- 4u, 4u, 13u, 13u, 8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u, 8u, 26u, 8u, 26u,
- 8u, 26u, 8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u,
- 8u, 39u, 8u, 39u, 8u, 39u, 1u, 1u, 1u, 39u, 8u, 39u, 21u, 42u, 41u, 42u,
- 42u, 42u, 0
+ 8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u,
+ 13u, 21u, 4u, 4u, 13u, 13u, 8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u, 8u, 26u,
+ 8u, 26u, 8u, 26u, 8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u,
+ 8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u, 1u, 1u, 1u, 39u, 8u, 39u,
+ 21u, 42u, 41u, 42u, 42u, 42u, 0
};
static const char _use_syllable_machine_key_spans[] = {
1, 40, 1, 32, 32, 1, 32, 32,
32, 19, 19, 19, 32, 32, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 9,
- 1, 1, 32, 32, 32, 32, 19, 19,
- 19, 32, 32, 32, 32, 32, 32, 32,
- 32, 32, 32, 1, 39, 32, 22, 2,
- 1
+ 32, 32, 32, 32, 32, 32, 32, 32,
+ 9, 1, 1, 32, 32, 32, 32, 19,
+ 19, 19, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 1, 39, 32,
+ 22, 2, 1
};
static const short _use_syllable_machine_index_offsets[] = {
0, 2, 43, 45, 78, 111, 113, 146,
179, 212, 232, 252, 272, 305, 338, 371,
404, 437, 470, 503, 536, 569, 602, 635,
- 645, 647, 649, 682, 715, 748, 781, 801,
- 821, 841, 874, 907, 940, 973, 1006, 1039,
- 1072, 1105, 1138, 1171, 1173, 1213, 1246, 1269,
- 1272
+ 668, 678, 680, 682, 715, 748, 781, 814,
+ 834, 854, 874, 907, 940, 973, 1006, 1039,
+ 1072, 1105, 1138, 1171, 1204, 1237, 1239, 1279,
+ 1312, 1335, 1338
};
static const char _use_syllable_machine_indicies[] = {
@@ -131,112 +131,120 @@ static const char _use_syllable_machine_indicies[] = {
43, 44, 28, 45, 46, 47, 28, 29,
28, 28, 28, 28, 28, 28, 28, 28,
28, 28, 28, 28, 28, 33, 34, 35,
- 36, 37, 28, 28, 33, 28, 28, 28,
+ 36, 37, 28, 50, 33, 28, 28, 28,
42, 43, 44, 28, 45, 46, 47, 28,
29, 28, 28, 28, 28, 28, 28, 28,
28, 28, 28, 28, 28, 28, 33, 34,
- 35, 36, 37, 38, 39, 33, 28, 28,
+ 35, 36, 37, 28, 28, 33, 28, 28,
28, 42, 43, 44, 28, 45, 46, 47,
- 28, 29, 28, 28, 30, 31, 28, 28,
+ 28, 29, 28, 28, 28, 28, 28, 28,
28, 28, 28, 28, 28, 28, 28, 33,
- 34, 35, 36, 37, 38, 39, 33, 40,
- 28, 41, 42, 43, 44, 28, 45, 46,
+ 34, 35, 36, 37, 38, 39, 33, 28,
+ 28, 28, 42, 43, 44, 28, 45, 46,
47, 28, 29, 28, 28, 30, 31, 28,
28, 28, 28, 28, 28, 28, 28, 28,
33, 34, 35, 36, 37, 38, 39, 33,
- 40, 32, 41, 42, 43, 44, 28, 45,
- 46, 47, 28, 51, 50, 50, 50, 50,
- 50, 50, 50, 52, 50, 5, 53, 51,
- 50, 6, 54, 54, 1, 55, 54, 54,
- 54, 54, 54, 54, 54, 54, 56, 10,
- 11, 12, 13, 14, 15, 16, 10, 17,
- 19, 19, 20, 21, 22, 54, 23, 24,
- 25, 54, 6, 54, 54, 1, 55, 54,
- 54, 54, 54, 54, 54, 54, 54, 54,
- 10, 11, 12, 13, 14, 15, 16, 10,
- 17, 19, 19, 20, 21, 22, 54, 23,
- 24, 25, 54, 6, 54, 54, 54, 54,
- 54, 54, 54, 54, 54, 54, 54, 54,
- 54, 10, 11, 12, 13, 14, 54, 54,
- 54, 54, 54, 54, 20, 21, 22, 54,
- 23, 24, 25, 54, 6, 54, 54, 54,
- 54, 54, 54, 54, 54, 54, 54, 54,
- 54, 54, 54, 11, 12, 13, 14, 54,
- 54, 54, 54, 54, 54, 54, 54, 54,
- 54, 23, 24, 25, 54, 6, 54, 54,
- 54, 54, 54, 54, 54, 54, 54, 54,
- 54, 54, 54, 54, 54, 12, 13, 14,
- 54, 6, 54, 54, 54, 54, 54, 54,
- 54, 54, 54, 54, 54, 54, 54, 54,
- 54, 54, 13, 14, 54, 6, 54, 54,
- 54, 54, 54, 54, 54, 54, 54, 54,
- 54, 54, 54, 54, 54, 54, 54, 14,
- 54, 6, 54, 54, 54, 54, 54, 54,
- 54, 54, 54, 54, 54, 54, 54, 54,
- 54, 12, 13, 14, 54, 54, 54, 54,
- 54, 54, 54, 54, 54, 54, 23, 24,
- 25, 54, 6, 54, 54, 54, 54, 54,
- 54, 54, 54, 54, 54, 54, 54, 54,
- 54, 54, 12, 13, 14, 54, 54, 54,
- 54, 54, 54, 54, 54, 54, 54, 54,
- 24, 25, 54, 6, 54, 54, 54, 54,
- 54, 54, 54, 54, 54, 54, 54, 54,
- 54, 54, 54, 12, 13, 14, 54, 54,
- 54, 54, 54, 54, 54, 54, 54, 54,
- 54, 54, 25, 54, 6, 54, 54, 54,
- 54, 54, 54, 54, 54, 54, 54, 54,
- 54, 54, 54, 11, 12, 13, 14, 54,
- 54, 54, 54, 54, 54, 20, 21, 22,
- 54, 23, 24, 25, 54, 6, 54, 54,
- 54, 54, 54, 54, 54, 54, 54, 54,
- 54, 54, 54, 54, 11, 12, 13, 14,
- 54, 54, 54, 54, 54, 54, 54, 21,
- 22, 54, 23, 24, 25, 54, 6, 54,
- 54, 54, 54, 54, 54, 54, 54, 54,
- 54, 54, 54, 54, 54, 11, 12, 13,
- 14, 54, 54, 54, 54, 54, 54, 54,
- 54, 22, 54, 23, 24, 25, 54, 6,
- 54, 54, 54, 54, 54, 54, 54, 54,
- 54, 54, 54, 54, 54, 10, 11, 12,
- 13, 14, 54, 16, 10, 54, 54, 54,
- 20, 21, 22, 54, 23, 24, 25, 54,
- 6, 54, 54, 54, 54, 54, 54, 54,
- 54, 54, 54, 54, 54, 54, 10, 11,
- 12, 13, 14, 54, 54, 10, 54, 54,
- 54, 20, 21, 22, 54, 23, 24, 25,
- 54, 6, 54, 54, 54, 54, 54, 54,
- 54, 54, 54, 54, 54, 54, 54, 10,
- 11, 12, 13, 14, 15, 16, 10, 54,
- 54, 54, 20, 21, 22, 54, 23, 24,
- 25, 54, 6, 54, 54, 1, 55, 54,
- 54, 54, 54, 54, 54, 54, 54, 54,
+ 40, 28, 41, 42, 43, 44, 28, 45,
+ 46, 47, 28, 29, 28, 28, 30, 31,
+ 28, 28, 28, 28, 28, 28, 28, 28,
+ 28, 33, 34, 35, 36, 37, 38, 39,
+ 33, 40, 32, 41, 42, 43, 44, 28,
+ 45, 46, 47, 28, 52, 51, 51, 51,
+ 51, 51, 51, 51, 53, 51, 5, 54,
+ 52, 51, 6, 55, 55, 1, 56, 55,
+ 55, 55, 55, 55, 55, 55, 55, 57,
10, 11, 12, 13, 14, 15, 16, 10,
- 17, 54, 19, 20, 21, 22, 54, 23,
- 24, 25, 54, 1, 57, 3, 54, 54,
- 54, 3, 54, 54, 6, 54, 54, 1,
- 55, 54, 54, 54, 54, 54, 54, 54,
- 54, 54, 10, 11, 12, 13, 14, 15,
- 16, 10, 17, 18, 19, 20, 21, 22,
- 54, 23, 24, 25, 54, 6, 54, 54,
- 1, 55, 54, 54, 54, 54, 54, 54,
- 54, 54, 54, 10, 11, 12, 13, 14,
- 15, 16, 10, 17, 18, 19, 20, 21,
- 22, 54, 23, 24, 25, 54, 59, 58,
- 58, 58, 58, 58, 58, 58, 58, 58,
- 58, 58, 58, 58, 58, 58, 58, 58,
- 58, 58, 59, 60, 58, 59, 60, 58,
- 60, 58, 0
+ 17, 19, 19, 20, 21, 22, 55, 23,
+ 24, 25, 55, 6, 55, 55, 1, 56,
+ 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 10, 11, 12, 13, 14, 15, 16,
+ 10, 17, 19, 19, 20, 21, 22, 55,
+ 23, 24, 25, 55, 6, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 10, 11, 12, 13, 14, 55,
+ 55, 55, 55, 55, 55, 20, 21, 22,
+ 55, 23, 24, 25, 55, 6, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 11, 12, 13, 14,
+ 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 23, 24, 25, 55, 6, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 12, 13,
+ 14, 55, 6, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 13, 14, 55, 6, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55,
+ 14, 55, 6, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 12, 13, 14, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 23,
+ 24, 25, 55, 6, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 12, 13, 14, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 24, 25, 55, 6, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 12, 13, 14, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 25, 55, 6, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 11, 12, 13, 14,
+ 55, 55, 55, 55, 55, 55, 20, 21,
+ 22, 55, 23, 24, 25, 55, 6, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 11, 12, 13,
+ 14, 55, 55, 55, 55, 55, 55, 55,
+ 21, 22, 55, 23, 24, 25, 55, 6,
+ 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 11, 12,
+ 13, 14, 55, 55, 55, 55, 55, 55,
+ 55, 55, 22, 55, 23, 24, 25, 55,
+ 6, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 10, 11,
+ 12, 13, 14, 55, 16, 10, 55, 55,
+ 55, 20, 21, 22, 55, 23, 24, 25,
+ 55, 6, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 10,
+ 11, 12, 13, 14, 55, 58, 10, 55,
+ 55, 55, 20, 21, 22, 55, 23, 24,
+ 25, 55, 6, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55,
+ 10, 11, 12, 13, 14, 55, 55, 10,
+ 55, 55, 55, 20, 21, 22, 55, 23,
+ 24, 25, 55, 6, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 10, 11, 12, 13, 14, 15, 16,
+ 10, 55, 55, 55, 20, 21, 22, 55,
+ 23, 24, 25, 55, 6, 55, 55, 1,
+ 56, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 10, 11, 12, 13, 14, 15,
+ 16, 10, 17, 55, 19, 20, 21, 22,
+ 55, 23, 24, 25, 55, 1, 59, 3,
+ 55, 55, 55, 3, 55, 55, 6, 55,
+ 55, 1, 56, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 10, 11, 12, 13,
+ 14, 15, 16, 10, 17, 18, 19, 20,
+ 21, 22, 55, 23, 24, 25, 55, 6,
+ 55, 55, 1, 56, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 10, 11, 12,
+ 13, 14, 15, 16, 10, 17, 18, 19,
+ 20, 21, 22, 55, 23, 24, 25, 55,
+ 61, 60, 60, 60, 60, 60, 60, 60,
+ 60, 60, 60, 60, 60, 60, 60, 60,
+ 60, 60, 60, 60, 61, 62, 60, 61,
+ 62, 60, 62, 60, 0
};
static const char _use_syllable_machine_trans_targs[] = {
- 1, 26, 2, 3, 1, 23, 1, 43,
- 44, 46, 28, 29, 30, 31, 32, 39,
- 40, 41, 45, 42, 36, 37, 38, 33,
- 34, 35, 1, 1, 1, 1, 4, 5,
- 22, 7, 8, 9, 10, 11, 18, 19,
- 20, 21, 15, 16, 17, 12, 13, 14,
- 6, 1, 1, 24, 25, 1, 1, 0,
- 27, 1, 1, 47, 48
+ 1, 27, 2, 3, 1, 24, 1, 45,
+ 46, 48, 29, 30, 31, 32, 33, 40,
+ 41, 43, 47, 44, 37, 38, 39, 34,
+ 35, 36, 1, 1, 1, 1, 4, 5,
+ 23, 7, 8, 9, 10, 11, 18, 19,
+ 21, 22, 15, 16, 17, 12, 13, 14,
+ 6, 1, 20, 1, 25, 26, 1, 1,
+ 0, 28, 42, 1, 1, 49, 50
};
static const char _use_syllable_machine_trans_actions[] = {
@@ -246,8 +254,8 @@ static const char _use_syllable_machine_trans_actions[] = {
0, 0, 7, 8, 9, 10, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
- 0, 11, 12, 0, 0, 13, 14, 0,
- 2, 15, 16, 0, 0
+ 0, 11, 0, 12, 0, 0, 13, 14,
+ 0, 2, 0, 15, 16, 0, 0
};
static const char _use_syllable_machine_to_state_actions[] = {
@@ -257,7 +265,7 @@ static const char _use_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
};
static const char _use_syllable_machine_from_state_actions[] = {
@@ -267,17 +275,17 @@ static const char _use_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
};
static const short _use_syllable_machine_eof_trans[] = {
1, 0, 27, 29, 29, 50, 29, 29,
29, 29, 29, 29, 29, 29, 29, 29,
- 29, 29, 29, 29, 29, 29, 29, 51,
- 54, 51, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 58, 55, 55, 59, 59,
- 59
+ 29, 29, 29, 29, 29, 29, 29, 29,
+ 52, 55, 52, 56, 56, 56, 56, 56,
+ 56, 56, 56, 56, 56, 56, 56, 56,
+ 56, 56, 56, 56, 56, 60, 56, 56,
+ 61, 61, 61
};
static const int use_syllable_machine_start = 1;
@@ -291,7 +299,7 @@ static const int use_syllable_machine_en_main = 1;
-#line 138 "hb-ot-shape-complex-use-machine.rl"
+#line 139 "hb-ot-shape-complex-use-machine.rl"
#define found_syllable(syllable_type) \
@@ -311,7 +319,7 @@ find_syllables (hb_buffer_t *buffer)
int cs;
hb_glyph_info_t *info = buffer->info;
-#line 315 "hb-ot-shape-complex-use-machine.hh"
+#line 323 "hb-ot-shape-complex-use-machine.hh"
{
cs = use_syllable_machine_start;
ts = 0;
@@ -319,7 +327,7 @@ find_syllables (hb_buffer_t *buffer)
act = 0;
}
-#line 159 "hb-ot-shape-complex-use-machine.rl"
+#line 160 "hb-ot-shape-complex-use-machine.rl"
p = 0;
@@ -328,7 +336,7 @@ find_syllables (hb_buffer_t *buffer)
unsigned int last = 0;
unsigned int syllable_serial = 1;
-#line 332 "hb-ot-shape-complex-use-machine.hh"
+#line 340 "hb-ot-shape-complex-use-machine.hh"
{
int _slen;
int _trans;
@@ -342,7 +350,7 @@ _resume:
#line 1 "NONE"
{ts = p;}
break;
-#line 346 "hb-ot-shape-complex-use-machine.hh"
+#line 354 "hb-ot-shape-complex-use-machine.hh"
}
_keys = _use_syllable_machine_trans_keys + (cs<<1);
@@ -365,58 +373,58 @@ _eof_trans:
{te = p+1;}
break;
case 8:
-#line 127 "hb-ot-shape-complex-use-machine.rl"
+#line 128 "hb-ot-shape-complex-use-machine.rl"
{te = p+1;{ found_syllable (independent_cluster); }}
break;
case 10:
-#line 129 "hb-ot-shape-complex-use-machine.rl"
+#line 130 "hb-ot-shape-complex-use-machine.rl"
{te = p+1;{ found_syllable (standard_cluster); }}
break;
case 6:
-#line 133 "hb-ot-shape-complex-use-machine.rl"
+#line 134 "hb-ot-shape-complex-use-machine.rl"
{te = p+1;{ found_syllable (broken_cluster); }}
break;
case 5:
-#line 134 "hb-ot-shape-complex-use-machine.rl"
+#line 135 "hb-ot-shape-complex-use-machine.rl"
{te = p+1;{ found_syllable (non_cluster); }}
break;
case 7:
-#line 127 "hb-ot-shape-complex-use-machine.rl"
+#line 128 "hb-ot-shape-complex-use-machine.rl"
{te = p;p--;{ found_syllable (independent_cluster); }}
break;
case 11:
-#line 128 "hb-ot-shape-complex-use-machine.rl"
+#line 129 "hb-ot-shape-complex-use-machine.rl"
{te = p;p--;{ found_syllable (virama_terminated_cluster); }}
break;
case 9:
-#line 129 "hb-ot-shape-complex-use-machine.rl"
+#line 130 "hb-ot-shape-complex-use-machine.rl"
{te = p;p--;{ found_syllable (standard_cluster); }}
break;
case 13:
-#line 130 "hb-ot-shape-complex-use-machine.rl"
+#line 131 "hb-ot-shape-complex-use-machine.rl"
{te = p;p--;{ found_syllable (number_joiner_terminated_cluster); }}
break;
case 12:
-#line 131 "hb-ot-shape-complex-use-machine.rl"
+#line 132 "hb-ot-shape-complex-use-machine.rl"
{te = p;p--;{ found_syllable (numeral_cluster); }}
break;
case 16:
-#line 132 "hb-ot-shape-complex-use-machine.rl"
+#line 133 "hb-ot-shape-complex-use-machine.rl"
{te = p;p--;{ found_syllable (symbol_cluster); }}
break;
case 14:
-#line 133 "hb-ot-shape-complex-use-machine.rl"
+#line 134 "hb-ot-shape-complex-use-machine.rl"
{te = p;p--;{ found_syllable (broken_cluster); }}
break;
case 15:
-#line 134 "hb-ot-shape-complex-use-machine.rl"
+#line 135 "hb-ot-shape-complex-use-machine.rl"
{te = p;p--;{ found_syllable (non_cluster); }}
break;
case 1:
-#line 133 "hb-ot-shape-complex-use-machine.rl"
+#line 134 "hb-ot-shape-complex-use-machine.rl"
{{p = ((te))-1;}{ found_syllable (broken_cluster); }}
break;
-#line 420 "hb-ot-shape-complex-use-machine.hh"
+#line 428 "hb-ot-shape-complex-use-machine.hh"
}
_again:
@@ -425,7 +433,7 @@ _again:
#line 1 "NONE"
{ts = 0;}
break;
-#line 429 "hb-ot-shape-complex-use-machine.hh"
+#line 437 "hb-ot-shape-complex-use-machine.hh"
}
if ( ++p != pe )
@@ -441,7 +449,7 @@ _again:
}
-#line 168 "hb-ot-shape-complex-use-machine.rl"
+#line 169 "hb-ot-shape-complex-use-machine.rl"
}
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-machine.rl b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-machine.rl
index f6b814b1df0..2a7f75115e1 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-machine.rl
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-machine.rl
@@ -89,7 +89,8 @@ SMBlw = 42; # SYM_MOD_BELOW
consonant_modifiers = CMAbv* CMBlw* ((H B | SUB) VS? CMAbv? CMBlw*)*;
-medial_consonants = MPre? MAbv? MBlw? MPst?;
+# Override: Allow two MBlw. https://github.com/behdad/harfbuzz/issues/376
+medial_consonants = MPre? MAbv? MBlw?.MBlw? MPst?;
dependent_vowels = VPre* VAbv* VBlw* VPst*;
vowel_modifiers = VMPre* VMAbv* VMBlw* VMPst*;
final_consonants = FAbv* FBlw* FPst* FM?;
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-table.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-table.cc
index 38c46d002d1..941a003aaf5 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-table.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-table.cc
@@ -9,7 +9,7 @@
* # IndicSyllabicCategory-9.0.0.txt
* # Date: 2016-05-21, 02:46:00 GMT [RP]
* # IndicPositionalCategory-9.0.0.txt
- * # Date: 2016-02-25, 00:48:00 GMT [RP]
+ * # Date: 2016-06-09, 19:33:00 GMT [RP]
* # Blocks-9.0.0.txt
* # Date: 2016-02-05, 23:48:00 GMT [KW]
* UnicodeData.txt does not have a header.
@@ -410,7 +410,7 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = {
/* AA00 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
/* AA10 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
- /* AA20 */ B, B, B, B, B, B, B, B, B, VAbv, VAbv, VAbv, VAbv, VBlw, VAbv, VPre,
+ /* AA20 */ B, B, B, B, B, B, B, B, B, VMAbv, VAbv, VAbv, VAbv, VBlw, VAbv, VPre,
/* AA30 */ VPre, VAbv, VBlw, MPst, MPre, MBlw, MBlw, O, O, O, O, O, O, O, O, O,
/* AA40 */ B, B, B, FAbv, B, B, B, B, B, B, B, B, FAbv, FPst, O, O,
/* AA50 */ B, B, B, B, B, B, B, B, B, B, O, O, O, O, O, O,
@@ -644,47 +644,47 @@ hb_use_get_categories (hb_codepoint_t u)
switch (u >> 12)
{
case 0x0u:
- if (hb_in_range (u, 0x0028u, 0x003Fu)) return use_table[u - 0x0028u + use_offset_0x0028u];
- if (hb_in_range (u, 0x00A0u, 0x00D7u)) return use_table[u - 0x00A0u + use_offset_0x00a0u];
- if (hb_in_range (u, 0x0900u, 0x0DF7u)) return use_table[u - 0x0900u + use_offset_0x0900u];
+ if (hb_in_range<hb_codepoint_t> (u, 0x0028u, 0x003Fu)) return use_table[u - 0x0028u + use_offset_0x0028u];
+ if (hb_in_range<hb_codepoint_t> (u, 0x00A0u, 0x00D7u)) return use_table[u - 0x00A0u + use_offset_0x00a0u];
+ if (hb_in_range<hb_codepoint_t> (u, 0x0900u, 0x0DF7u)) return use_table[u - 0x0900u + use_offset_0x0900u];
if (unlikely (u == 0x034Fu)) return CGJ;
break;
case 0x1u:
- if (hb_in_range (u, 0x1000u, 0x109Fu)) return use_table[u - 0x1000u + use_offset_0x1000u];
- if (hb_in_range (u, 0x1700u, 0x17EFu)) return use_table[u - 0x1700u + use_offset_0x1700u];
- if (hb_in_range (u, 0x1900u, 0x1A9Fu)) return use_table[u - 0x1900u + use_offset_0x1900u];
- if (hb_in_range (u, 0x1B00u, 0x1C4Fu)) return use_table[u - 0x1B00u + use_offset_0x1b00u];
- if (hb_in_range (u, 0x1CD0u, 0x1CFFu)) return use_table[u - 0x1CD0u + use_offset_0x1cd0u];
- if (hb_in_range (u, 0x1DF8u, 0x1DFFu)) return use_table[u - 0x1DF8u + use_offset_0x1df8u];
+ if (hb_in_range<hb_codepoint_t> (u, 0x1000u, 0x109Fu)) return use_table[u - 0x1000u + use_offset_0x1000u];
+ if (hb_in_range<hb_codepoint_t> (u, 0x1700u, 0x17EFu)) return use_table[u - 0x1700u + use_offset_0x1700u];
+ if (hb_in_range<hb_codepoint_t> (u, 0x1900u, 0x1A9Fu)) return use_table[u - 0x1900u + use_offset_0x1900u];
+ if (hb_in_range<hb_codepoint_t> (u, 0x1B00u, 0x1C4Fu)) return use_table[u - 0x1B00u + use_offset_0x1b00u];
+ if (hb_in_range<hb_codepoint_t> (u, 0x1CD0u, 0x1CFFu)) return use_table[u - 0x1CD0u + use_offset_0x1cd0u];
+ if (hb_in_range<hb_codepoint_t> (u, 0x1DF8u, 0x1DFFu)) return use_table[u - 0x1DF8u + use_offset_0x1df8u];
break;
case 0x2u:
- if (hb_in_range (u, 0x2008u, 0x2017u)) return use_table[u - 0x2008u + use_offset_0x2008u];
- if (hb_in_range (u, 0x2060u, 0x2087u)) return use_table[u - 0x2060u + use_offset_0x2060u];
+ if (hb_in_range<hb_codepoint_t> (u, 0x2008u, 0x2017u)) return use_table[u - 0x2008u + use_offset_0x2008u];
+ if (hb_in_range<hb_codepoint_t> (u, 0x2060u, 0x2087u)) return use_table[u - 0x2060u + use_offset_0x2060u];
if (unlikely (u == 0x25CCu)) return GB;
break;
case 0xAu:
- if (hb_in_range (u, 0xA800u, 0xAAF7u)) return use_table[u - 0xA800u + use_offset_0xa800u];
- if (hb_in_range (u, 0xABC0u, 0xABFFu)) return use_table[u - 0xABC0u + use_offset_0xabc0u];
+ if (hb_in_range<hb_codepoint_t> (u, 0xA800u, 0xAAF7u)) return use_table[u - 0xA800u + use_offset_0xa800u];
+ if (hb_in_range<hb_codepoint_t> (u, 0xABC0u, 0xABFFu)) return use_table[u - 0xABC0u + use_offset_0xabc0u];
break;
case 0xFu:
- if (hb_in_range (u, 0xFE00u, 0xFE0Fu)) return use_table[u - 0xFE00u + use_offset_0xfe00u];
+ if (hb_in_range<hb_codepoint_t> (u, 0xFE00u, 0xFE0Fu)) return use_table[u - 0xFE00u + use_offset_0xfe00u];
break;
case 0x10u:
- if (hb_in_range (u, 0x10A00u, 0x10A47u)) return use_table[u - 0x10A00u + use_offset_0x10a00u];
+ if (hb_in_range<hb_codepoint_t> (u, 0x10A00u, 0x10A47u)) return use_table[u - 0x10A00u + use_offset_0x10a00u];
break;
case 0x11u:
- if (hb_in_range (u, 0x11000u, 0x110BFu)) return use_table[u - 0x11000u + use_offset_0x11000u];
- if (hb_in_range (u, 0x11100u, 0x1123Fu)) return use_table[u - 0x11100u + use_offset_0x11100u];
- if (hb_in_range (u, 0x11280u, 0x11377u)) return use_table[u - 0x11280u + use_offset_0x11280u];
- if (hb_in_range (u, 0x11400u, 0x114DFu)) return use_table[u - 0x11400u + use_offset_0x11400u];
- if (hb_in_range (u, 0x11580u, 0x1173Fu)) return use_table[u - 0x11580u + use_offset_0x11580u];
- if (hb_in_range (u, 0x11C00u, 0x11CB7u)) return use_table[u - 0x11C00u + use_offset_0x11c00u];
+ if (hb_in_range<hb_codepoint_t> (u, 0x11000u, 0x110BFu)) return use_table[u - 0x11000u + use_offset_0x11000u];
+ if (hb_in_range<hb_codepoint_t> (u, 0x11100u, 0x1123Fu)) return use_table[u - 0x11100u + use_offset_0x11100u];
+ if (hb_in_range<hb_codepoint_t> (u, 0x11280u, 0x11377u)) return use_table[u - 0x11280u + use_offset_0x11280u];
+ if (hb_in_range<hb_codepoint_t> (u, 0x11400u, 0x114DFu)) return use_table[u - 0x11400u + use_offset_0x11400u];
+ if (hb_in_range<hb_codepoint_t> (u, 0x11580u, 0x1173Fu)) return use_table[u - 0x11580u + use_offset_0x11580u];
+ if (hb_in_range<hb_codepoint_t> (u, 0x11C00u, 0x11CB7u)) return use_table[u - 0x11C00u + use_offset_0x11c00u];
if (unlikely (u == 0x1107Fu)) return HN;
break;
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-private.hh
index 666af6260b4..b5dccc556b4 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-private.hh
@@ -74,10 +74,9 @@ extern "C" void hb_free_impl(void *ptr);
/* Compiler attributes */
-#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))
+#if (defined(__GNUC__) || defined(__clang__)) && defined(__OPTIMIZE__)
+#define likely(expr) (__builtin_expect (!!(expr), 1))
+#define unlikely(expr) (__builtin_expect (!!(expr), 0))
#else
#define likely(expr) (expr)
#define unlikely(expr) (expr)
@@ -168,7 +167,6 @@ extern "C" void hb_free_impl(void *ptr);
# if defined(_WIN32_WCE)
/* Some things not defined on Windows CE. */
-# define strdup _strdup
# define vsnprintf _vsnprintf
# define getenv(Name) NULL
# if _WIN32_WCE < 0x800
@@ -180,9 +178,6 @@ static int errno = 0; /* Use something better? */
# endif
# if defined(_MSC_VER) && _MSC_VER < 1900
# define snprintf _snprintf
-# elif defined(_MSC_VER) && _MSC_VER >= 1900
-# /* Covers VC++ Error for strdup being a deprecated POSIX name and to instead use _strdup instead */
-# define strdup _strdup
# endif
#endif
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-unicode-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-unicode-private.hh
index a4d118b6dc9..aa86a72c437 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-unicode-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-unicode-private.hh
@@ -126,7 +126,7 @@ HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS_SIMPLE
{
/* 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,
+ return unlikely (hb_in_ranges<hb_codepoint_t> (unicode,
0xFE00u, 0xFE0Fu, /* VARIATION SELECTOR-1..16 */
0xE0100u, 0xE01EFu)); /* VARIATION SELECTOR-17..256 */
}
@@ -179,13 +179,13 @@ HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS_SIMPLE
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,
+ case 0x17: return hb_in_range<hb_codepoint_t> (ch, 0x17B4u, 0x17B5u);
+ case 0x18: return hb_in_range<hb_codepoint_t> (ch, 0x180Bu, 0x180Eu);
+ case 0x20: return hb_in_ranges<hb_codepoint_t> (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);
+ case 0xFE: return hb_in_range<hb_codepoint_t> (ch, 0xFE00u, 0xFE0Fu) || ch == 0xFEFFu;
+ case 0xFF: return hb_in_range<hb_codepoint_t> (ch, 0xFFF0u, 0xFFF8u);
default: return false;
}
}
@@ -193,9 +193,9 @@ HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS_SIMPLE
{
/* Other planes */
switch (plane) {
- case 0x01: return hb_in_ranges (ch, 0x1BCA0u, 0x1BCA3u,
+ case 0x01: return hb_in_ranges<hb_codepoint_t> (ch, 0x1BCA0u, 0x1BCA3u,
0x1D173u, 0x1D17Au);
- case 0x0E: return hb_in_range (ch, 0xE0000u, 0xE0FFFu);
+ case 0x0E: return hb_in_range<hb_codepoint_t> (ch, 0xE0000u, 0xE0FFFu);
default: return false;
}
}
@@ -346,12 +346,13 @@ extern HB_INTERNAL const hb_unicode_funcs_t _hb_unicode_funcs_nil;
#define HB_MODIFIED_COMBINING_CLASS_CCC122 122 /* mai * */
/* Tibetan
- * Modify U+0F74 (ccc=132) to reorder before ccc=130 marks.
+ *
+ * In case of multiple vowel-signs, use u first (but after achung)
+ * this allows Dzongkha multi-vowel shortcuts to render correctly
*/
#define HB_MODIFIED_COMBINING_CLASS_CCC129 129 /* sign aa */
-#define HB_MODIFIED_COMBINING_CLASS_CCC130 130 /* sign i */
-#define HB_MODIFIED_COMBINING_CLASS_CCC132 128 /* sign u */
-
+#define HB_MODIFIED_COMBINING_CLASS_CCC130 132 /* sign i */
+#define HB_MODIFIED_COMBINING_CLASS_CCC132 131 /* sign u */
/* Misc */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-utf-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-utf-private.hh
index 74cf5d66a29..211eb4dc023 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-utf-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-utf-private.hh
@@ -48,7 +48,7 @@ struct hb_utf8_t
if (c > 0x7Fu)
{
- if (hb_in_range (c, 0xC2u, 0xDFu)) /* Two-byte */
+ if (hb_in_range<hb_codepoint_t> (c, 0xC2u, 0xDFu)) /* Two-byte */
{
unsigned int t1;
if (likely (text < end &&
@@ -60,7 +60,7 @@ struct hb_utf8_t
else
goto error;
}
- else if (hb_in_range (c, 0xE0u, 0xEFu)) /* Three-byte */
+ else if (hb_in_range<hb_codepoint_t> (c, 0xE0u, 0xEFu)) /* Three-byte */
{
unsigned int t1, t2;
if (likely (1 < end - text &&
@@ -68,14 +68,14 @@ struct hb_utf8_t
(t2 = text[1] - 0x80u) <= 0x3Fu))
{
c = ((c&0xFu)<<12) | (t1<<6) | t2;
- if (unlikely (c < 0x0800u || hb_in_range (c, 0xD800u, 0xDFFFu)))
+ if (unlikely (c < 0x0800u || hb_in_range<hb_codepoint_t> (c, 0xD800u, 0xDFFFu)))
goto error;
text += 2;
}
else
goto error;
}
- else if (hb_in_range (c, 0xF0u, 0xF4u)) /* Four-byte */
+ else if (hb_in_range<hb_codepoint_t> (c, 0xF0u, 0xF4u)) /* Four-byte */
{
unsigned int t1, t2, t3;
if (likely (2 < end - text &&
@@ -84,7 +84,7 @@ struct hb_utf8_t
(t3 = text[2] - 0x80u) <= 0x3Fu))
{
c = ((c&0x7u)<<18) | (t1<<12) | (t2<<6) | t3;
- if (unlikely (!hb_in_range (c, 0x10000u, 0x10FFFFu)))
+ if (unlikely (!hb_in_range<hb_codepoint_t> (c, 0x10000u, 0x10FFFFu)))
goto error;
text += 3;
}
@@ -140,7 +140,7 @@ struct hb_utf16_t
{
hb_codepoint_t c = *text++;
- if (likely (!hb_in_range (c, 0xD800u, 0xDFFFu)))
+ if (likely (!hb_in_range<hb_codepoint_t> (c, 0xD800u, 0xDFFFu)))
{
*unicode = c;
return text;
@@ -150,7 +150,7 @@ struct hb_utf16_t
{
/* High-surrogate in c */
hb_codepoint_t l = *text;
- if (likely (hb_in_range (l, 0xDC00u, 0xDFFFu)))
+ if (likely (hb_in_range<hb_codepoint_t> (l, 0xDC00u, 0xDFFFu)))
{
/* Low-surrogate in l */
*unicode = (c << 10) + l - ((0xD800u << 10) - 0x10000u + 0xDC00u);
@@ -172,7 +172,7 @@ struct hb_utf16_t
{
hb_codepoint_t c = *--text;
- if (likely (!hb_in_range (c, 0xD800u, 0xDFFFu)))
+ if (likely (!hb_in_range<hb_codepoint_t> (c, 0xD800u, 0xDFFFu)))
{
*unicode = c;
return text;
@@ -182,7 +182,7 @@ struct hb_utf16_t
{
/* Low-surrogate in c */
hb_codepoint_t h = text[-1];
- if (likely (hb_in_range (h, 0xD800u, 0xDBFFu)))
+ if (likely (hb_in_range<hb_codepoint_t> (h, 0xD800u, 0xDBFFu)))
{
/* High-surrogate in h */
*unicode = (h << 10) + c - ((0xD800u << 10) - 0x10000u + 0xDC00u);