[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 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 || if (metrics_tag == HB_OT_METRICS_HORIZONTAL_ASCENDER ||
metrics_tag == HB_OT_METRICS_VERTICAL_ASCENDER) metrics_tag == HB_OT_METRICS_VERTICAL_ASCENDER)
@ -49,7 +49,7 @@ _fix_ascender_descender (float value, hb_ot_metrics_t metrics_tag)
to be able to have slim builds without the not always needed parts */ to be able to have slim builds without the not always needed parts */
bool bool
_hb_ot_metrics_get_position_common (hb_font_t *font, _hb_ot_metrics_get_position_common (hb_font_t *font,
hb_ot_metrics_t metrics_tag, hb_ot_metrics_tag_t metrics_tag,
hb_position_t *position /* OUT. May be NULL. */) hb_position_t *position /* OUT. May be NULL. */)
{ {
hb_face_t *face = font->face; hb_face_t *face = font->face;
@ -91,7 +91,7 @@ _hb_ot_metrics_get_position_common (hb_font_t *font,
#if 0 #if 0
static bool 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')); 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; if (&range == &Null (OT::GaspRange)) return false;
@ -121,7 +121,7 @@ _get_gasp (hb_face_t *face, float *result, hb_ot_metrics_t metrics_tag)
**/ **/
hb_bool_t hb_bool_t
hb_ot_metrics_get_position (hb_font_t *font, hb_ot_metrics_get_position (hb_font_t *font,
hb_ot_metrics_t metrics_tag, hb_ot_metrics_tag_t metrics_tag,
hb_position_t *position /* OUT. May be NULL. */) hb_position_t *position /* OUT. May be NULL. */)
{ {
hb_face_t *face = font->face; hb_face_t *face = font->face;
@ -192,7 +192,7 @@ hb_ot_metrics_get_position (hb_font_t *font,
* Since: REPLACEME * Since: REPLACEME
**/ **/
float 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); 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 * Since: REPLACEME
**/ **/
hb_position_t 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)); 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 * Since: REPLACEME
**/ **/
hb_position_t 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)); 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 * 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_UNDERLINE_OFFSET = HB_TAG ('u','n','d','o'),
_HB_OT_METRICS_MAX_VALUE = HB_TAG_MAX_SIGNED /*< skip >*/ _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_EXTERN hb_bool_t
hb_ot_metrics_get_position (hb_font_t *font, hb_ot_metrics_get_position (hb_font_t *font,
hb_ot_metrics_t metrics_tag, hb_ot_metrics_tag_t metrics_tag,
hb_position_t *position /* OUT. May be NULL. */); hb_position_t *position /* OUT. May be NULL. */);
HB_EXTERN float 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_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_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 HB_END_DECLS

View File

@ -29,7 +29,7 @@
HB_INTERNAL bool HB_INTERNAL bool
_hb_ot_metrics_get_position_common (hb_font_t *font, _hb_ot_metrics_get_position_common (hb_font_t *font,
hb_ot_metrics_t metrics_tag, hb_ot_metrics_tag_t metrics_tag,
hb_position_t *position /* OUT. May be NULL. */); hb_position_t *position /* OUT. May be NULL. */);
#endif /* HB_OT_METRICS_HH */ #endif /* HB_OT_METRICS_HH */