diff --git a/src/hb-open-type-private.hh b/src/hb-open-type-private.hh index 6ad3c0fdef5de67ac1e02897662cd9961b81fa54..2f4e1b9e9e9b988c412f2a5ae9bc160dbe6f871c 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 dfbcf1efa53f85dc1d053ca29add1deab9b1a794..86a74ccb604766019b95dfd8185e353bac4795af 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 e90e46c14d59c7db7e47e6eae91a932f85e1fab4..4c5b3c0f986938cbc33f0cc56ba42937726f57fc 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 ab7d35b43e1abe64bb3a014c46be39f8e56d4b83..2a9357a5e2d19e574fd0d095c476d631cf0f40fb 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