Actually add hb_font_get_glyph_[hv]_advances
authorBehdad Esfahbod <behdad@behdad.org>
Tue, 7 Aug 2018 16:47:00 +0000 (09:47 -0700)
committerBehdad Esfahbod <behdad@behdad.org>
Tue, 7 Aug 2018 16:47:00 +0000 (09:47 -0700)
New API:
+hb_font_get_glyph_h_advances
+hb_font_get_glyph_v_advances

src/hb-font.cc
src/hb-font.h

index e084de9..6b6ace8 100644 (file)
@@ -784,6 +784,43 @@ hb_font_get_glyph_v_advance (hb_font_t *font,
 }
 
 /**
+ * hb_font_get_glyph_h_advances:
+ * @font: a font.
+ *
+ * 
+ *
+ * Since: REPLACEME
+ **/
+void
+hb_font_get_glyph_h_advances (hb_font_t* font,
+                             unsigned count,
+                             hb_codepoint_t *first_glyph,
+                             unsigned glyph_stride,
+                             hb_position_t *first_advance,
+                             unsigned advance_stride)
+{
+  font->get_glyph_h_advances (count, first_glyph, glyph_stride, first_advance, advance_stride);
+}
+/**
+ * hb_font_get_glyph_v_advances:
+ * @font: a font.
+ *
+ * 
+ *
+ * Since: REPLACEME
+ **/
+void
+hb_font_get_glyph_v_advances (hb_font_t* font,
+                             unsigned count,
+                             hb_codepoint_t *first_glyph,
+                             unsigned glyph_stride,
+                             hb_position_t *first_advance,
+                             unsigned advance_stride)
+{
+  font->get_glyph_v_advances (count, first_glyph, glyph_stride, first_advance, advance_stride);
+}
+
+/**
  * hb_font_get_glyph_h_origin:
  * @font: a font.
  * @glyph: 
index 181d15e..37c9a67 100644 (file)
@@ -459,6 +459,21 @@ HB_EXTERN hb_position_t
 hb_font_get_glyph_v_advance (hb_font_t *font,
                             hb_codepoint_t glyph);
 
+HB_EXTERN void
+hb_font_get_glyph_h_advances (hb_font_t* font,
+                             unsigned count,
+                             hb_codepoint_t *first_glyph,
+                             unsigned glyph_stride,
+                             hb_position_t *first_advance,
+                             unsigned advance_stride);
+HB_EXTERN void
+hb_font_get_glyph_v_advances (hb_font_t* font,
+                             unsigned count,
+                             hb_codepoint_t *first_glyph,
+                             unsigned glyph_stride,
+                             hb_position_t *first_advance,
+                             unsigned advance_stride);
+
 HB_EXTERN hb_bool_t
 hb_font_get_glyph_h_origin (hb_font_t *font,
                            hb_codepoint_t glyph,