summaryrefslogtreecommitdiff
path: root/src/hb-ot-hhea-table.hh
diff options
context:
space:
mode:
authorYoungbok Shin <youngb.shin@samsung.com>2018-04-03 14:01:34 +0900
committerYoungbok Shin <youngb.shin@samsung.com>2018-04-03 14:01:34 +0900
commit1c272a48507bb3c7905aa30d8bf0d092b474f781 (patch)
treeba3189af507d7357414e13ec3c4351cafdd2aea4 /src/hb-ot-hhea-table.hh
parente3a9d0d2fe726180a0456893d22d4aaa3ddb8931 (diff)
downloadharfbuzz-1c272a48507bb3c7905aa30d8bf0d092b474f781.tar.gz
harfbuzz-1c272a48507bb3c7905aa30d8bf0d092b474f781.tar.bz2
harfbuzz-1c272a48507bb3c7905aa30d8bf0d092b474f781.zip
Imported Upstream version 1.7.6upstream/1.7.6
Diffstat (limited to 'src/hb-ot-hhea-table.hh')
-rw-r--r--src/hb-ot-hhea-table.hh29
1 files changed, 12 insertions, 17 deletions
diff --git a/src/hb-ot-hhea-table.hh b/src/hb-ot-hhea-table.hh
index c8e9536..97952b4 100644
--- a/src/hb-ot-hhea-table.hh
+++ b/src/hb-ot-hhea-table.hh
@@ -41,14 +41,9 @@ namespace OT {
#define HB_OT_TAG_hhea HB_TAG('h','h','e','a')
#define HB_OT_TAG_vhea HB_TAG('v','h','e','a')
-
+template <typename T>
struct _hea
{
- static const hb_tag_t tableTag = HB_TAG('_','h','e','a');
-
- static const hb_tag_t hheaTag = HB_OT_TAG_hhea;
- static const hb_tag_t vheaTag = HB_OT_TAG_vhea;
-
inline bool sanitize (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
@@ -69,30 +64,30 @@ struct _hea
* (xMax - xMin)) for horizontal. */
FWORD maxExtent; /* horizontal: Max(lsb + (xMax - xMin)),
* vertical: minLeadingBearing+(yMax-yMin). */
- SHORT caretSlopeRise; /* Used to calculate the slope of the
+ HBINT16 caretSlopeRise; /* Used to calculate the slope of the
* cursor (rise/run); 1 for vertical caret,
* 0 for horizontal.*/
- SHORT caretSlopeRun; /* 0 for vertical caret, 1 for horizontal. */
- SHORT caretOffset; /* The amount by which a slanted
+ HBINT16 caretSlopeRun; /* 0 for vertical caret, 1 for horizontal. */
+ HBINT16 caretOffset; /* The amount by which a slanted
* highlight on a glyph needs
* to be shifted to produce the
* best appearance. Set to 0 for
* non-slanted fonts. */
- SHORT reserved1; /* Set to 0. */
- SHORT reserved2; /* Set to 0. */
- SHORT reserved3; /* Set to 0. */
- SHORT reserved4; /* Set to 0. */
- SHORT metricDataFormat; /* 0 for current format. */
- USHORT numberOfLongMetrics; /* Number of LongMetric entries in metric
+ HBINT16 reserved1; /* Set to 0. */
+ HBINT16 reserved2; /* Set to 0. */
+ HBINT16 reserved3; /* Set to 0. */
+ HBINT16 reserved4; /* Set to 0. */
+ HBINT16 metricDataFormat; /* 0 for current format. */
+ HBUINT16 numberOfLongMetrics; /* Number of LongMetric entries in metric
* table. */
public:
DEFINE_SIZE_STATIC (36);
};
-struct hhea : _hea {
+struct hhea : _hea<hhea> {
static const hb_tag_t tableTag = HB_OT_TAG_hhea;
};
-struct vhea : _hea {
+struct vhea : _hea<vhea> {
static const hb_tag_t tableTag = HB_OT_TAG_vhea;
};