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

Unified Diff: third_party/harfbuzz-ng/src/hb-ot-shape-normalize.cc

Issue 396393005: Roll HarfBuzz to 0.9.32 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
Index: third_party/harfbuzz-ng/src/hb-ot-shape-normalize.cc
diff --git a/third_party/harfbuzz-ng/src/hb-ot-shape-normalize.cc b/third_party/harfbuzz-ng/src/hb-ot-shape-normalize.cc
index 2a6a4390030313bd265d067db2d502a04b4d95d8..7a9f24c726657faa99ef27a6979980a92a1cef48 100644
--- a/third_party/harfbuzz-ng/src/hb-ot-shape-normalize.cc
+++ b/third_party/harfbuzz-ng/src/hb-ot-shape-normalize.cc
@@ -209,7 +209,14 @@ decompose_current_character (const hb_ot_shape_normalize_context_t *c, bool shor
else if (decompose_compatibility (c, buffer->cur().codepoint))
skip_char (buffer);
else
+ {
+ /* Not found, not decomposible; If codepoint is invalid Unicode and
+ * font supports U+FFFD REPLACEMENT CHARACTER, use that instead. */
+ hb_codepoint_t FFFD_glyph;
+ if (buffer->cur().codepoint > 0x10FFFFu && c->font->get_glyph (0xFFFDu, 0, &FFFD_glyph))
+ glyph = FFFD_glyph;
next_char (buffer, glyph); /* glyph is initialized in earlier branches. */
+ }
}
static inline void

Powered by Google App Engine
This is Rietveld 408576698