diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2017-01-22 20:28:56 -0800 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2017-01-22 20:28:56 -0800 |
commit | 5e156fa5ed33cd1a8ff388833563f15930bb12f9 (patch) | |
tree | 33301b81a8df935399727b8178147640f5fce4b4 | |
parent | d6bdbbca307d1a4aed60a78133eea40a1a9d5bf3 (diff) | |
download | harfbuzz_ng-5e156fa5ed33cd1a8ff388833563f15930bb12f9.tar.gz |
Add LOffsetTo<>
-rw-r--r-- | src/hb-open-file-private.hh | 2 | ||||
-rw-r--r-- | src/hb-open-type-private.hh | 1 | ||||
-rw-r--r-- | src/hb-ot-cbdt-table.hh | 4 | ||||
-rw-r--r-- | src/hb-ot-cmap-table.hh | 6 | ||||
-rw-r--r-- | src/hb-ot-layout-common-private.hh | 10 | ||||
-rw-r--r-- | src/hb-ot-layout-gdef-table.hh | 4 | ||||
-rw-r--r-- | src/hb-ot-layout-gsubgpos-private.hh | 2 |
7 files changed, 15 insertions, 14 deletions
diff --git a/src/hb-open-file-private.hh b/src/hb-open-file-private.hh index 5357ddcf5..f208419aa 100644 --- a/src/hb-open-file-private.hh +++ b/src/hb-open-file-private.hh @@ -142,7 +142,7 @@ struct TTCHeaderVersion1 Tag ttcTag; /* TrueType Collection ID string: 'ttcf' */ FixedVersion<>version; /* Version of the TTC Header (1.0), * 0x00010000u */ - ArrayOf<OffsetTo<OffsetTable, ULONG>, ULONG> + ArrayOf<LOffsetTo<OffsetTable>, ULONG> table; /* Array of offsets to the OffsetTable for each font * from the beginning of the file */ public: diff --git a/src/hb-open-type-private.hh b/src/hb-open-type-private.hh index 8845e3eee..8bd361868 100644 --- a/src/hb-open-type-private.hh +++ b/src/hb-open-type-private.hh @@ -830,6 +830,7 @@ struct OffsetTo : Offset<OffsetType> } DEFINE_SIZE_STATIC (sizeof(OffsetType)); }; +template <typename Type> struct LOffsetTo : OffsetTo<Type, ULONG> {}; template <typename Base, typename OffsetType, typename Type> static inline const Type& operator + (const Base &base, const OffsetTo<Type, OffsetType> &offset) { return offset (base); } template <typename Base, typename OffsetType, typename Type> diff --git a/src/hb-ot-cbdt-table.hh b/src/hb-ot-cbdt-table.hh index 52897abd3..93cf0e853 100644 --- a/src/hb-ot-cbdt-table.hh +++ b/src/hb-ot-cbdt-table.hh @@ -216,7 +216,7 @@ struct IndexSubtableRecord USHORT firstGlyphIndex; USHORT lastGlyphIndex; - OffsetTo<IndexSubtable, ULONG> offsetToSubtable; + LOffsetTo<IndexSubtable> offsetToSubtable; DEFINE_SIZE_STATIC(8); }; @@ -275,7 +275,7 @@ struct BitmapSizeTable } protected: - OffsetTo<IndexSubtableArray, ULONG> indexSubtableArrayOffset; + LOffsetTo<IndexSubtableArray> indexSubtableArrayOffset; ULONG indexTablesSize; ULONG numberOfIndexSubtables; ULONG colorRef; diff --git a/src/hb-ot-cmap-table.hh b/src/hb-ot-cmap-table.hh index d7a94a1ef..3a53a1cb5 100644 --- a/src/hb-ot-cmap-table.hh +++ b/src/hb-ot-cmap-table.hh @@ -380,9 +380,9 @@ struct VariationSelectorRecord } UINT24 varSelector; /* Variation selector. */ - OffsetTo<DefaultUVS, ULONG> + LOffsetTo<DefaultUVS> defaultUVS; /* Offset to Default UVS Table. May be 0. */ - OffsetTo<NonDefaultUVS, ULONG> + LOffsetTo<NonDefaultUVS> nonDefaultUVS; /* Offset to Non-Default UVS Table. May be 0. */ public: DEFINE_SIZE_STATIC (11); @@ -486,7 +486,7 @@ struct EncodingRecord USHORT platformID; /* Platform ID. */ USHORT encodingID; /* Platform-specific encoding ID. */ - OffsetTo<CmapSubtable, ULONG> + LOffsetTo<CmapSubtable> subtable; /* Byte offset from beginning of table to the subtable for this encoding. */ public: DEFINE_SIZE_STATIC (8); diff --git a/src/hb-ot-layout-common-private.hh b/src/hb-ot-layout-common-private.hh index 62ca7a348..2f83497b4 100644 --- a/src/hb-ot-layout-common-private.hh +++ b/src/hb-ot-layout-common-private.hh @@ -1334,7 +1334,7 @@ struct VariationStore protected: USHORT format; - OffsetTo<VarRegionList, ULONG> regions; + LOffsetTo<VarRegionList> regions; OffsetArrayOf<VarData, ULONG> dataSets; public: DEFINE_SIZE_ARRAY (8, dataSets); @@ -1433,8 +1433,8 @@ struct FeatureTableSubstitutionRecord } protected: - USHORT featureIndex; - OffsetTo<Feature, ULONG> feature; + USHORT featureIndex; + LOffsetTo<Feature> feature; public: DEFINE_SIZE_STATIC (6); }; @@ -1481,9 +1481,9 @@ struct FeatureVariationRecord } protected: - OffsetTo<ConditionSet, ULONG> + LOffsetTo<ConditionSet> conditions; - OffsetTo<FeatureTableSubstitution, ULONG> + LOffsetTo<FeatureTableSubstitution> substitutions; public: DEFINE_SIZE_STATIC (8); diff --git a/src/hb-ot-layout-gdef-table.hh b/src/hb-ot-layout-gdef-table.hh index b70cbb7a3..552df0fd8 100644 --- a/src/hb-ot-layout-gdef-table.hh +++ b/src/hb-ot-layout-gdef-table.hh @@ -295,7 +295,7 @@ struct MarkGlyphSetsFormat1 protected: USHORT format; /* Format identifier--format = 1 */ - ArrayOf<OffsetTo<Coverage, ULONG> > + ArrayOf<LOffsetTo<Coverage> > coverage; /* Array of long offsets to mark set * coverage tables */ public: @@ -443,7 +443,7 @@ struct GDEF * definitions--from beginning of GDEF * header (may be NULL). Introduced * in version 0x00010002. */ - OffsetTo<VariationStore, ULONG> + LOffsetTo<VariationStore> varStore; /* Offset to the table of Item Variation * Store--from beginning of GDEF * header (may be NULL). Introduced diff --git a/src/hb-ot-layout-gsubgpos-private.hh b/src/hb-ot-layout-gsubgpos-private.hh index fd75c5425..b7a0122a3 100644 --- a/src/hb-ot-layout-gsubgpos-private.hh +++ b/src/hb-ot-layout-gsubgpos-private.hh @@ -2313,7 +2313,7 @@ struct GSUBGPOS featureList; /* FeatureList table */ OffsetTo<LookupList> lookupList; /* LookupList table */ - OffsetTo<FeatureVariations, ULONG> + LOffsetTo<FeatureVariations> featureVars; /* Offset to Feature Variations table--from beginning of table * (may be NULL). Introduced |