[glyf] Rename advance functions for clarity

pull/3707/head
Behdad Esfahbod 2 years ago
parent 35c00c1216
commit b2d60cbd6e
  1. 2
      src/OT/glyf/glyf.hh
  2. 4
      src/hb-ot-font.cc
  3. 4
      src/hb-ot-hmtx-table.hh

@ -258,7 +258,7 @@ struct glyf_accelerator_t
public:
unsigned
get_advance_var (hb_font_t *font, hb_codepoint_t gid, bool is_vertical) const
get_advance_with_var_unscaled (hb_font_t *font, hb_codepoint_t gid, bool is_vertical) const
{
if (unlikely (gid >= num_glyphs)) return 0;

@ -521,9 +521,9 @@ _glyf_get_side_bearing_var (hb_font_t *font, hb_codepoint_t glyph, bool is_verti
}
unsigned
_glyf_get_advance_var (hb_font_t *font, hb_codepoint_t glyph, bool is_vertical)
_glyf_get_advance_with_var_unscaled (hb_font_t *font, hb_codepoint_t glyph, bool is_vertical)
{
return font->face->table.glyf->get_advance_var (font, glyph, is_vertical);
return font->face->table.glyf->get_advance_with_var_unscaled (font, glyph, is_vertical);
}
#endif

@ -47,7 +47,7 @@ HB_INTERNAL int
_glyf_get_side_bearing_var (hb_font_t *font, hb_codepoint_t glyph, bool is_vertical);
HB_INTERNAL unsigned
_glyf_get_advance_var (hb_font_t *font, hb_codepoint_t glyph, bool is_vertical);
_glyf_get_advance_with_var_unscaled (hb_font_t *font, hb_codepoint_t glyph, bool is_vertical);
namespace OT {
@ -299,7 +299,7 @@ struct hmtxvmtx
font->coords, font->num_coords,
store_cache)); // TODO Optimize?!
return _glyf_get_advance_var (font, glyph, T::tableTag == HB_OT_TAG_vmtx);
return _glyf_get_advance_with_var_unscaled (font, glyph, T::tableTag == HB_OT_TAG_vmtx);
#else
return advance;
#endif

Loading…
Cancel
Save