Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Unified Diff: third_party/harfbuzz-ng/src/hb-uniscribe.cc

Issue 396393005: Roll HarfBuzz to 0.9.32 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix for include order presubmit issue Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/harfbuzz-ng/src/hb-unicode-private.hh ('k') | third_party/harfbuzz-ng/src/hb-utf-private.hh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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. */
}
}
« no previous file with comments | « third_party/harfbuzz-ng/src/hb-unicode-private.hh ('k') | third_party/harfbuzz-ng/src/hb-utf-private.hh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698