提交 75d33a31 编写于 作者: B Behdad Esfahbod

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 4422f4dd.

Change-Id: Icfd0dc836a8d684fb1723fc215aa01f99639ff59
上级 4422f4dd
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册