Add _MAX_VALUE to hb_ot_metrics_t (#1861)

This commit is contained in:
Ebrahim Byagowi 2019-07-25 14:49:02 +04:30 committed by GitHub
parent 069872c51b
commit a744fdc6c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -53,7 +53,7 @@ _hb_ot_metrics_get_position_common (hb_font_t *font,
hb_position_t *position /* OUT. May be NULL. */)
{
hb_face_t *face = font->face;
switch ((unsigned int) metrics_tag)
switch ((unsigned) metrics_tag)
{
#ifndef HB_NO_VAR
#define GET_VAR face->table.MVAR->get_var (metrics_tag, font->coords, font->num_coords)
@ -117,7 +117,7 @@ hb_ot_metrics_get_position (hb_font_t *font,
hb_position_t *position /* OUT. May be NULL. */)
{
hb_face_t *face = font->face;
switch (metrics_tag)
switch ((unsigned) metrics_tag)
{
case HB_OT_METRICS_HORIZONTAL_ASCENDER:
case HB_OT_METRICS_HORIZONTAL_DESCENDER:

View File

@ -70,7 +70,9 @@ typedef enum {
HB_OT_METRICS_STRIKEOUT_SIZE = HB_TAG ('s','t','r','s'),
HB_OT_METRICS_STRIKEOUT_OFFSET = HB_TAG ('s','t','r','o'),
HB_OT_METRICS_UNDERLINE_SIZE = HB_TAG ('u','n','d','s'),
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_t;
HB_EXTERN hb_bool_t