[ot-metrics] Touch up
authorBehdad Esfahbod <behdad@behdad.org>
Thu, 18 Jul 2019 21:15:08 +0000 (14:15 -0700)
committerBehdad Esfahbod <behdad@behdad.org>
Thu, 18 Jul 2019 21:16:11 +0000 (14:16 -0700)
src/harfbuzz.cc
src/hb-ot-hmtx-table.hh

index 8f5bb79..e03d54b 100644 (file)
@@ -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"
index 09df44a..77b0688 100644 (file)
@@ -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<hmtx, hhea> {
   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<vmtx, vhea> {
   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;
 };