[glyf] Make an optional argument non-optional
This commit is contained in:
parent
3ef590808f
commit
6b82d4faa1
|
@ -210,7 +210,7 @@ struct glyf_accelerator_t
|
||||||
|
|
||||||
bool empty () const { return (min_x >= max_x) || (min_y >= max_y); }
|
bool empty () const { return (min_x >= max_x) || (min_y >= max_y); }
|
||||||
|
|
||||||
void get_extents (hb_font_t *font, hb_glyph_extents_t *extents, bool scaled = true)
|
void get_extents (hb_font_t *font, hb_glyph_extents_t *extents, bool scaled)
|
||||||
{
|
{
|
||||||
if (unlikely (empty ()))
|
if (unlikely (empty ()))
|
||||||
{
|
{
|
||||||
|
@ -240,7 +240,7 @@ struct glyf_accelerator_t
|
||||||
float min_x, min_y, max_x, max_y;
|
float min_x, min_y, max_x, max_y;
|
||||||
} bounds;
|
} bounds;
|
||||||
|
|
||||||
points_aggregator_t (hb_font_t *font_, hb_glyph_extents_t *extents_, contour_point_t *phantoms_, bool scaled_ = true)
|
points_aggregator_t (hb_font_t *font_, hb_glyph_extents_t *extents_, contour_point_t *phantoms_, bool scaled_)
|
||||||
{
|
{
|
||||||
font = font_;
|
font = font_;
|
||||||
extents = extents_;
|
extents = extents_;
|
||||||
|
@ -266,7 +266,7 @@ struct glyf_accelerator_t
|
||||||
|
|
||||||
contour_point_t phantoms[glyf_impl::PHANTOM_COUNT];
|
contour_point_t phantoms[glyf_impl::PHANTOM_COUNT];
|
||||||
if (likely (font->num_coords == gvar->get_axis_count ()))
|
if (likely (font->num_coords == gvar->get_axis_count ()))
|
||||||
success = get_points (font, gid, points_aggregator_t (font, nullptr, phantoms));
|
success = get_points (font, gid, points_aggregator_t (font, nullptr, phantoms, true));
|
||||||
|
|
||||||
if (unlikely (!success))
|
if (unlikely (!success))
|
||||||
return
|
return
|
||||||
|
@ -308,7 +308,7 @@ struct glyf_accelerator_t
|
||||||
|
|
||||||
#ifndef HB_NO_VAR
|
#ifndef HB_NO_VAR
|
||||||
if (font->num_coords)
|
if (font->num_coords)
|
||||||
return get_points (font, gid, points_aggregator_t (font, extents, nullptr));
|
return get_points (font, gid, points_aggregator_t (font, extents, nullptr, true));
|
||||||
#endif
|
#endif
|
||||||
return glyph_for_gid (gid).get_extents (font, *this, extents);
|
return glyph_for_gid (gid).get_extents (font, *this, extents);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue