diff --git a/src/hb-aat-layout-ankr-table.hh b/src/hb-aat-layout-ankr-table.hh index f2785a6f5..0b46c06dd 100644 --- a/src/hb-aat-layout-ankr-table.hh +++ b/src/hb-aat-layout-ankr-table.hh @@ -64,7 +64,7 @@ struct ankr unsigned int i, unsigned int num_glyphs) const { - const NNOffsetTo *offset = (this+lookupTable).get_value (glyph_id, num_glyphs); + const NNOffset16To *offset = (this+lookupTable).get_value (glyph_id, num_glyphs); if (!offset) return Null (Anchor); const GlyphAnchors &anchors = &(this+anchorData) + *offset; @@ -83,9 +83,9 @@ struct ankr protected: HBUINT16 version; /* Version number (set to zero) */ HBUINT16 flags; /* Flags (currently unused; set to zero) */ - LOffsetTo>> + Offset32To>> lookupTable; /* Offset to the table's lookup table */ - LNNOffsetTo + NNOffset32To anchorData; /* Offset to the glyph data table */ public: diff --git a/src/hb-aat-layout-common.hh b/src/hb-aat-layout-common.hh index 2507434c7..ed73960c8 100644 --- a/src/hb-aat-layout-common.hh +++ b/src/hb-aat-layout-common.hh @@ -164,7 +164,7 @@ struct LookupSegmentArray HBGlyphID last; /* Last GlyphID in this segment */ HBGlyphID first; /* First GlyphID in this segment */ - NNOffsetTo> + NNOffset16To> valuesZ; /* A 16-bit offset from the start of * the table to the data. */ public: diff --git a/src/hb-aat-layout-feat-table.hh b/src/hb-aat-layout-feat-table.hh index 359e859cf..573f0cf9f 100644 --- a/src/hb-aat-layout-feat-table.hh +++ b/src/hb-aat-layout-feat-table.hh @@ -144,7 +144,7 @@ struct FeatureName protected: HBUINT16 feature; /* Feature type. */ HBUINT16 nSettings; /* The number of records in the setting name array. */ - LNNOffsetTo> + NNOffset32To> settingTableZ; /* Offset in bytes from the beginning of this table to * this feature's setting name array. The actual type of * record this offset refers to will depend on the diff --git a/src/hb-aat-layout-just-table.hh b/src/hb-aat-layout-just-table.hh index 49506e9f5..f6e73d8ea 100644 --- a/src/hb-aat-layout-just-table.hh +++ b/src/hb-aat-layout-just-table.hh @@ -358,20 +358,20 @@ struct JustificationHeader } protected: - OffsetTo + Offset16To justClassTable; /* Offset to the justification category state table. */ - OffsetTo + Offset16To wdcTable; /* Offset from start of justification table to start * of the subtable containing the width delta factors * for the glyphs in your font. * * The width delta clusters table. */ - OffsetTo + Offset16To pcTable; /* Offset from start of justification table to start * of postcompensation subtable (set to zero if none). * * The postcompensation subtable, if present in the font. */ - Lookup> + Lookup> lookupTable; /* Lookup table associating glyphs with width delta * clusters. See the description of Width Delta Clusters * table for details on how to interpret the lookup values. */ @@ -398,13 +398,13 @@ struct just FixedVersion<>version; /* Version of the justification table * (0x00010000u for version 1.0). */ HBUINT16 format; /* Format of the justification table (set to 0). */ - OffsetTo + Offset16To horizData; /* Byte offset from the start of the justification table * to the header for tables that contain justification * information for horizontal text. * If you are not including this information, * store 0. */ - OffsetTo + Offset16To vertData; /* ditto, vertical */ public: diff --git a/src/hb-aat-layout-kerx-table.hh b/src/hb-aat-layout-kerx-table.hh index 1cd412164..d0eacf0e6 100644 --- a/src/hb-aat-layout-kerx-table.hh +++ b/src/hb-aat-layout-kerx-table.hh @@ -710,18 +710,18 @@ struct KerxSubTableFormat6 { struct Long { - LNNOffsetTo> rowIndexTable; - LNNOffsetTo> columnIndexTable; - LNNOffsetTo> array; + NNOffset32To> rowIndexTable; + NNOffset32To> columnIndexTable; + NNOffset32To> array; } l; struct Short { - LNNOffsetTo> rowIndexTable; - LNNOffsetTo> columnIndexTable; - LNNOffsetTo> array; + NNOffset32To> rowIndexTable; + NNOffset32To> columnIndexTable; + NNOffset32To> array; } s; } u; - LNNOffsetTo> vector; + NNOffset32To> vector; public: DEFINE_SIZE_STATIC (KernSubTableHeader::static_size + 24); }; diff --git a/src/hb-aat-layout-opbd-table.hh b/src/hb-aat-layout-opbd-table.hh index 8c04a6482..b1a151282 100644 --- a/src/hb-aat-layout-opbd-table.hh +++ b/src/hb-aat-layout-opbd-table.hh @@ -58,7 +58,7 @@ struct opbdFormat0 bool get_bounds (hb_font_t *font, hb_codepoint_t glyph_id, hb_glyph_extents_t *extents, const void *base) const { - const OffsetTo *bounds_offset = lookupTable.get_value (glyph_id, font->face->get_num_glyphs ()); + const Offset16To *bounds_offset = lookupTable.get_value (glyph_id, font->face->get_num_glyphs ()); if (!bounds_offset) return false; const OpticalBounds &bounds = base+*bounds_offset; @@ -79,7 +79,7 @@ struct opbdFormat0 } protected: - Lookup> + Lookup> lookupTable; /* Lookup table associating glyphs with the four * int16 values for the left-side, top-side, * right-side, and bottom-side optical bounds. */ @@ -92,7 +92,7 @@ struct opbdFormat1 bool get_bounds (hb_font_t *font, hb_codepoint_t glyph_id, hb_glyph_extents_t *extents, const void *base) const { - const OffsetTo *bounds_offset = lookupTable.get_value (glyph_id, font->face->get_num_glyphs ()); + const Offset16To *bounds_offset = lookupTable.get_value (glyph_id, font->face->get_num_glyphs ()); if (!bounds_offset) return false; const OpticalBounds &bounds = base+*bounds_offset; @@ -116,7 +116,7 @@ struct opbdFormat1 } protected: - Lookup> + Lookup> lookupTable; /* Lookup table associating glyphs with the four * int16 values for the left-side, top-side, * right-side, and bottom-side optical bounds. */ diff --git a/src/hb-aat-layout-trak-table.hh b/src/hb-aat-layout-trak-table.hh index baa1c7202..68bcb2396 100644 --- a/src/hb-aat-layout-trak-table.hh +++ b/src/hb-aat-layout-trak-table.hh @@ -66,7 +66,7 @@ struct TrackTableEntry NameID trackNameID; /* The 'name' table index for this track. * (a short word or phrase like "loose" * or "very tight") */ - NNOffsetTo> + NNOffset16To> valuesZ; /* Offset from start of tracking table to * per-size tracking values for this track. */ @@ -141,7 +141,7 @@ struct TrackData protected: HBUINT16 nTracks; /* Number of separate tracks included in this table. */ HBUINT16 nSizes; /* Number of point sizes included in this table. */ - LNNOffsetTo> + NNOffset32To> sizeTable; /* Offset from start of the tracking table to * Array[nSizes] of size values.. */ UnsizedArrayOf @@ -212,10 +212,10 @@ struct trak FixedVersion<>version; /* Version of the tracking table * (0x00010000u for version 1.0). */ HBUINT16 format; /* Format of the tracking table (set to 0). */ - OffsetTo + Offset16To horizData; /* Offset from start of tracking table to TrackData * for horizontal text (or 0 if none). */ - OffsetTo + Offset16To vertData; /* Offset from start of tracking table to TrackData * for vertical text (or 0 if none). */ HBUINT16 reserved; /* Reserved. Set to 0. */ diff --git a/src/hb-aat-ltag-table.hh b/src/hb-aat-ltag-table.hh index 711f9aa6c..14833cb38 100644 --- a/src/hb-aat-ltag-table.hh +++ b/src/hb-aat-ltag-table.hh @@ -50,7 +50,7 @@ struct FTStringRange } protected: - NNOffsetTo> + NNOffset16To> tag; /* Offset from the start of the table to * the beginning of the string */ HBUINT16 length; /* String length (in bytes) */ diff --git a/src/hb-open-file.hh b/src/hb-open-file.hh index 54c07ff13..20ed56cdf 100644 --- a/src/hb-open-file.hh +++ b/src/hb-open-file.hh @@ -218,7 +218,7 @@ struct TTCHeaderVersion1 Tag ttcTag; /* TrueType Collection ID string: 'ttcf' */ FixedVersion<>version; /* Version of the TTC Header (1.0), * 0x00010000u */ - LArrayOf> + LArrayOf> table; /* Array of offsets to the OffsetTable for each font * from the beginning of the file */ public: @@ -295,7 +295,7 @@ struct ResourceRecord HBINT16 nameOffset; /* Offset from beginning of resource name list * to resource name, -1 means there is none. */ HBUINT8 attrs; /* Resource attributes */ - NNOffsetTo, HBUINT24> + NNOffset24To> offset; /* Offset from beginning of data block to * data for this resource */ HBUINT32 reserved; /* Reserved for handle to resource */ @@ -330,7 +330,7 @@ struct ResourceTypeRecord protected: Tag tag; /* Resource type. */ HBUINT16 resCountM1; /* Number of resources minus 1. */ - NNOffsetTo> + NNOffset16To> resourcesZ; /* Offset from beginning of resource type list * to reference item list for this type. */ public: @@ -386,7 +386,7 @@ struct ResourceMap HBUINT32 reserved1; /* Reserved for handle to next resource map */ HBUINT16 resreved2; /* Reserved for file reference number */ HBUINT16 attrs; /* Resource fork attribute */ - NNOffsetTo> + NNOffset16To> typeList; /* Offset from beginning of map to * resource type list */ Offset16 nameList; /* Offset from beginning of map to @@ -418,10 +418,10 @@ struct ResourceForkHeader } protected: - LNNOffsetTo> + NNOffset32To> data; /* Offset from beginning of resource fork * to resource data */ - LNNOffsetTo + NNOffset32To map; /* Offset from beginning of resource fork * to resource map */ HBUINT32 dataLen; /* Length of resource data */ diff --git a/src/hb-open-type.hh b/src/hb-open-type.hh index 11194c31e..1fdc15947 100644 --- a/src/hb-open-type.hh +++ b/src/hb-open-type.hh @@ -410,12 +410,14 @@ struct OffsetTo : Offset DEFINE_SIZE_STATIC (sizeof (OffsetType)); }; /* Partial specializations. */ -template -using LOffsetTo = OffsetTo; -template -using NNOffsetTo = OffsetTo; -template -using LNNOffsetTo = LOffsetTo; +template using Offset16To = OffsetTo; +template using Offset24To = OffsetTo; +template using Offset32To = OffsetTo; + +template using NNOffsetTo = OffsetTo; +template using NNOffset16To = Offset16To; +template using NNOffset24To = Offset24To; +template using NNOffset32To = Offset32To; /* diff --git a/src/hb-ot-cmap-table.hh b/src/hb-ot-cmap-table.hh index 97cd0f526..aaad14d38 100644 --- a/src/hb-ot-cmap-table.hh +++ b/src/hb-ot-cmap-table.hh @@ -1045,9 +1045,9 @@ struct VariationSelectorRecord } HBUINT24 varSelector; /* Variation selector. */ - LOffsetTo + Offset32To defaultUVS; /* Offset to Default UVS Table. May be 0. */ - LOffsetTo + Offset32To nonDefaultUVS; /* Offset to Non-Default UVS Table. May be 0. */ public: DEFINE_SIZE_STATIC (11); @@ -1344,7 +1344,7 @@ struct EncodingRecord HBUINT16 platformID; /* Platform ID. */ HBUINT16 encodingID; /* Platform-specific encoding ID. */ - LOffsetTo + Offset32To subtable; /* Byte offset from beginning of table to the subtable for this encoding. */ public: DEFINE_SIZE_STATIC (8); diff --git a/src/hb-ot-color-cbdt-table.hh b/src/hb-ot-color-cbdt-table.hh index e285acec3..48ea9b015 100644 --- a/src/hb-ot-color-cbdt-table.hh +++ b/src/hb-ot-color-cbdt-table.hh @@ -510,7 +510,7 @@ struct IndexSubtableRecord HBGlyphID firstGlyphIndex; HBGlyphID lastGlyphIndex; - LOffsetTo offsetToSubtable; + Offset32To offsetToSubtable; public: DEFINE_SIZE_STATIC (8); }; @@ -672,7 +672,7 @@ struct BitmapSizeTable } protected: - LNNOffsetTo + NNOffset32To indexSubtableArrayOffset; HBUINT32 indexTablesSize; HBUINT32 numberOfIndexSubtables; diff --git a/src/hb-ot-color-colr-table.hh b/src/hb-ot-color-colr-table.hh index e2a1ff466..2f78e64df 100644 --- a/src/hb-ot-color-colr-table.hh +++ b/src/hb-ot-color-colr-table.hh @@ -263,9 +263,9 @@ struct COLR protected: HBUINT16 version; /* Table version number (starts at 0). */ HBUINT16 numBaseGlyphs; /* Number of Base Glyph Records. */ - LNNOffsetTo> + NNOffset32To> baseGlyphsZ; /* Offset to Base Glyph records. */ - LNNOffsetTo> + NNOffset32To> layersZ; /* Offset to Layer Records. */ HBUINT16 numLayers; /* Number of Layer Records. */ public: diff --git a/src/hb-ot-color-cpal-table.hh b/src/hb-ot-color-cpal-table.hh index fa7d3207b..2fa99dead 100644 --- a/src/hb-ot-color-cpal-table.hh +++ b/src/hb-ot-color-cpal-table.hh @@ -87,15 +87,15 @@ struct CPALV1Tail } protected: - LNNOffsetTo> + NNOffset32To> paletteFlagsZ; /* Offset from the beginning of CPAL table to * the Palette Type Array. Set to 0 if no array * is provided. */ - LNNOffsetTo> + NNOffset32To> paletteLabelsZ; /* Offset from the beginning of CPAL table to * the palette labels array. Set to 0 if no * array is provided. */ - LNNOffsetTo> + NNOffset32To> colorLabelsZ; /* Offset from the beginning of CPAL table to * the color labels array. Set to 0 * if no array is provided. */ @@ -173,7 +173,7 @@ struct CPAL HBUINT16 numPalettes; /* Number of palettes in the table. */ HBUINT16 numColorRecords; /* Total number of color records, combined for * all palettes. */ - LNNOffsetTo> + NNOffset32To> colorRecordsZ; /* Offset from the beginning of CPAL table to * the first ColorRecord. */ UnsizedArrayOf diff --git a/src/hb-ot-color-sbix-table.hh b/src/hb-ot-color-sbix-table.hh index 09da11597..92f104e46 100644 --- a/src/hb-ot-color-sbix-table.hh +++ b/src/hb-ot-color-sbix-table.hh @@ -185,7 +185,7 @@ struct SBIXStrike HBUINT16 resolution; /* The device pixel density (in PPI) for which this * strike was designed. (E.g., 96 PPI, 192 PPI.) */ protected: - UnsizedArrayOf> + UnsizedArrayOf> imageOffsetsZ; /* Offset from the beginning of the strike data header * to bitmap data for an individual glyph ID. */ public: @@ -356,7 +356,7 @@ struct sbix if (unlikely (!out)) return_trace (false); if (unlikely (!c->serializer->extend_min (out))) return_trace (false); - hb_vector_t*> new_strikes; + hb_vector_t*> new_strikes; hb_vector_t objidxs; for (int i = strikes.len - 1; i >= 0; --i) { diff --git a/src/hb-ot-color-svg-table.hh b/src/hb-ot-color-svg-table.hh index 1cc40ae53..04fbf8997 100644 --- a/src/hb-ot-color-svg-table.hh +++ b/src/hb-ot-color-svg-table.hh @@ -62,7 +62,7 @@ struct SVGDocumentIndexEntry * this index entry. */ HBUINT16 endGlyphID; /* The last glyph ID in the range described by * this index entry. Must be >= startGlyphID. */ - LNNOffsetTo> + NNOffset32To> svgDoc; /* Offset from the beginning of the SVG Document Index * to an SVG document. Must be non-zero. */ HBUINT32 svgDocLength; /* Length of the SVG document. @@ -107,7 +107,7 @@ struct SVG protected: HBUINT16 version; /* Table version (starting at 0). */ - LOffsetTo> + Offset32To> svgDocEntries; /* Offset (relative to the start of the SVG table) to the * SVG Documents Index. Must be non-zero. */ /* Array of SVG Document Index Entries. */ diff --git a/src/hb-ot-layout-base-table.hh b/src/hb-ot-layout-base-table.hh index 4df0d942c..583ad6fb3 100644 --- a/src/hb-ot-layout-base-table.hh +++ b/src/hb-ot-layout-base-table.hh @@ -103,7 +103,7 @@ struct BaseCoordFormat3 protected: HBUINT16 format; /* Format identifier--format = 3 */ FWORD coordinate; /* X or Y value, in design units */ - OffsetTo + Offset16To deviceTable; /* Offset to Device table for X or * Y value, from beginning of * BaseCoord table (may be NULL). */ @@ -173,11 +173,11 @@ struct FeatMinMaxRecord protected: Tag tag; /* 4-byte feature identification tag--must * match feature tag in FeatureList */ - OffsetTo + Offset16To minCoord; /* Offset to BaseCoord table that defines * the minimum extent value, from beginning * of MinMax table (may be NULL) */ - OffsetTo + Offset16To maxCoord; /* Offset to BaseCoord table that defines * the maximum extent value, from beginning * of MinMax table (may be NULL) */ @@ -212,11 +212,11 @@ struct MinMax } protected: - OffsetTo + Offset16To minCoord; /* Offset to BaseCoord table that defines * minimum extent value, from the beginning * of MinMax table (may be NULL) */ - OffsetTo + Offset16To maxCoord; /* Offset to BaseCoord table that defines * maximum extent value, from the beginning * of MinMax table (may be NULL) */ @@ -275,7 +275,7 @@ struct BaseLangSysRecord protected: Tag baseLangSysTag; /* 4-byte language system identification tag */ - OffsetTo + Offset16To minMax; /* Offset to MinMax table, from beginning * of BaseScript table */ public: @@ -305,10 +305,10 @@ struct BaseScript } protected: - OffsetTo + Offset16To baseValues; /* Offset to BaseValues table, from beginning * of BaseScript table (may be NULL) */ - OffsetTo + Offset16To defaultMinMax; /* Offset to MinMax table, from beginning of * BaseScript table (may be NULL) */ SortedArrayOf @@ -339,7 +339,7 @@ struct BaseScriptRecord protected: Tag baseScriptTag; /* 4-byte script identification tag */ - OffsetTo + Offset16To baseScript; /* Offset to BaseScript table, from beginning * of BaseScriptList */ @@ -426,12 +426,12 @@ struct Axis } protected: - OffsetTo> + Offset16To> baseTagList; /* Offset to BaseTagList table, from beginning * of Axis table (may be NULL) * Array of 4-byte baseline identification tags — must * be in alphabetical order */ - OffsetTo + Offset16To baseScriptList; /* Offset to BaseScriptList table, from beginning * of Axis table * Array of BaseScriptRecords, in alphabetical order @@ -501,11 +501,11 @@ struct BASE protected: FixedVersion<>version; /* Version of the BASE table */ - OffsetTohAxis; /* Offset to horizontal Axis table, from beginning + Offset16TohAxis; /* Offset to horizontal Axis table, from beginning * of BASE table (may be NULL) */ - OffsetTovAxis; /* Offset to vertical Axis table, from beginning + Offset16TovAxis; /* Offset to vertical Axis table, from beginning * of BASE table (may be NULL) */ - LOffsetTo + Offset32To varStore; /* Offset to the table of Item Variation * Store--from beginning of BASE * header (may be NULL). Introduced diff --git a/src/hb-ot-layout-common.hh b/src/hb-ot-layout-common.hh index 311cad00d..1b4e77176 100644 --- a/src/hb-ot-layout-common.hh +++ b/src/hb-ot-layout-common.hh @@ -384,7 +384,7 @@ struct Record } Tag tag; /* 4-byte Tag identifier */ - OffsetTo + Offset16To offset; /* Offset from beginning of object holding * the Record */ public: @@ -394,9 +394,9 @@ struct Record template struct RecordArrayOf : SortedArrayOf> { - const OffsetTo& get_offset (unsigned int i) const + const Offset16To& get_offset (unsigned int i) const { return (*this)[i].offset; } - OffsetTo& get_offset (unsigned int i) + Offset16To& get_offset (unsigned int i) { return (*this)[i].offset; } const Tag& get_tag (unsigned int i) const { return (*this)[i].tag; } @@ -786,7 +786,7 @@ struct Script } protected: - OffsetTo + Offset16To defaultLangSys; /* Offset to DefaultLangSys table--from * beginning of Script table--may be Null */ RecordArrayOf @@ -1153,7 +1153,7 @@ struct Feature unsigned int new_offset_int = orig_offset - (((char *) this) - ((char *) closure->list_base)); - OffsetTo new_offset; + Offset16To new_offset; /* Check that it would not overflow. */ new_offset = new_offset_int; if (new_offset == new_offset_int && @@ -1165,7 +1165,7 @@ struct Feature return_trace (true); } - OffsetTo + Offset16To featureParams; /* Offset to Feature Parameters table (if one * has been defined for the feature), relative * to the beginning of the Feature Table; = Null @@ -1286,7 +1286,7 @@ struct Lookup const hb_set_t *glyphset = c->plan->glyphset_gsub (); unsigned int lookup_type = get_type (); + hb_iter (get_subtables ()) - | hb_filter ([this, glyphset, lookup_type] (const OffsetTo &_) { return (this+_).intersects (glyphset, lookup_type); }) + | hb_filter ([this, glyphset, lookup_type] (const Offset16To &_) { return (this+_).intersects (glyphset, lookup_type); }) | hb_apply (subset_offset_array (c, out->get_subtables (), this, lookup_type)) ; @@ -2861,7 +2861,7 @@ struct VariationStore protected: HBUINT16 format; - LOffsetTo regions; + Offset32To regions; LOffsetArrayOf dataSets; public: DEFINE_SIZE_ARRAY (8, dataSets); @@ -3016,7 +3016,7 @@ struct FeatureTableSubstitutionRecord protected: HBUINT16 featureIndex; - LOffsetTo feature; + Offset32To feature; public: DEFINE_SIZE_STATIC (6); }; @@ -3122,9 +3122,9 @@ struct FeatureVariationRecord } protected: - LOffsetTo + Offset32To conditions; - LOffsetTo + Offset32To 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 437e760f6..a3e1489be 100644 --- a/src/hb-ot-layout-gdef-table.hh +++ b/src/hb-ot-layout-gdef-table.hh @@ -110,7 +110,7 @@ struct AttachList } protected: - OffsetTo + Offset16To coverage; /* Offset to Coverage table -- from * beginning of AttachList table */ OffsetArrayOf @@ -220,7 +220,7 @@ struct CaretValueFormat3 protected: HBUINT16 caretValueFormat; /* Format identifier--format = 3 */ FWORD coordinate; /* X or Y value, in design units */ - OffsetTo + Offset16To deviceTable; /* Offset to Device table for X or Y * value--from beginning of CaretValue * table */ @@ -329,7 +329,7 @@ struct LigGlyph void collect_variation_indices (hb_collect_variation_indices_context_t *c) const { - for (const OffsetTo& offset : carets.iter ()) + for (const Offset16To& offset : carets.iter ()) (this+offset).collect_variation_indices (c->layout_variation_indices); } @@ -408,7 +408,7 @@ struct LigCaretList } protected: - OffsetTo + Offset16To coverage; /* Offset to Coverage table--from * beginning of LigCaretList table */ OffsetArrayOf @@ -432,7 +432,7 @@ struct MarkGlyphSetsFormat1 out->format = format; bool ret = true; - for (const LOffsetTo& offset : coverage.iter ()) + for (const Offset32To& offset : coverage.iter ()) { auto *o = out->coverage.serialize_append (c->serializer); if (unlikely (!o)) @@ -460,7 +460,7 @@ struct MarkGlyphSetsFormat1 protected: HBUINT16 format; /* Format identifier--format = 1 */ - ArrayOf> + ArrayOf> coverage; /* Array of long offsets to mark set * coverage tables */ public: @@ -687,28 +687,28 @@ struct GDEF protected: FixedVersion<>version; /* Version of the GDEF table--currently * 0x00010003u */ - OffsetTo + Offset16To glyphClassDef; /* Offset to class definition table * for glyph type--from beginning of * GDEF header (may be Null) */ - OffsetTo + Offset16To attachList; /* Offset to list of glyphs with * attachment points--from beginning * of GDEF header (may be Null) */ - OffsetTo + Offset16To ligCaretList; /* Offset to list of positioning points * for ligature carets--from beginning * of GDEF header (may be Null) */ - OffsetTo + Offset16To markAttachClassDef; /* Offset to class definition table for * mark attachment type--from beginning * of GDEF header (may be Null) */ - OffsetTo + Offset16To markGlyphSetsDef; /* Offset to the table of mark set * definitions--from beginning of GDEF * header (may be NULL). Introduced * in version 0x00010002. */ - LOffsetTo + Offset32To 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-gpos-table.hh b/src/hb-ot-layout-gpos-table.hh index 7c8c85777..9cefad5fa 100644 --- a/src/hb-ot-layout-gpos-table.hh +++ b/src/hb-ot-layout-gpos-table.hh @@ -89,16 +89,16 @@ struct ValueFormat : HBUINT16 HBINT16 yAdvance; /* Vertical adjustment for advance--in * design units (only used for vertical * writing) */ - OffsetTo xPlaDevice; /* Offset to Device table for + Offset16To xPlaDevice; /* Offset to Device table for * horizontal placement--measured from * beginning of PosTable (may be NULL) */ - OffsetTo yPlaDevice; /* Offset to Device table for vertical + Offset16To yPlaDevice; /* Offset to Device table for vertical * placement--measured from beginning * of PosTable (may be NULL) */ - OffsetTo xAdvDevice; /* Offset to Device table for + Offset16To xAdvDevice; /* Offset to Device table for * horizontal advance--measured from * beginning of PosTable (may be NULL) */ - OffsetTo yAdvDevice; /* Offset to Device table for vertical + Offset16To yAdvDevice; /* Offset to Device table for vertical * advance--measured from beginning of * PosTable (may be NULL) */ #endif @@ -232,14 +232,14 @@ struct ValueFormat : HBUINT16 return true; } - static inline OffsetTo& get_device (Value* value) + static inline Offset16To& get_device (Value* value) { - return *static_cast *> (value); + return *static_cast *> (value); } - static inline const OffsetTo& get_device (const Value* value, bool *worked=nullptr) + static inline const Offset16To& get_device (const Value* value, bool *worked=nullptr) { if (worked) *worked |= bool (*value); - return *static_cast *> (value); + return *static_cast *> (value); } bool copy_device (hb_serialize_context_t *c, const void *base, @@ -447,11 +447,11 @@ struct AnchorFormat3 HBUINT16 format; /* Format identifier--format = 3 */ FWORD xCoordinate; /* Horizontal value--in design units */ FWORD yCoordinate; /* Vertical value--in design units */ - OffsetTo + Offset16To xDeviceTable; /* Offset to Device table for X * coordinate-- from beginning of * Anchor table (may be NULL) */ - OffsetTo + Offset16To yDeviceTable; /* Offset to Device table for Y * coordinate-- from beginning of * Anchor table (may be NULL) */ @@ -599,7 +599,7 @@ struct AnchorMatrix } HBUINT16 rows; /* Number of rows */ - UnsizedArrayOf> + UnsizedArrayOf> matrixZ; /* Matrix of offsets to Anchor tables-- * from beginning of AnchorMatrix table */ public: @@ -641,7 +641,7 @@ struct MarkRecord protected: HBUINT16 klass; /* Class defined for this mark */ - OffsetTo + Offset16To markAnchor; /* Offset to Anchor table--from * beginning of MarkArray table */ public: @@ -800,7 +800,7 @@ struct SinglePosFormat1 protected: HBUINT16 format; /* Format identifier--format = 1 */ - OffsetTo + Offset16To coverage; /* Offset to Coverage table--from * beginning of subtable */ ValueFormat valueFormat; /* Defines the types of data in the @@ -922,7 +922,7 @@ struct SinglePosFormat2 protected: HBUINT16 format; /* Format identifier--format = 2 */ - OffsetTo + Offset16To coverage; /* Offset to Coverage table--from * beginning of subtable */ ValueFormat valueFormat; /* Defines the types of data in the @@ -1218,7 +1218,7 @@ struct PairPosFormat1 + hb_zip (this+coverage, pairSet) | hb_filter (*glyphs, hb_first) | hb_map (hb_second) - | hb_map ([glyphs, this] (const OffsetTo &_) + | hb_map ([glyphs, this] (const Offset16To &_) { return (this+_).intersects (glyphs, valueFormat); }) | hb_any ; @@ -1283,7 +1283,7 @@ struct PairPosFormat1 + hb_zip (this+coverage, pairSet) | hb_filter (glyphset, hb_first) - | hb_filter ([this, c, out] (const OffsetTo& _) + | hb_filter ([this, c, out] (const Offset16To& _) { auto *o = out->pairSet.serialize_append (c->serializer); if (unlikely (!o)) return false; @@ -1328,7 +1328,7 @@ struct PairPosFormat1 protected: HBUINT16 format; /* Format identifier--format = 1 */ - OffsetTo + Offset16To coverage; /* Offset to Coverage table--from * beginning of subtable */ ValueFormat valueFormat[2]; /* [0] Defines the types of data in @@ -1499,7 +1499,7 @@ struct PairPosFormat2 protected: HBUINT16 format; /* Format identifier--format = 2 */ - OffsetTo + Offset16To coverage; /* Offset to Coverage table--from * beginning of subtable */ ValueFormat valueFormat1; /* ValueRecord definition--for the @@ -1508,11 +1508,11 @@ struct PairPosFormat2 ValueFormat valueFormat2; /* ValueRecord definition--for the * second glyph of the pair--may be * zero (0) */ - OffsetTo + Offset16To classDef1; /* Offset to ClassDef table--from * beginning of PairPos subtable--for * the first glyph of the pair */ - OffsetTo + Offset16To classDef2; /* Offset to ClassDef table--from * beginning of PairPos subtable--for * the second glyph of the pair */ @@ -1582,11 +1582,11 @@ struct EntryExitRecord } protected: - OffsetTo + Offset16To entryAnchor; /* Offset to EntryAnchor table--from * beginning of CursivePos * subtable--may be NULL */ - OffsetTo + Offset16To exitAnchor; /* Offset to ExitAnchor table--from * beginning of CursivePos * subtable--may be NULL */ @@ -1777,7 +1777,7 @@ struct CursivePosFormat1 protected: HBUINT16 format; /* Format identifier--format = 1 */ - OffsetTo + Offset16To coverage; /* Offset to Coverage table--from * beginning of subtable */ ArrayOf @@ -2005,17 +2005,17 @@ struct MarkBasePosFormat1 protected: HBUINT16 format; /* Format identifier--format = 1 */ - OffsetTo + Offset16To markCoverage; /* Offset to MarkCoverage table--from * beginning of MarkBasePos subtable */ - OffsetTo + Offset16To baseCoverage; /* Offset to BaseCoverage table--from * beginning of MarkBasePos subtable */ HBUINT16 classCount; /* Number of classes defined for marks */ - OffsetTo + Offset16To markArray; /* Offset to MarkArray table--from * beginning of MarkBasePos subtable */ - OffsetTo + Offset16To baseArray; /* Offset to BaseArray table--from * beginning of MarkBasePos subtable */ public: @@ -2244,18 +2244,18 @@ struct MarkLigPosFormat1 protected: HBUINT16 format; /* Format identifier--format = 1 */ - OffsetTo + Offset16To markCoverage; /* Offset to Mark Coverage table--from * beginning of MarkLigPos subtable */ - OffsetTo + Offset16To ligatureCoverage; /* Offset to Ligature Coverage * table--from beginning of MarkLigPos * subtable */ HBUINT16 classCount; /* Number of defined mark classes */ - OffsetTo + Offset16To markArray; /* Offset to MarkArray table--from * beginning of MarkLigPos subtable */ - OffsetTo + Offset16To ligatureArray; /* Offset to LigatureArray table--from * beginning of MarkLigPos subtable */ public: @@ -2465,19 +2465,19 @@ struct MarkMarkPosFormat1 protected: HBUINT16 format; /* Format identifier--format = 1 */ - OffsetTo + Offset16To mark1Coverage; /* Offset to Combining Mark1 Coverage * table--from beginning of MarkMarkPos * subtable */ - OffsetTo + Offset16To mark2Coverage; /* Offset to Combining Mark2 Coverage * table--from beginning of MarkMarkPos * subtable */ HBUINT16 classCount; /* Number of defined mark classes */ - OffsetTo + Offset16To mark1Array; /* Offset to Mark1Array table--from * beginning of MarkMarkPos subtable */ - OffsetTo + Offset16To mark2Array; /* Offset to Mark2Array table--from * beginning of MarkMarkPos subtable */ public: diff --git a/src/hb-ot-layout-gsub-table.hh b/src/hb-ot-layout-gsub-table.hh index 943acf5ad..06b8bc6c9 100644 --- a/src/hb-ot-layout-gsub-table.hh +++ b/src/hb-ot-layout-gsub-table.hh @@ -138,7 +138,7 @@ struct SingleSubstFormat1 protected: HBUINT16 format; /* Format identifier--format = 1 */ - OffsetTo + Offset16To coverage; /* Offset to Coverage table--from * beginning of Substitution table */ HBUINT16 deltaGlyphID; /* Add to original GlyphID to get @@ -242,7 +242,7 @@ struct SingleSubstFormat2 protected: HBUINT16 format; /* Format identifier--format = 2 */ - OffsetTo + Offset16To coverage; /* Offset to Coverage table--from * beginning of Substitution table */ ArrayOf @@ -488,7 +488,7 @@ struct MultipleSubstFormat1 protected: HBUINT16 format; /* Format identifier--format = 1 */ - OffsetTo + Offset16To coverage; /* Offset to Coverage table--from * beginning of Substitution table */ OffsetArrayOf @@ -727,7 +727,7 @@ struct AlternateSubstFormat1 protected: HBUINT16 format; /* Format identifier--format = 1 */ - OffsetTo + Offset16To coverage; /* Offset to Coverage table--from * beginning of Substitution table */ OffsetArrayOf @@ -997,7 +997,7 @@ struct LigatureSubstFormat1 + hb_zip (this+coverage, ligatureSet) | hb_filter (*glyphs, hb_first) | hb_map (hb_second) - | hb_map ([this, glyphs] (const OffsetTo &_) + | hb_map ([this, glyphs] (const Offset16To &_) { return (this+_).intersects (glyphs); }) | hb_any ; @@ -1107,7 +1107,7 @@ struct LigatureSubstFormat1 protected: HBUINT16 format; /* Format identifier--format = 1 */ - OffsetTo + Offset16To coverage; /* Offset to Coverage table--from * beginning of Substitution table */ OffsetArrayOf @@ -1364,7 +1364,7 @@ struct ReverseChainSingleSubstFormat1 protected: HBUINT16 format; /* Format identifier--format = 1 */ - OffsetTo + Offset16To coverage; /* Offset to Coverage table--from * beginning of table */ OffsetArrayOf diff --git a/src/hb-ot-layout-gsubgpos.hh b/src/hb-ot-layout-gsubgpos.hh index 796a29d0b..1771ed71a 100644 --- a/src/hb-ot-layout-gsubgpos.hh +++ b/src/hb-ot-layout-gsubgpos.hh @@ -833,7 +833,7 @@ static inline bool intersects_class (const hb_set_t *glyphs, const HBUINT16 &val } static inline bool intersects_coverage (const hb_set_t *glyphs, const HBUINT16 &value, const void *data) { - const OffsetTo &coverage = (const OffsetTo&)value; + const Offset16To &coverage = (const OffsetTo&)value; return (data+coverage).intersects (glyphs); } @@ -850,7 +850,7 @@ static inline void intersected_class_glyphs (const hb_set_t *glyphs, const void } static inline void intersected_coverage_glyphs (const hb_set_t *glyphs, const void *data, unsigned value, hb_set_t *intersected_glyphs) { - OffsetTo coverage; + Offset16To coverage; coverage = value; (data+coverage).intersected_coverage_glyphs (glyphs, intersected_glyphs); } @@ -879,7 +879,7 @@ static inline void collect_class (hb_set_t *glyphs, const HBUINT16 &value, const } static inline void collect_coverage (hb_set_t *glyphs, const HBUINT16 &value, const void *data) { - const OffsetTo &coverage = (const OffsetTo&)value; + const Offset16To &coverage = (const OffsetTo&)value; (data+coverage).collect_coverage (glyphs); } static inline void collect_array (hb_collect_glyphs_context_t *c HB_UNUSED, @@ -907,7 +907,7 @@ static inline bool match_class (hb_codepoint_t glyph_id, const HBUINT16 &value, } static inline bool match_coverage (hb_codepoint_t glyph_id, const HBUINT16 &value, const void *data) { - const OffsetTo &coverage = (const OffsetTo&)value; + const Offset16To &coverage = (const OffsetTo&)value; return (data+coverage).get_coverage (glyph_id) != NOT_COVERED; } @@ -1736,7 +1736,7 @@ struct RuleSet auto *out = c->serializer->start_embed (*this); if (unlikely (!c->serializer->extend_min (out))) return_trace (false); - for (const OffsetTo& _ : rule) + for (const Offset16To& _ : rule) { if (!_) continue; auto *o = out->rule.serialize_append (c->serializer); @@ -1905,7 +1905,7 @@ struct ContextFormat1 protected: HBUINT16 format; /* Format identifier--format = 1 */ - OffsetTo + Offset16To coverage; /* Offset to Coverage table--from * beginning of table */ OffsetArrayOf @@ -1966,7 +1966,7 @@ struct ContextFormat2 | hb_filter ([&] (unsigned _) { return class_def.intersects_class (c->cur_intersected_glyphs, _); }, hb_first) - | hb_apply ([&] (const hb_pair_t&> _) + | hb_apply ([&] (const hb_pair_t&> _) { const RuleSet& rule_set = this+_.second; rule_set.closure (c, _.first, lookup_context); @@ -2097,10 +2097,10 @@ struct ContextFormat2 protected: HBUINT16 format; /* Format identifier--format = 2 */ - OffsetTo + Offset16To coverage; /* Offset to Coverage table--from * beginning of table */ - OffsetTo + Offset16To classDef; /* Offset to glyph ClassDef table--from * beginning of table */ OffsetArrayOf @@ -2218,10 +2218,10 @@ struct ContextFormat3 auto coverages = coverageZ.as_array (glyphCount); - for (const OffsetTo& offset : coverages) + for (const Offset16To& offset : coverages) { /* TODO(subset) This looks like should not be necessary to write this way. */ - auto *o = c->serializer->allocate_size> (OffsetTo::static_size); + auto *o = c->serializer->allocate_size> (OffsetTo::static_size); if (unlikely (!o)) return_trace (false); if (!o->serialize_subset (c, offset, this)) return_trace (false); } @@ -2252,7 +2252,7 @@ struct ContextFormat3 HBUINT16 glyphCount; /* Number of glyphs in the input glyph * sequence */ HBUINT16 lookupCount; /* Number of LookupRecords */ - UnsizedArrayOf> + UnsizedArrayOf> coverageZ; /* Array of offsets to Coverage * table in glyph sequence order */ /*UnsizedArrayOf @@ -2702,7 +2702,7 @@ struct ChainRuleSet auto *out = c->serializer->start_embed (*this); if (unlikely (!c->serializer->extend_min (out))) return_trace (false); - for (const OffsetTo& _ : rule) + for (const Offset16To& _ : rule) { if (!_) continue; auto *o = out->rule.serialize_append (c->serializer); @@ -2873,7 +2873,7 @@ struct ChainContextFormat1 protected: HBUINT16 format; /* Format identifier--format = 1 */ - OffsetTo + Offset16To coverage; /* Offset to Coverage table--from * beginning of table */ OffsetArrayOf @@ -2941,7 +2941,7 @@ struct ChainContextFormat2 | hb_filter ([&] (unsigned _) { return input_class_def.intersects_class (c->cur_intersected_glyphs, _); }, hb_first) - | hb_apply ([&] (const hb_pair_t&> _) + | hb_apply ([&] (const hb_pair_t&> _) { const ChainRuleSet& chainrule_set = this+_.second; chainrule_set.closure (c, _.first, lookup_context); @@ -3066,7 +3066,7 @@ struct ChainContextFormat2 bool ret = true; const hb_map_t *lookup_map = c->table_tag == HB_OT_TAG_GSUB ? c->plan->gsub_lookups : c->plan->gpos_lookups; auto last_non_zero = c->serializer->snapshot (); - for (const OffsetTo& _ : + hb_enumerate (ruleSet) + for (const Offset16To& _ : + hb_enumerate (ruleSet) | hb_filter (input_klass_map, hb_first) | hb_map (hb_second)) { @@ -3112,18 +3112,18 @@ struct ChainContextFormat2 protected: HBUINT16 format; /* Format identifier--format = 2 */ - OffsetTo + Offset16To coverage; /* Offset to Coverage table--from * beginning of table */ - OffsetTo + Offset16To backtrackClassDef; /* Offset to glyph ClassDef table * containing backtrack sequence * data--from beginning of table */ - OffsetTo + Offset16To inputClassDef; /* Offset to glyph ClassDef * table containing input sequence * data--from beginning of table */ - OffsetTo + Offset16To lookaheadClassDef; /* Offset to glyph ClassDef table * containing lookahead sequence * data--from beginning of table */ @@ -3376,7 +3376,7 @@ struct ExtensionFormat1 template const X& get_subtable () const - { return this + reinterpret_cast &> (extensionOffset); } + { return this + reinterpret_cast &> (extensionOffset); } template typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const @@ -3408,9 +3408,9 @@ struct ExtensionFormat1 out->extensionLookupType = extensionLookupType; const auto& src_offset = - reinterpret_cast &> (extensionOffset); + reinterpret_cast &> (extensionOffset); auto& dest_offset = - reinterpret_cast &> (out->extensionOffset); + reinterpret_cast &> (out->extensionOffset); return_trace (dest_offset.serialize_subset (c, src_offset, this, get_type ())); } @@ -3616,15 +3616,15 @@ struct GSUBGPOS if (unlikely (!out)) return_trace (false); typedef LookupOffsetList TLookupList; - reinterpret_cast &> (out->lookupList) + reinterpret_cast &> (out->lookupList) .serialize_subset (c->subset_context, - reinterpret_cast &> (lookupList), + reinterpret_cast &> (lookupList), this, c); - reinterpret_cast &> (out->featureList) + reinterpret_cast &> (out->featureList) .serialize_subset (c->subset_context, - reinterpret_cast &> (featureList), + reinterpret_cast &> (featureList), this, c); @@ -3750,7 +3750,7 @@ struct GSUBGPOS likely (version.major == 1) && scriptList.sanitize (c, this) && featureList.sanitize (c, this) && - reinterpret_cast &> (lookupList).sanitize (c, this)))) + reinterpret_cast &> (lookupList).sanitize (c, this)))) return_trace (false); #ifndef HB_NO_VAR @@ -3803,13 +3803,13 @@ struct GSUBGPOS protected: FixedVersion<>version; /* Version of the GSUB/GPOS table--initially set * to 0x00010000u */ - OffsetTo + Offset16To scriptList; /* ScriptList table */ - OffsetTo + Offset16To featureList; /* FeatureList table */ - OffsetTo + Offset16To lookupList; /* LookupList table */ - LOffsetTo + Offset32To featureVars; /* Offset to Feature Variations table--from beginning of table * (may be NULL). Introduced diff --git a/src/hb-ot-layout-jstf-table.hh b/src/hb-ot-layout-jstf-table.hh index ffd2bf457..ddcfff2e8 100644 --- a/src/hb-ot-layout-jstf-table.hh +++ b/src/hb-ot-layout-jstf-table.hh @@ -71,43 +71,43 @@ struct JstfPriority } protected: - OffsetTo + Offset16To shrinkageEnableGSUB; /* Offset to Shrinkage Enable GSUB * JstfModList table--from beginning of * JstfPriority table--may be NULL */ - OffsetTo + Offset16To shrinkageDisableGSUB; /* Offset to Shrinkage Disable GSUB * JstfModList table--from beginning of * JstfPriority table--may be NULL */ - OffsetTo + Offset16To shrinkageEnableGPOS; /* Offset to Shrinkage Enable GPOS * JstfModList table--from beginning of * JstfPriority table--may be NULL */ - OffsetTo + Offset16To shrinkageDisableGPOS; /* Offset to Shrinkage Disable GPOS * JstfModList table--from beginning of * JstfPriority table--may be NULL */ - OffsetTo + Offset16To shrinkageJstfMax; /* Offset to Shrinkage JstfMax table-- * from beginning of JstfPriority table * --may be NULL */ - OffsetTo + Offset16To extensionEnableGSUB; /* Offset to Extension Enable GSUB * JstfModList table--from beginning of * JstfPriority table--may be NULL */ - OffsetTo + Offset16To extensionDisableGSUB; /* Offset to Extension Disable GSUB * JstfModList table--from beginning of * JstfPriority table--may be NULL */ - OffsetTo + Offset16To extensionEnableGPOS; /* Offset to Extension Enable GPOS * JstfModList table--from beginning of * JstfPriority table--may be NULL */ - OffsetTo + Offset16To extensionDisableGPOS; /* Offset to Extension Disable GPOS * JstfModList table--from beginning of * JstfPriority table--may be NULL */ - OffsetTo + Offset16To extensionJstfMax; /* Offset to Extension JstfMax table-- * from beginning of JstfPriority table * --may be NULL */ @@ -174,10 +174,10 @@ struct JstfScript } protected: - OffsetTo + Offset16To extenderGlyphs; /* Offset to ExtenderGlyph table--from beginning * of JstfScript table-may be NULL */ - OffsetTo + Offset16To defaultLangSys; /* Offset to DefaultJstfLangSys table--from * beginning of JstfScript table--may be Null */ RecordArrayOf diff --git a/src/hb-ot-math-table.hh b/src/hb-ot-math-table.hh index 26aa08060..bac617c8d 100644 --- a/src/hb-ot-math-table.hh +++ b/src/hb-ot-math-table.hh @@ -49,7 +49,7 @@ struct MathValueRecord protected: HBINT16 value; /* The X or Y value in design units */ - OffsetTo deviceTable; /* Offset to the device table - from the + Offset16To deviceTable; /* Offset to the device table - from the * beginning of parent table. May be NULL. * Suggested format for device table is 1. */ @@ -181,7 +181,7 @@ struct MathItalicsCorrectionInfo } protected: - OffsetTo coverage; /* Offset to Coverage table - + Offset16To coverage; /* Offset to Coverage table - * from the beginning of * MathItalicsCorrectionInfo * table. */ @@ -214,7 +214,7 @@ struct MathTopAccentAttachment } protected: - OffsetTo topAccentCoverage; /* Offset to Coverage table - + Offset16To topAccentCoverage; /* Offset to Coverage table - * from the beginning of * MathTopAccentAttachment * table. */ @@ -320,7 +320,7 @@ struct MathKernInfoRecord protected: /* Offset to MathKern table for each corner - * from the beginning of MathKernInfo table. May be NULL. */ - OffsetTo mathKern[4]; + Offset16To mathKern[4]; public: DEFINE_SIZE_STATIC (8); @@ -346,7 +346,7 @@ struct MathKernInfo } protected: - OffsetTo + Offset16To mathKernCoverage; /* Offset to Coverage table - * from the beginning of the @@ -395,22 +395,22 @@ struct MathGlyphInfo protected: /* Offset to MathItalicsCorrectionInfo table - * from the beginning of MathGlyphInfo table. */ - OffsetTo mathItalicsCorrectionInfo; + Offset16To mathItalicsCorrectionInfo; /* Offset to MathTopAccentAttachment table - * from the beginning of MathGlyphInfo table. */ - OffsetTo mathTopAccentAttachment; + Offset16To mathTopAccentAttachment; /* Offset to coverage table for Extended Shape glyphs - * from the beginning of MathGlyphInfo table. When the left or right glyph of * a box is an extended shape variant, the (ink) box (and not the default * position defined by values in MathConstants table) should be used for * vertical positioning purposes. May be NULL.. */ - OffsetTo extendedShapeCoverage; + Offset16To extendedShapeCoverage; /* Offset to MathKernInfo table - * from the beginning of MathGlyphInfo table. */ - OffsetTo mathKernInfo; + Offset16To mathKernInfo; public: DEFINE_SIZE_STATIC (8); @@ -572,7 +572,7 @@ struct MathGlyphConstruction protected: /* Offset to MathGlyphAssembly table for this shape - from the beginning of MathGlyphConstruction table. May be NULL. */ - OffsetTo glyphAssembly; + Offset16To glyphAssembly; /* MathGlyphVariantRecords for alternative variants of the glyphs. */ ArrayOf mathGlyphVariantRecord; @@ -636,7 +636,7 @@ struct MathVariants { bool vertical = HB_DIRECTION_IS_VERTICAL (direction); unsigned int count = vertical ? vertGlyphCount : horizGlyphCount; - const OffsetTo &coverage = vertical ? vertGlyphCoverage + const Offset16To &coverage = vertical ? vertGlyphCoverage : horizGlyphCoverage; unsigned int index = (this+coverage).get_coverage (glyph); @@ -653,11 +653,11 @@ struct MathVariants /* Minimum overlap of connecting * glyphs during glyph construction, * in design units. */ - OffsetTo vertGlyphCoverage; + Offset16To vertGlyphCoverage; /* Offset to Coverage table - * from the beginning of MathVariants * table. */ - OffsetTo horizGlyphCoverage; + Offset16To horizGlyphCoverage; /* Offset to Coverage table - * from the beginning of MathVariants * table. */ @@ -671,7 +671,7 @@ struct MathVariants /* Array of offsets to MathGlyphConstruction tables - from the beginning of the MathVariants table, for shapes growing in vertical/horizontal direction. */ - UnsizedArrayOf> + UnsizedArrayOf> glyphConstruction; public: @@ -711,11 +711,11 @@ struct MATH protected: FixedVersion<>version; /* Version of the MATH table * initially set to 0x00010000u */ - OffsetTo + Offset16To mathConstants; /* MathConstants table */ - OffsetTo + Offset16To mathGlyphInfo; /* MathGlyphInfo table */ - OffsetTo + Offset16To mathVariants; /* MathVariants table */ public: diff --git a/src/hb-ot-meta-table.hh b/src/hb-ot-meta-table.hh index 1225e26ce..735106bf5 100644 --- a/src/hb-ot-meta-table.hh +++ b/src/hb-ot-meta-table.hh @@ -56,7 +56,7 @@ struct DataMap protected: Tag tag; /* A tag indicating the type of metadata. */ - LNNOffsetTo> + NNOffset32To> dataZ; /* Offset in bytes from the beginning of the * metadata table to the data for this tag. */ HBUINT32 dataLength; /* Length of the data. The data is not required to diff --git a/src/hb-ot-name-table.hh b/src/hb-ot-name-table.hh index 794a7cdb6..5c5c58eac 100644 --- a/src/hb-ot-name-table.hh +++ b/src/hb-ot-name-table.hh @@ -149,7 +149,7 @@ struct NameRecord HBUINT16 languageID; /* Language ID. */ HBUINT16 nameID; /* Name ID. */ HBUINT16 length; /* String length (in bytes). */ - NNOffsetTo> + NNOffset16To> offset; /* String offset from start of storage area (in bytes). */ public: DEFINE_SIZE_STATIC (12); @@ -358,7 +358,7 @@ struct name /* We only implement format 0 for now. */ HBUINT16 format; /* Format selector (=0/1). */ HBUINT16 count; /* Number of name records. */ - NNOffsetTo> + NNOffset16To> stringOffset; /* Offset to start of string storage (from start of table). */ UnsizedArrayOf nameRecordZ; /* The name records where count is the number of records. */ diff --git a/src/hb-ot-shape-complex-arabic-fallback.hh b/src/hb-ot-shape-complex-arabic-fallback.hh index 244e967b1..ab91de27a 100644 --- a/src/hb-ot-shape-complex-arabic-fallback.hh +++ b/src/hb-ot-shape-complex-arabic-fallback.hh @@ -208,7 +208,7 @@ struct ManifestLookup { public: OT::Tag tag; - OT::OffsetTo lookupOffset; + OT::Offset16To lookupOffset; public: DEFINE_SIZE_STATIC (6); }; diff --git a/src/hb-ot-stat-table.hh b/src/hb-ot-stat-table.hh index 6aa4fa449..41d1734b3 100644 --- a/src/hb-ot-stat-table.hh +++ b/src/hb-ot-stat-table.hh @@ -297,7 +297,7 @@ struct STAT unsigned int axis_index; if (!get_design_axes ().lfind (tag, &axis_index)) return false; - hb_array_t> axis_values = get_axis_value_offsets (); + hb_array_t> axis_values = get_axis_value_offsets (); for (unsigned int i = 0; i < axis_values.length; i++) { const AxisValue& axis_value = this+axis_values[i]; @@ -359,7 +359,7 @@ struct STAT hb_array_t const get_design_axes () const { return (this+designAxesOffset).as_array (designAxisCount); } - hb_array_t> const get_axis_value_offsets () const + hb_array_t> const get_axis_value_offsets () const { return (this+offsetToAxisValueOffsets).as_array (axisValueCount); } @@ -373,7 +373,7 @@ struct STAT * in the 'fvar' table. In all fonts, must * be greater than zero if axisValueCount * is greater than zero. */ - LNNOffsetTo> + NNOffset32To> designAxesOffset; /* Offset in bytes from the beginning of * the STAT table to the start of the design @@ -381,7 +381,7 @@ struct STAT * set to zero; if designAxisCount is greater * than zero, must be greater than zero. */ HBUINT16 axisValueCount; /* The number of axis value tables. */ - LNNOffsetTo>> + NNOffset32To>> offsetToAxisValueOffsets; /* Offset in bytes from the beginning of * the STAT table to the start of the design diff --git a/src/hb-ot-var-fvar-table.hh b/src/hb-ot-var-fvar-table.hh index f9e933fb2..ceacb4f25 100644 --- a/src/hb-ot-var-fvar-table.hh +++ b/src/hb-ot-var-fvar-table.hh @@ -303,7 +303,7 @@ struct fvar protected: FixedVersion<>version; /* Version of the fvar table * initially set to 0x00010000u */ - OffsetTo + Offset16To firstAxis; /* Offset in bytes from the beginning of the table * to the start of the AxisRecord array. */ HBUINT16 reserved; /* This field is permanently reserved. Set to 2. */ diff --git a/src/hb-ot-var-gvar-table.hh b/src/hb-ot-var-gvar-table.hh index 7e4eaaad9..157dfd7a5 100644 --- a/src/hb-ot-var-gvar-table.hh +++ b/src/hb-ot-var-gvar-table.hh @@ -374,7 +374,7 @@ struct GlyphVariationData * low 12 bits are the number of tuple variation tables * for this glyph. The number of tuple variation tables * can be any number between 1 and 4095. */ - OffsetTo + Offset16To data; /* Offset from the start of the GlyphVariationData table * to the serialized data. */ /* TupleVariationHeader tupleVariationHeaders[] *//* Array of tuple variation headers. */ @@ -676,7 +676,7 @@ no_more_gaps: * can be referenced within glyph variation data tables for * multiple glyphs, as opposed to other tuple records stored * directly within a glyph variation data table. */ - LNNOffsetTo> + NNOffset32To> sharedTuples; /* Offset from the start of this table to the shared tuple records. * Array of tuple records shared across all glyph variation data tables. */ HBUINT16 glyphCount; /* The number of glyphs in this font. This must match the number of @@ -684,7 +684,7 @@ no_more_gaps: HBUINT16 flags; /* Bit-field that gives the format of the offset array that follows. * If bit 0 is clear, the offsets are uint16; if bit 0 is set, the * offsets are uint32. */ - LOffsetTo + Offset32To dataZ; /* Offset from the start of this table to the array of * GlyphVariationData tables. */ UnsizedArrayOf diff --git a/src/hb-ot-var-hvar-table.hh b/src/hb-ot-var-hvar-table.hh index c97ab7167..62bd1aa68 100644 --- a/src/hb-ot-var-hvar-table.hh +++ b/src/hb-ot-var-hvar-table.hh @@ -425,13 +425,13 @@ struct HVARVVAR protected: FixedVersion<>version; /* Version of the metrics variation table * initially set to 0x00010000u */ - LOffsetTo + Offset32To varStore; /* Offset to item variation store table. */ - LOffsetTo + Offset32To advMap; /* Offset to advance var-idx mapping. */ - LOffsetTo + Offset32To lsbMap; /* Offset to lsb/tsb var-idx mapping. */ - LOffsetTo + Offset32To rsbMap; /* Offset to rsb/bsb var-idx mapping. */ public: @@ -475,7 +475,7 @@ struct VVAR : HVARVVAR { bool subset (hb_subset_context_t *c) const { return HVARVVAR::_subset (c); } protected: - LOffsetTo + Offset32To vorgMap; /* Offset to vertical-origin var-idx mapping. */ public: diff --git a/src/hb-ot-var-mvar-table.hh b/src/hb-ot-var-mvar-table.hh index 1b7fad9ce..208db4674 100644 --- a/src/hb-ot-var-mvar-table.hh +++ b/src/hb-ot-var-mvar-table.hh @@ -103,7 +103,7 @@ protected: HBUINT16 valueRecordSize;/* The size in bytes of each value record — * must be greater than zero. */ HBUINT16 valueRecordCount;/* The number of value records — may be zero. */ - OffsetTo + Offset16To varStore; /* Offset to item variation store table. */ UnsizedArrayOf valuesZ; /* Array of value records. The records must be