diff --git a/src/harfbuzz.cc b/src/harfbuzz.cc index 8f5bb79a1..e03d54bc4 100644 --- a/src/harfbuzz.cc +++ b/src/harfbuzz.cc @@ -16,6 +16,8 @@ #include "hb-ot-layout.cc" #include "hb-ot-map.cc" #include "hb-ot-math.cc" +#include "hb-ot-metrics-internal.cc" +#include "hb-ot-metrics.cc" #include "hb-ot-name.cc" #include "hb-ot-shape-complex-arabic.cc" #include "hb-ot-shape-complex-default.cc" diff --git a/src/hb-ot-hmtx-table.hh b/src/hb-ot-hmtx-table.hh index 09df44a93..77b068899 100644 --- a/src/hb-ot-hmtx-table.hh +++ b/src/hb-ot-hmtx-table.hh @@ -29,7 +29,6 @@ #include "hb-open-type.hh" #include "hb-ot-hhea-table.hh" -#include "hb-ot-os2-table.hh" #include "hb-ot-var-hvar-table.hh" #include "hb-ot-metrics.hh" @@ -164,9 +163,9 @@ struct hmtxvmtx default_advance = default_advance_ ? default_advance_ : hb_face_get_upem (face); ascender = 0; descender = 0; line_gap = 0; - hb_ot_metrics_get_position_internal (face, (hb_ot_metrics_t) T::ascenderTag, &ascender); - hb_ot_metrics_get_position_internal (face, (hb_ot_metrics_t) T::descenderTag, &descender); - hb_ot_metrics_get_position_internal (face, (hb_ot_metrics_t) T::lineGapTag, &line_gap); + hb_ot_metrics_get_position_internal (face, T::ascenderTag, &ascender); + hb_ot_metrics_get_position_internal (face, T::descenderTag, &descender); + hb_ot_metrics_get_position_internal (face, T::lineGapTag, &line_gap); ascender = fabs (ascender); descender = -fabs (descender); has_font_extents = ascender != 0 || descender != 0; @@ -310,17 +309,17 @@ struct hmtxvmtx struct hmtx : hmtxvmtx { static constexpr hb_tag_t tableTag = HB_OT_TAG_hmtx; static constexpr hb_tag_t variationsTag = HB_OT_TAG_HVAR; - static constexpr hb_tag_t ascenderTag = HB_OT_METRICS_HORIZONTAL_ASCENDER; - static constexpr hb_tag_t descenderTag = HB_OT_METRICS_HORIZONTAL_DESCENDER; - static constexpr hb_tag_t lineGapTag = HB_OT_METRICS_HORIZONTAL_LINE_GAP; + static constexpr hb_ot_metrics_t ascenderTag = HB_OT_METRICS_HORIZONTAL_ASCENDER; + static constexpr hb_ot_metrics_t descenderTag = HB_OT_METRICS_HORIZONTAL_DESCENDER; + static constexpr hb_ot_metrics_t lineGapTag = HB_OT_METRICS_HORIZONTAL_LINE_GAP; static constexpr bool is_horizontal = true; }; struct vmtx : hmtxvmtx { static constexpr hb_tag_t tableTag = HB_OT_TAG_vmtx; static constexpr hb_tag_t variationsTag = HB_OT_TAG_VVAR; - static constexpr hb_tag_t ascenderTag = HB_OT_METRICS_VERTICAL_ASCENDER; - static constexpr hb_tag_t descenderTag = HB_OT_METRICS_VERTICAL_DESCENDER; - static constexpr hb_tag_t lineGapTag = HB_OT_METRICS_VERTICAL_LINE_GAP; + static constexpr hb_ot_metrics_t ascenderTag = HB_OT_METRICS_VERTICAL_ASCENDER; + static constexpr hb_ot_metrics_t descenderTag = HB_OT_METRICS_VERTICAL_DESCENDER; + static constexpr hb_ot_metrics_t lineGapTag = HB_OT_METRICS_VERTICAL_LINE_GAP; static constexpr bool is_horizontal = false; };