From 75d33a31f661d9eb98f3d1b4ac180ed5a9dec014 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 25 Jul 2014 17:31:46 +0000 Subject: [PATCH] Revert "Don't pass invalid Unicode codepoint to Skia" After update to HarfBuzz 0.9.33 we don't need this anymore. HarfBuzz takes care of invalid input and passes U+FFFD to us. This reverts commit 4422f4dd941628ad289bcabc75fbd788d37415f6. Change-Id: Icfd0dc836a8d684fb1723fc215aa01f99639ff59 --- libs/minikin/Layout.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/libs/minikin/Layout.cpp b/libs/minikin/Layout.cpp index 21b8362260..01b6599628 100644 --- a/libs/minikin/Layout.cpp +++ b/libs/minikin/Layout.cpp @@ -258,12 +258,6 @@ static hb_bool_t harfbuzzGetGlyph(hb_font_t* hbFont, void* fontData, hb_codepoin MinikinPaint* paint = reinterpret_cast(fontData); MinikinFont* font = paint->font; uint32_t glyph_id; - /* HarfBuzz replaces broken input codepoints with (unsigned int) -1. - * Skia expects valid Unicode. - * Replace invalid codepoints with U+FFFD REPLACEMENT CHARACTER. - */ - if (unicode > 0x10FFFF) - unicode = 0xFFFD; bool ok = font->GetGlyph(unicode, &glyph_id); if (ok) { *glyph = glyph_id; -- GitLab