Replace hb_face_reference_table with hb_ot_color_has_png in isColorBitmapFont (flutter/engine#7686)

This commit is contained in:
Yunyu Lin
2019-02-04 19:59:12 -05:00
committed by Jason Simmons
parent 63ecc7eba6
commit 5ae6ae6c16

View File

@@ -286,8 +286,7 @@ hb_font_funcs_t* getHbFontFuncs(bool forColorBitmapFont) {
static bool isColorBitmapFont(hb_font_t* font) {
hb_face_t* face = hb_font_get_face(font);
HbBlob cbdt(hb_face_reference_table(face, HB_TAG('C', 'B', 'D', 'T')));
return cbdt.size() > 0;
return hb_ot_color_has_png(face);
}
static float HBFixedToFloat(hb_position_t v) {