Loading core/jni/android/graphics/HarfbuzzSkia.cpp +1 −16 Original line number Diff line number Diff line Loading @@ -211,22 +211,7 @@ const HB_FontClass harfbuzzSkiaClass = { HB_Error harfbuzzSkiaGetTable(void* voidface, const HB_Tag tag, HB_Byte* buffer, HB_UInt* len) { FontData* data = reinterpret_cast<FontData*>(voidface); SkTypeface* typeface = data->typeFace; const size_t tableSize = SkFontHost::GetTableSize(typeface->uniqueID(), tag); if (!tableSize) return HB_Err_Invalid_Argument; // If Harfbuzz specified a NULL buffer then it's asking for the size of the table. if (!buffer) { *len = tableSize; return HB_Err_Ok; } if (*len < tableSize) return HB_Err_Invalid_Argument; SkFontHost::GetTableData(typeface->uniqueID(), tag, 0, tableSize, buffer); return HB_Err_Ok; } } // namespace android core/jni/android/graphics/TextLayoutCache.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -346,9 +346,6 @@ void TextLayoutCacheValue::initShaperItem(HB_ShaperItem& shaperItem, HB_FontRec* font->x_scale = 1; font->y_scale = 1; shaperItem.font = font; shaperItem.face = HB_NewFace(shaperItem.font, harfbuzzSkiaGetTable); // Reset kerning shaperItem.kerning_applied = false; Loading @@ -360,8 +357,11 @@ void TextLayoutCacheValue::initShaperItem(HB_ShaperItem& shaperItem, HB_FontRec* fontData->flags = paint->getFlags(); fontData->hinting = paint->getHinting(); shaperItem.font = font; shaperItem.font->userData = fontData; shaperItem.face = HB_NewFace(NULL, harfbuzzSkiaGetTable); // We cannot know, ahead of time, how many glyphs a given script run // will produce. We take a guess that script runs will not produce more // than twice as many glyphs as there are code points plus a bit of Loading Loading
core/jni/android/graphics/HarfbuzzSkia.cpp +1 −16 Original line number Diff line number Diff line Loading @@ -211,22 +211,7 @@ const HB_FontClass harfbuzzSkiaClass = { HB_Error harfbuzzSkiaGetTable(void* voidface, const HB_Tag tag, HB_Byte* buffer, HB_UInt* len) { FontData* data = reinterpret_cast<FontData*>(voidface); SkTypeface* typeface = data->typeFace; const size_t tableSize = SkFontHost::GetTableSize(typeface->uniqueID(), tag); if (!tableSize) return HB_Err_Invalid_Argument; // If Harfbuzz specified a NULL buffer then it's asking for the size of the table. if (!buffer) { *len = tableSize; return HB_Err_Ok; } if (*len < tableSize) return HB_Err_Invalid_Argument; SkFontHost::GetTableData(typeface->uniqueID(), tag, 0, tableSize, buffer); return HB_Err_Ok; } } // namespace android
core/jni/android/graphics/TextLayoutCache.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -346,9 +346,6 @@ void TextLayoutCacheValue::initShaperItem(HB_ShaperItem& shaperItem, HB_FontRec* font->x_scale = 1; font->y_scale = 1; shaperItem.font = font; shaperItem.face = HB_NewFace(shaperItem.font, harfbuzzSkiaGetTable); // Reset kerning shaperItem.kerning_applied = false; Loading @@ -360,8 +357,11 @@ void TextLayoutCacheValue::initShaperItem(HB_ShaperItem& shaperItem, HB_FontRec* fontData->flags = paint->getFlags(); fontData->hinting = paint->getHinting(); shaperItem.font = font; shaperItem.font->userData = fontData; shaperItem.face = HB_NewFace(NULL, harfbuzzSkiaGetTable); // We cannot know, ahead of time, how many glyphs a given script run // will produce. We take a guess that script runs will not produce more // than twice as many glyphs as there are code points plus a bit of Loading