[metrics] Rename hb_ot_metrics_t to hb_ot_metrics_tag_t
authorEbrahim Byagowi <ebrahim@gnu.org>
Mon, 29 Jul 2019 17:33:56 +0000 (22:03 +0430)
committerEbrahim Byagowi <ebrahim@gnu.org>
Mon, 29 Jul 2019 18:13:09 +0000 (22:43 +0430)
src/hb-ot-metrics.cc
src/hb-ot-metrics.h
src/hb-ot-metrics.hh

index 07eb466..d211d7e 100644 (file)
@@ -34,7 +34,7 @@
 
 
 static float
-_fix_ascender_descender (float value, hb_ot_metrics_t metrics_tag)
+_fix_ascender_descender (float value, hb_ot_metrics_tag_t metrics_tag)
 {
   if (metrics_tag == HB_OT_METRICS_HORIZONTAL_ASCENDER ||
       metrics_tag == HB_OT_METRICS_VERTICAL_ASCENDER)
@@ -48,9 +48,9 @@ _fix_ascender_descender (float value, hb_ot_metrics_t metrics_tag)
 /* The common part of _get_position logic needed on hb-ot-font and here
    to be able to have slim builds without the not always needed parts */
 bool
-_hb_ot_metrics_get_position_common (hb_font_t       *font,
-                                   hb_ot_metrics_t  metrics_tag,
-                                   hb_position_t   *position     /* OUT.  May be NULL. */)
+_hb_ot_metrics_get_position_common (hb_font_t           *font,
+                                   hb_ot_metrics_tag_t  metrics_tag,
+                                   hb_position_t       *position     /* OUT.  May be NULL. */)
 {
   hb_face_t *face = font->face;
   switch ((unsigned) metrics_tag)
@@ -91,7 +91,7 @@ _hb_ot_metrics_get_position_common (hb_font_t       *font,
 
 #if 0
 static bool
-_get_gasp (hb_face_t *face, float *result, hb_ot_metrics_t metrics_tag)
+_get_gasp (hb_face_t *face, float *result, hb_ot_metrics_tag_t metrics_tag)
 {
   const OT::GaspRange& range = face->table.gasp->get_gasp_range (metrics_tag - HB_TAG ('g','s','p','0'));
   if (&range == &Null (OT::GaspRange)) return false;
@@ -120,9 +120,9 @@ _get_gasp (hb_face_t *face, float *result, hb_ot_metrics_t metrics_tag)
  * Since: REPLACEME
  **/
 hb_bool_t
-hb_ot_metrics_get_position (hb_font_t       *font,
-                           hb_ot_metrics_t  metrics_tag,
-                           hb_position_t   *position     /* OUT.  May be NULL. */)
+hb_ot_metrics_get_position (hb_font_t           *font,
+                           hb_ot_metrics_tag_t  metrics_tag,
+                           hb_position_t       *position     /* OUT.  May be NULL. */)
 {
   hb_face_t *face = font->face;
   switch ((unsigned) metrics_tag)
@@ -192,7 +192,7 @@ hb_ot_metrics_get_position (hb_font_t       *font,
  * Since: REPLACEME
  **/
 float
-hb_ot_metrics_get_variation (hb_font_t *font, hb_ot_metrics_t metrics_tag)
+hb_ot_metrics_get_variation (hb_font_t *font, hb_ot_metrics_tag_t metrics_tag)
 {
   return font->face->table.MVAR->get_var (metrics_tag, font->coords, font->num_coords);
 }
@@ -207,7 +207,7 @@ hb_ot_metrics_get_variation (hb_font_t *font, hb_ot_metrics_t metrics_tag)
  * Since: REPLACEME
  **/
 hb_position_t
-hb_ot_metrics_get_x_variation (hb_font_t *font, hb_ot_metrics_t metrics_tag)
+hb_ot_metrics_get_x_variation (hb_font_t *font, hb_ot_metrics_tag_t metrics_tag)
 {
   return font->em_scalef_x (hb_ot_metrics_get_variation (font, metrics_tag));
 }
@@ -222,7 +222,7 @@ hb_ot_metrics_get_x_variation (hb_font_t *font, hb_ot_metrics_t metrics_tag)
  * Since: REPLACEME
  **/
 hb_position_t
-hb_ot_metrics_get_y_variation (hb_font_t *font, hb_ot_metrics_t metrics_tag)
+hb_ot_metrics_get_y_variation (hb_font_t *font, hb_ot_metrics_tag_t metrics_tag)
 {
   return font->em_scalef_y (hb_ot_metrics_get_variation (font, metrics_tag));
 }
index c60ee73..6b2747b 100644 (file)
@@ -36,7 +36,7 @@ HB_BEGIN_DECLS
 
 
 /**
- * hb_ot_metrics_t:
+ * hb_ot_metrics_tag_t:
  *
  * From https://docs.microsoft.com/en-us/typography/opentype/spec/mvar#value-tags
  *
@@ -73,21 +73,21 @@ typedef enum {
   HB_OT_METRICS_UNDERLINE_OFFSET               = HB_TAG ('u','n','d','o'),
 
   _HB_OT_METRICS_MAX_VALUE = HB_TAG_MAX_SIGNED /*< skip >*/
-} hb_ot_metrics_t;
+} hb_ot_metrics_tag_t;
 
 HB_EXTERN hb_bool_t
-hb_ot_metrics_get_position (hb_font_t       *font,
-                           hb_ot_metrics_t  metrics_tag,
-                           hb_position_t   *position     /* OUT.  May be NULL. */);
+hb_ot_metrics_get_position (hb_font_t           *font,
+                           hb_ot_metrics_tag_t  metrics_tag,
+                           hb_position_t       *position     /* OUT.  May be NULL. */);
 
 HB_EXTERN float
-hb_ot_metrics_get_variation (hb_font_t *font, hb_ot_metrics_t metrics_tag);
+hb_ot_metrics_get_variation (hb_font_t *font, hb_ot_metrics_tag_t metrics_tag);
 
 HB_EXTERN hb_position_t
-hb_ot_metrics_get_x_variation (hb_font_t *font, hb_ot_metrics_t metrics_tag);
+hb_ot_metrics_get_x_variation (hb_font_t *font, hb_ot_metrics_tag_t metrics_tag);
 
 HB_EXTERN hb_position_t
-hb_ot_metrics_get_y_variation (hb_font_t *font, hb_ot_metrics_t metrics_tag);
+hb_ot_metrics_get_y_variation (hb_font_t *font, hb_ot_metrics_tag_t metrics_tag);
 
 HB_END_DECLS
 
index f9ae46f..19a5e9e 100644 (file)
@@ -28,8 +28,8 @@
 #include "hb.hh"
 
 HB_INTERNAL bool
-_hb_ot_metrics_get_position_common (hb_font_t       *font,
-                                   hb_ot_metrics_t  metrics_tag,
-                                   hb_position_t   *position     /* OUT.  May be NULL. */);
+_hb_ot_metrics_get_position_common (hb_font_t           *font,
+                                   hb_ot_metrics_tag_t  metrics_tag,
+                                   hb_position_t       *position     /* OUT.  May be NULL. */);
 
 #endif /* HB_OT_METRICS_HH */