[glyf] Rename get_extents functions for clarity

This commit is contained in:
Behdad Esfahbod 2022-07-03 13:21:06 -06:00
parent ab327f93b7
commit 800760c5bd
3 changed files with 6 additions and 6 deletions

View File

@ -198,11 +198,11 @@ struct Glyph
return !all_points.in_error ();
}
bool get_extents (hb_font_t *font, const glyf_accelerator_t &glyf_accelerator,
hb_glyph_extents_t *extents) const
bool get_extents_without_var_scaled (hb_font_t *font, const glyf_accelerator_t &glyf_accelerator,
hb_glyph_extents_t *extents) const
{
if (type == EMPTY) return true; /* Empty glyph; zero extents. */
return header->get_extents (font, glyf_accelerator, gid, extents);
return header->get_extents_without_var_scaled (font, glyf_accelerator, gid, extents);
}
hb_bytes_t get_bytes () const { return bytes; }

View File

@ -14,8 +14,8 @@ struct GlyphHeader
bool has_data () const { return numberOfContours; }
template <typename accelerator_t>
bool get_extents (hb_font_t *font, const accelerator_t &glyf_accelerator,
hb_codepoint_t gid, hb_glyph_extents_t *extents) const
bool get_extents_without_var_scaled (hb_font_t *font, const accelerator_t &glyf_accelerator,
hb_codepoint_t gid, hb_glyph_extents_t *extents) const
{
/* Undocumented rasterizer behavior: shift glyph to the left by (lsb - xMin), i.e., xMin = lsb */
/* extents->x_bearing = hb_min (glyph_header.xMin, glyph_header.xMax); */

View File

@ -310,7 +310,7 @@ struct glyf_accelerator_t
if (font->num_coords)
return get_points (font, gid, points_aggregator_t (font, extents, nullptr, true));
#endif
return glyph_for_gid (gid).get_extents (font, *this, extents);
return glyph_for_gid (gid).get_extents_without_var_scaled (font, *this, extents);
}
const glyf_impl::Glyph