[ot-color/png] Try to get image blob from sbix first options.aat is set
This commit is contained in:
parent
b42661ee91
commit
9aa6279a2d
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue