From a744fdc6c8217d0d4bfce30e638ed2e5200cf380 Mon Sep 17 00:00:00 2001 From: Ebrahim Byagowi Date: Thu, 25 Jul 2019 14:49:02 +0430 Subject: [PATCH] Add _MAX_VALUE to hb_ot_metrics_t (#1861) --- src/hb-ot-metrics.cc | 4 ++-- src/hb-ot-metrics.h | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/hb-ot-metrics.cc b/src/hb-ot-metrics.cc index 910d826b9..d0694bb51 100644 --- a/src/hb-ot-metrics.cc +++ b/src/hb-ot-metrics.cc @@ -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: diff --git a/src/hb-ot-metrics.h b/src/hb-ot-metrics.h index 4d22837f2..c60ee739c 100644 --- a/src/hb-ot-metrics.h +++ b/src/hb-ot-metrics.h @@ -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