| Index: third_party/harfbuzz-ng/src/hb-uniscribe.cc
|
| diff --git a/third_party/harfbuzz-ng/src/hb-uniscribe.cc b/third_party/harfbuzz-ng/src/hb-uniscribe.cc
|
| index 6571448872ae72c64b377a87dd8ac885f467193b..6bdf0f5c7fad77e82d3ff3722b7c69fa9015cb92 100644
|
| --- a/third_party/harfbuzz-ng/src/hb-uniscribe.cc
|
| +++ b/third_party/harfbuzz-ng/src/hb-uniscribe.cc
|
| @@ -379,7 +379,7 @@ _hb_rename_font (hb_blob_t *blob, wchar_t *new_name)
|
| OT::NameRecord &record = name.nameRecord[i];
|
| record.platformID.set (3);
|
| record.encodingID.set (1);
|
| - record.languageID.set (0x0409); /* English */
|
| + record.languageID.set (0x0409u); /* English */
|
| record.nameID.set (name_IDs[i]);
|
| record.length.set (name_str_len * 2);
|
| record.offset.set (0);
|
| @@ -631,7 +631,7 @@ _hb_uniscribe_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;
|
| @@ -663,7 +663,7 @@ _hb_uniscribe_shape (hb_shape_plan_t *shape_plan,
|
|
|
| unsigned int offset = feature_records.len;
|
|
|
| - active_features.sort ();
|
| + active_features.qsort ();
|
| for (unsigned int j = 0; j < active_features.len; j++)
|
| {
|
| if (!j || active_features[j].rec.tagFeature != feature_records[feature_records.len - 1].tagFeature)
|
| @@ -749,13 +749,13 @@ retry:
|
| {
|
| 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));
|
| }
|
| }
|
|
|
| @@ -771,7 +771,7 @@ retry:
|
| 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. */
|
| }
|
| }
|
|
|