[glyf] Rename get_extents functions for clarity

pull/3707/head
Behdad Esfahbod 2 years ago
parent ab327f93b7
commit 800760c5bd
  1. 6
      src/OT/glyf/Glyph.hh
  2. 4
      src/OT/glyf/GlyphHeader.hh
  3. 2
      src/OT/glyf/glyf.hh

@ -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; }

@ -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); */

@ -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

Loading…
Cancel
Save