diff --git a/src/hb-open-type-private.hh b/src/hb-open-type-private.hh index 6ad3c0fde..2f4e1b9e9 100644 --- a/src/hb-open-type-private.hh +++ b/src/hb-open-type-private.hh @@ -705,7 +705,7 @@ struct Index : UINT16 { DEFINE_NULL_DATA (Index, "\xff\xff"); /* Offset, Null offset = 0 */ -template +template struct Offset : Type { inline bool is_null (void) const { return 0 == *this; } @@ -713,6 +713,9 @@ struct Offset : Type DEFINE_SIZE_STATIC (sizeof(Type)); }; +typedef Offset Offset16; +typedef Offset Offset32; + /* CheckSum */ struct CheckSum : UINT32 diff --git a/src/hb-ot-layout-common-private.hh b/src/hb-ot-layout-common-private.hh index dfbcf1efa..86a74ccb6 100644 --- a/src/hb-ot-layout-common-private.hh +++ b/src/hb-ot-layout-common-private.hh @@ -216,7 +216,7 @@ struct LangSys return_trace (c->check_struct (this) && featureIndex.sanitize (c)); } - Offset<> lookupOrderZ; /* = Null (reserved for an offset to a + Offset16 lookupOrderZ; /* = Null (reserved for an offset to a * reordering table) */ UINT16 reqFeatureIndex;/* Index of a feature required for this * language system--if no required features @@ -662,7 +662,7 @@ struct Lookup private: UINT16 lookupType; /* Different enumerations for GSUB and GPOS */ UINT16 lookupFlag; /* Lookup qualifiers */ - ArrayOf > + ArrayOf subTable; /* Array of SubTables */ UINT16 markFilteringSetX[VAR]; /* Index (base 0) into GDEF mark glyph sets * structure. This field is only present if bit diff --git a/src/hb-ot-name-table.hh b/src/hb-ot-name-table.hh index e90e46c14..4c5b3c0f9 100644 --- a/src/hb-ot-name-table.hh +++ b/src/hb-ot-name-table.hh @@ -125,7 +125,7 @@ struct name /* We only implement format 0 for now. */ UINT16 format; /* Format selector (=0/1). */ UINT16 count; /* Number of name records. */ - Offset<> stringOffset; /* Offset to start of string storage (from start of table). */ + Offset16 stringOffset; /* Offset to start of string storage (from start of table). */ NameRecord nameRecord[VAR]; /* The name records where count is the number of records. */ public: DEFINE_SIZE_ARRAY (6, nameRecord); diff --git a/src/hb-ot-var-fvar-table.hh b/src/hb-ot-var-fvar-table.hh index ab7d35b43..2a9357a5e 100644 --- a/src/hb-ot-var-fvar-table.hh +++ b/src/hb-ot-var-fvar-table.hh @@ -186,7 +186,7 @@ struct fvar protected: FixedVersion<>version; /* Version of the fvar table * initially set to 0x00010000u */ - Offset<> things; /* Offset in bytes from the beginning of the table + Offset16 things; /* Offset in bytes from the beginning of the table * to the start of the AxisRecord array. */ UINT16 reserved; /* This field is permanently reserved. Set to 2. */ UINT16 axisCount; /* The number of variation axes in the font (the