提交 9aa6279a 编写于 作者: E Ebrahim Byagowi

[ot-color/png] Try to get image blob from sbix first options.aat is set

上级 b42661ee
......@@ -310,15 +310,21 @@ hb_ot_color_glyph_reference_blob_png (hb_font_t *font,
unsigned int *strike_x_ppem /* OUT */,
unsigned int *strike_y_ppem /* OUT */)
{
if (_get_cbdt (font->face).has_data ())
return _get_cbdt (font->face).reference_blob_for_glyph (glyph, font->x_ppem, font->y_ppem,
hb_blob_t *blob = hb_blob_get_empty ();
/* don't run cbdt first if aat is set */
if (!hb_options ().aat && _get_cbdt (font->face).has_data ())
blob = _get_cbdt (font->face).reference_blob_for_glyph (glyph, font->x_ppem, font->y_ppem,
strike_x_ppem, strike_y_ppem);
if (_get_sbix (font->face).has_data ())
return _get_sbix (font->face).reference_blob_for_glyph (glyph, font->ptem,
if (_get_sbix (font->face).has_data () && !hb_blob_get_length (blob))
blob = _get_sbix (font->face).reference_blob_for_glyph (glyph, font->ptem,
MAX (font->x_ppem, font->y_ppem),
HB_TAG('p','n','g',' '),
strike_x_ppem, strike_y_ppem);
return hb_blob_get_empty ();
if (hb_options ().aat && _get_cbdt (font->face).has_data () && !hb_blob_get_length (blob))
blob = _get_cbdt (font->face).reference_blob_for_glyph (glyph, font->x_ppem, font->y_ppem,
strike_x_ppem, strike_y_ppem);
return blob;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册