[metrics] Rename hb_ot_metrics_t to hb_ot_metrics_tag_t

This commit is contained in:
Ebrahim Byagowi 2019-07-29 22:03:56 +04:30
parent 2c2a2b97db
commit 4e1da6bb61
3 changed files with 22 additions and 22 deletions

View 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));
}

View 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

View 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 */