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 29eb45e667.

Change-Id: Icfd0dc836a8d684fb1723fc215aa01f99639ff59
This commit is contained in:
Behdad Esfahbod
2014-07-25 17:31:46 +00:00
parent 29eb45e667
commit ca5b3e1676

View File

@@ -258,12 +258,6 @@ static hb_bool_t harfbuzzGetGlyph(hb_font_t* hbFont, void* fontData, hb_codepoin
MinikinPaint* paint = reinterpret_cast<MinikinPaint*>(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;