[HarfBuzz] harfbuzz: Branch 'master'

Behdad Esfahbod behdad at kemper.freedesktop.org
Tue Aug 7 16:38:23 UTC 2018


 src/hb-font.cc |   36 ++----------------------------------
 1 file changed, 2 insertions(+), 34 deletions(-)

New commits:
commit 3d7c555a19ca0725c386aa6da648ecf2ae50fc19
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Tue Aug 7 09:37:52 2018 -0700

    Remove get_advances_nil and alias it to get_advances_default

diff --git a/src/hb-font.cc b/src/hb-font.cc
index e29b80f4..e084de9b 100644
--- a/src/hb-font.cc
+++ b/src/hb-font.cc
@@ -162,23 +162,7 @@ hb_font_get_glyph_v_advance_default (hb_font_t *font,
   return font->parent_scale_y_distance (font->parent->get_glyph_v_advance (glyph));
 }
 
-static void
-hb_font_get_glyph_h_advances_nil (hb_font_t* font,
-				  void* font_data HB_UNUSED,
-				  unsigned int count,
-				  hb_codepoint_t *first_glyph HB_UNUSED,
-				  unsigned int glyph_stride HB_UNUSED,
-				  hb_position_t *first_advance,
-				  unsigned int advance_stride,
-				  void *user_data HB_UNUSED)
-{
-  for (unsigned int i = 0; i < count; i++)
-  {
-    *first_advance = font->get_glyph_h_advance (*first_glyph);
-    first_glyph = &StructAtOffset<hb_codepoint_t> (first_glyph, glyph_stride);
-    first_advance = &StructAtOffset<hb_position_t> (first_advance, advance_stride);
-  }
-}
+#define hb_font_get_glyph_h_advances_nil hb_font_get_glyph_h_advances_default
 static void
 hb_font_get_glyph_h_advances_default (hb_font_t* font,
 				      void* font_data HB_UNUSED,
@@ -210,23 +194,7 @@ hb_font_get_glyph_h_advances_default (hb_font_t* font,
   }
 }
 
-static void
-hb_font_get_glyph_v_advances_nil (hb_font_t* font,
-				  void* font_data HB_UNUSED,
-				  unsigned int count,
-				  hb_codepoint_t *first_glyph HB_UNUSED,
-				  unsigned int glyph_stride HB_UNUSED,
-				  hb_position_t *first_advance,
-				  unsigned int advance_stride,
-				  void *user_data HB_UNUSED)
-{
-  for (unsigned int i = 0; i < count; i++)
-  {
-    *first_advance = font->get_glyph_v_advance (*first_glyph);
-    first_glyph = &StructAtOffset<hb_codepoint_t> (first_glyph, glyph_stride);
-    first_advance = &StructAtOffset<hb_position_t> (first_advance, advance_stride);
-  }
-}
+#define hb_font_get_glyph_v_advances_nil hb_font_get_glyph_v_advances_default
 static void
 hb_font_get_glyph_v_advances_default (hb_font_t* font,
 				      void* font_data HB_UNUSED,


More information about the HarfBuzz mailing list