[paint] Continue returning bool from paint_image()
6ccbfabd4f (commitcomment-94127307)
This commit is contained in:
parent
6ccbfabd4f
commit
f70c5d6f0d
17
src/hb-ft.cc
17
src/hb-ft.cc
|
@ -882,13 +882,16 @@ hb_ft_paint_glyph (hb_font_t *font,
|
|||
if (!hb_font_get_glyph_extents (font, gid, &extents))
|
||||
goto out;
|
||||
|
||||
paint_funcs->image (paint_data,
|
||||
blob,
|
||||
bitmap.width,
|
||||
bitmap.rows,
|
||||
HB_PAINT_IMAGE_FORMAT_BGRA,
|
||||
font->slant_xy,
|
||||
&extents);
|
||||
if (!paint_funcs->image (paint_data,
|
||||
blob,
|
||||
bitmap.width,
|
||||
bitmap.rows,
|
||||
HB_PAINT_IMAGE_FORMAT_BGRA,
|
||||
font->slant_xy,
|
||||
&extents))
|
||||
{
|
||||
/* TODO Try a forced outline load and paint? */
|
||||
}
|
||||
|
||||
out:
|
||||
hb_blob_destroy (blob);
|
||||
|
|
|
@ -961,17 +961,17 @@ struct CBDT
|
|||
extents.x_bearing + extents.width,
|
||||
extents.y_bearing + extents.height);
|
||||
|
||||
funcs->image (data,
|
||||
blob,
|
||||
pixel_extents.width, -pixel_extents.height,
|
||||
HB_PAINT_IMAGE_FORMAT_PNG,
|
||||
font->slant_xy,
|
||||
&extents);
|
||||
bool ret = funcs->image (data,
|
||||
blob,
|
||||
pixel_extents.width, -pixel_extents.height,
|
||||
HB_PAINT_IMAGE_FORMAT_PNG,
|
||||
font->slant_xy,
|
||||
&extents);
|
||||
|
||||
funcs->pop_clip (data);
|
||||
|
||||
hb_blob_destroy (blob);
|
||||
return true;
|
||||
return ret;
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
|
@ -253,15 +253,15 @@ struct sbix
|
|||
if (unlikely (!get_extents (font, glyph, &pixel_extents, false)))
|
||||
return false;
|
||||
|
||||
funcs->image (data,
|
||||
blob,
|
||||
pixel_extents.width, -pixel_extents.height,
|
||||
HB_PAINT_IMAGE_FORMAT_PNG,
|
||||
font->slant_xy,
|
||||
&extents);
|
||||
bool ret = funcs->image (data,
|
||||
blob,
|
||||
pixel_extents.width, -pixel_extents.height,
|
||||
HB_PAINT_IMAGE_FORMAT_PNG,
|
||||
font->slant_xy,
|
||||
&extents);
|
||||
|
||||
hb_blob_destroy (blob);
|
||||
return true;
|
||||
return ret;
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
|
@ -97,15 +97,15 @@ struct hb_paint_funcs_t
|
|||
{ func.color (this, paint_data,
|
||||
is_foreground, color,
|
||||
!user_data ? nullptr : user_data->color); }
|
||||
void image (void *paint_data,
|
||||
bool image (void *paint_data,
|
||||
hb_blob_t *image,
|
||||
unsigned width, unsigned height,
|
||||
hb_tag_t format,
|
||||
float slant,
|
||||
hb_glyph_extents_t *extents)
|
||||
{ func.image (this, paint_data,
|
||||
image, width, height, format, slant, extents,
|
||||
!user_data ? nullptr : user_data->image); }
|
||||
{ return func.image (this, paint_data,
|
||||
image, width, height, format, slant, extents,
|
||||
!user_data ? nullptr : user_data->image); }
|
||||
void linear_gradient (void *paint_data,
|
||||
hb_color_line_t *color_line,
|
||||
float x0, float y0,
|
||||
|
|
Loading…
Reference in New Issue