提交 9675a067 编写于 作者: B Behdad Esfahbod

[ot-metrics] Touch up

上级 87e62843
......@@ -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"
......
......@@ -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;
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册