From 800760c5bd894687e5ae1ff9b08cc27e5abdfcf6 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sun, 3 Jul 2022 13:21:06 -0600 Subject: [PATCH] [glyf] Rename get_extents functions for clarity --- src/OT/glyf/Glyph.hh | 6 +++--- src/OT/glyf/GlyphHeader.hh | 4 ++-- src/OT/glyf/glyf.hh | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/OT/glyf/Glyph.hh b/src/OT/glyf/Glyph.hh index 590f7a180..31e5437b2 100644 --- a/src/OT/glyf/Glyph.hh +++ b/src/OT/glyf/Glyph.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; } diff --git a/src/OT/glyf/GlyphHeader.hh b/src/OT/glyf/GlyphHeader.hh index c7bf66624..eda22e0ad 100644 --- a/src/OT/glyf/GlyphHeader.hh +++ b/src/OT/glyf/GlyphHeader.hh @@ -14,8 +14,8 @@ struct GlyphHeader bool has_data () const { return numberOfContours; } template - 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); */ diff --git a/src/OT/glyf/glyf.hh b/src/OT/glyf/glyf.hh index 22a17d2d4..f2797757e 100644 --- a/src/OT/glyf/glyf.hh +++ b/src/OT/glyf/glyf.hh @@ -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