|
|
|
@ -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; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|