Rename offset types to be explicit about their size
Add Offset16To<>, Offset24To<>, and Offset32To<> for most use-cases.
This commit is contained in:
parent
c5c13006a1
commit
ad28f973f3
@ -64,7 +64,7 @@ struct ankr
|
||||
unsigned int i,
|
||||
unsigned int num_glyphs) const
|
||||
{
|
||||
const NNOffsetTo<GlyphAnchors> *offset = (this+lookupTable).get_value (glyph_id, num_glyphs);
|
||||
const NNOffset16To<GlyphAnchors> *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<Lookup<NNOffsetTo<GlyphAnchors>>>
|
||||
Offset32To<Lookup<NNOffset16To<GlyphAnchors>>>
|
||||
lookupTable; /* Offset to the table's lookup table */
|
||||
LNNOffsetTo<HBUINT8>
|
||||
NNOffset32To<HBUINT8>
|
||||
anchorData; /* Offset to the glyph data table */
|
||||
|
||||
public:
|
||||
|
@ -164,7 +164,7 @@ struct LookupSegmentArray
|
||||
|
||||
HBGlyphID last; /* Last GlyphID in this segment */
|
||||
HBGlyphID first; /* First GlyphID in this segment */
|
||||
NNOffsetTo<UnsizedArrayOf<T>>
|
||||
NNOffset16To<UnsizedArrayOf<T>>
|
||||
valuesZ; /* A 16-bit offset from the start of
|
||||
* the table to the data. */
|
||||
public:
|
||||
|
@ -144,7 +144,7 @@ struct FeatureName
|
||||
protected:
|
||||
HBUINT16 feature; /* Feature type. */
|
||||
HBUINT16 nSettings; /* The number of records in the setting name array. */
|
||||
LNNOffsetTo<UnsizedArrayOf<SettingName>>
|
||||
NNOffset32To<UnsizedArrayOf<SettingName>>
|
||||
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
|
||||
|
@ -358,20 +358,20 @@ struct JustificationHeader
|
||||
}
|
||||
|
||||
protected:
|
||||
OffsetTo<JustificationCategory>
|
||||
Offset16To<JustificationCategory>
|
||||
justClassTable; /* Offset to the justification category state table. */
|
||||
OffsetTo<WidthDeltaCluster>
|
||||
Offset16To<WidthDeltaCluster>
|
||||
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<PostcompensationActionChain>
|
||||
Offset16To<PostcompensationActionChain>
|
||||
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<OffsetTo<WidthDeltaCluster>>
|
||||
Lookup<Offset16To<WidthDeltaCluster>>
|
||||
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<JustificationHeader>
|
||||
Offset16To<JustificationHeader>
|
||||
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<JustificationHeader>
|
||||
Offset16To<JustificationHeader>
|
||||
vertData; /* ditto, vertical */
|
||||
|
||||
public:
|
||||
|
@ -710,18 +710,18 @@ struct KerxSubTableFormat6
|
||||
{
|
||||
struct Long
|
||||
{
|
||||
LNNOffsetTo<Lookup<HBUINT32>> rowIndexTable;
|
||||
LNNOffsetTo<Lookup<HBUINT32>> columnIndexTable;
|
||||
LNNOffsetTo<UnsizedArrayOf<FWORD32>> array;
|
||||
NNOffset32To<Lookup<HBUINT32>> rowIndexTable;
|
||||
NNOffset32To<Lookup<HBUINT32>> columnIndexTable;
|
||||
NNOffset32To<UnsizedArrayOf<FWORD32>> array;
|
||||
} l;
|
||||
struct Short
|
||||
{
|
||||
LNNOffsetTo<Lookup<HBUINT16>> rowIndexTable;
|
||||
LNNOffsetTo<Lookup<HBUINT16>> columnIndexTable;
|
||||
LNNOffsetTo<UnsizedArrayOf<FWORD>> array;
|
||||
NNOffset32To<Lookup<HBUINT16>> rowIndexTable;
|
||||
NNOffset32To<Lookup<HBUINT16>> columnIndexTable;
|
||||
NNOffset32To<UnsizedArrayOf<FWORD>> array;
|
||||
} s;
|
||||
} u;
|
||||
LNNOffsetTo<UnsizedArrayOf<FWORD>> vector;
|
||||
NNOffset32To<UnsizedArrayOf<FWORD>> vector;
|
||||
public:
|
||||
DEFINE_SIZE_STATIC (KernSubTableHeader::static_size + 24);
|
||||
};
|
||||
|
@ -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<OpticalBounds> *bounds_offset = lookupTable.get_value (glyph_id, font->face->get_num_glyphs ());
|
||||
const Offset16To<OpticalBounds> *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<OffsetTo<OpticalBounds>>
|
||||
Lookup<Offset16To<OpticalBounds>>
|
||||
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<OpticalBounds> *bounds_offset = lookupTable.get_value (glyph_id, font->face->get_num_glyphs ());
|
||||
const Offset16To<OpticalBounds> *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<OffsetTo<OpticalBounds>>
|
||||
Lookup<Offset16To<OpticalBounds>>
|
||||
lookupTable; /* Lookup table associating glyphs with the four
|
||||
* int16 values for the left-side, top-side,
|
||||
* right-side, and bottom-side optical bounds. */
|
||||
|
@ -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<UnsizedArrayOf<FWORD>>
|
||||
NNOffset16To<UnsizedArrayOf<FWORD>>
|
||||
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<UnsizedArrayOf<HBFixed>>
|
||||
NNOffset32To<UnsizedArrayOf<HBFixed>>
|
||||
sizeTable; /* Offset from start of the tracking table to
|
||||
* Array[nSizes] of size values.. */
|
||||
UnsizedArrayOf<TrackTableEntry>
|
||||
@ -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<TrackData>
|
||||
Offset16To<TrackData>
|
||||
horizData; /* Offset from start of tracking table to TrackData
|
||||
* for horizontal text (or 0 if none). */
|
||||
OffsetTo<TrackData>
|
||||
Offset16To<TrackData>
|
||||
vertData; /* Offset from start of tracking table to TrackData
|
||||
* for vertical text (or 0 if none). */
|
||||
HBUINT16 reserved; /* Reserved. Set to 0. */
|
||||
|
@ -50,7 +50,7 @@ struct FTStringRange
|
||||
}
|
||||
|
||||
protected:
|
||||
NNOffsetTo<UnsizedArrayOf<HBUINT8>>
|
||||
NNOffset16To<UnsizedArrayOf<HBUINT8>>
|
||||
tag; /* Offset from the start of the table to
|
||||
* the beginning of the string */
|
||||
HBUINT16 length; /* String length (in bytes) */
|
||||
|
@ -218,7 +218,7 @@ struct TTCHeaderVersion1
|
||||
Tag ttcTag; /* TrueType Collection ID string: 'ttcf' */
|
||||
FixedVersion<>version; /* Version of the TTC Header (1.0),
|
||||
* 0x00010000u */
|
||||
LArrayOf<LOffsetTo<OpenTypeOffsetTable>>
|
||||
LArrayOf<Offset32To<OpenTypeOffsetTable>>
|
||||
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<LArrayOf<HBUINT8>, HBUINT24>
|
||||
NNOffset24To<LArrayOf<HBUINT8>>
|
||||
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<UnsizedArrayOf<ResourceRecord>>
|
||||
NNOffset16To<UnsizedArrayOf<ResourceRecord>>
|
||||
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<ArrayOfM1<ResourceTypeRecord>>
|
||||
NNOffset16To<ArrayOfM1<ResourceTypeRecord>>
|
||||
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<UnsizedArrayOf<HBUINT8>>
|
||||
NNOffset32To<UnsizedArrayOf<HBUINT8>>
|
||||
data; /* Offset from beginning of resource fork
|
||||
* to resource data */
|
||||
LNNOffsetTo<ResourceMap >
|
||||
NNOffset32To<ResourceMap >
|
||||
map; /* Offset from beginning of resource fork
|
||||
* to resource map */
|
||||
HBUINT32 dataLen; /* Length of resource data */
|
||||
|
@ -410,12 +410,14 @@ struct OffsetTo : Offset<OffsetType, has_null>
|
||||
DEFINE_SIZE_STATIC (sizeof (OffsetType));
|
||||
};
|
||||
/* Partial specializations. */
|
||||
template <typename Type, bool has_null=true>
|
||||
using LOffsetTo = OffsetTo<Type, HBUINT32, has_null>;
|
||||
template <typename Type, typename OffsetType=HBUINT16>
|
||||
using NNOffsetTo = OffsetTo<Type, OffsetType, false>;
|
||||
template <typename Type>
|
||||
using LNNOffsetTo = LOffsetTo<Type, false>;
|
||||
template <typename Type, bool has_null=true> using Offset16To = OffsetTo<Type, HBUINT16, has_null>;
|
||||
template <typename Type, bool has_null=true> using Offset24To = OffsetTo<Type, HBUINT24, has_null>;
|
||||
template <typename Type, bool has_null=true> using Offset32To = OffsetTo<Type, HBUINT32, has_null>;
|
||||
|
||||
template <typename Type, typename OffsetType> using NNOffsetTo = OffsetTo<Type, OffsetType, false>;
|
||||
template <typename Type> using NNOffset16To = Offset16To<Type, false>;
|
||||
template <typename Type> using NNOffset24To = Offset24To<Type, false>;
|
||||
template <typename Type> using NNOffset32To = Offset32To<Type, false>;
|
||||
|
||||
|
||||
/*
|
||||
|
@ -1045,9 +1045,9 @@ struct VariationSelectorRecord
|
||||
}
|
||||
|
||||
HBUINT24 varSelector; /* Variation selector. */
|
||||
LOffsetTo<DefaultUVS>
|
||||
Offset32To<DefaultUVS>
|
||||
defaultUVS; /* Offset to Default UVS Table. May be 0. */
|
||||
LOffsetTo<NonDefaultUVS>
|
||||
Offset32To<NonDefaultUVS>
|
||||
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<CmapSubtable>
|
||||
Offset32To<CmapSubtable>
|
||||
subtable; /* Byte offset from beginning of table to the subtable for this encoding. */
|
||||
public:
|
||||
DEFINE_SIZE_STATIC (8);
|
||||
|
@ -510,7 +510,7 @@ struct IndexSubtableRecord
|
||||
|
||||
HBGlyphID firstGlyphIndex;
|
||||
HBGlyphID lastGlyphIndex;
|
||||
LOffsetTo<IndexSubtable> offsetToSubtable;
|
||||
Offset32To<IndexSubtable> offsetToSubtable;
|
||||
public:
|
||||
DEFINE_SIZE_STATIC (8);
|
||||
};
|
||||
@ -672,7 +672,7 @@ struct BitmapSizeTable
|
||||
}
|
||||
|
||||
protected:
|
||||
LNNOffsetTo<IndexSubtableArray>
|
||||
NNOffset32To<IndexSubtableArray>
|
||||
indexSubtableArrayOffset;
|
||||
HBUINT32 indexTablesSize;
|
||||
HBUINT32 numberOfIndexSubtables;
|
||||
|
@ -263,9 +263,9 @@ struct COLR
|
||||
protected:
|
||||
HBUINT16 version; /* Table version number (starts at 0). */
|
||||
HBUINT16 numBaseGlyphs; /* Number of Base Glyph Records. */
|
||||
LNNOffsetTo<SortedUnsizedArrayOf<BaseGlyphRecord>>
|
||||
NNOffset32To<SortedUnsizedArrayOf<BaseGlyphRecord>>
|
||||
baseGlyphsZ; /* Offset to Base Glyph records. */
|
||||
LNNOffsetTo<UnsizedArrayOf<LayerRecord>>
|
||||
NNOffset32To<UnsizedArrayOf<LayerRecord>>
|
||||
layersZ; /* Offset to Layer Records. */
|
||||
HBUINT16 numLayers; /* Number of Layer Records. */
|
||||
public:
|
||||
|
@ -87,15 +87,15 @@ struct CPALV1Tail
|
||||
}
|
||||
|
||||
protected:
|
||||
LNNOffsetTo<UnsizedArrayOf<HBUINT32>>
|
||||
NNOffset32To<UnsizedArrayOf<HBUINT32>>
|
||||
paletteFlagsZ; /* Offset from the beginning of CPAL table to
|
||||
* the Palette Type Array. Set to 0 if no array
|
||||
* is provided. */
|
||||
LNNOffsetTo<UnsizedArrayOf<NameID>>
|
||||
NNOffset32To<UnsizedArrayOf<NameID>>
|
||||
paletteLabelsZ; /* Offset from the beginning of CPAL table to
|
||||
* the palette labels array. Set to 0 if no
|
||||
* array is provided. */
|
||||
LNNOffsetTo<UnsizedArrayOf<NameID>>
|
||||
NNOffset32To<UnsizedArrayOf<NameID>>
|
||||
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<UnsizedArrayOf<BGRAColor>>
|
||||
NNOffset32To<UnsizedArrayOf<BGRAColor>>
|
||||
colorRecordsZ; /* Offset from the beginning of CPAL table to
|
||||
* the first ColorRecord. */
|
||||
UnsizedArrayOf<HBUINT16>
|
||||
|
@ -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<LOffsetTo<SBIXGlyph>>
|
||||
UnsizedArrayOf<Offset32To<SBIXGlyph>>
|
||||
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<LOffsetTo<SBIXStrike>*> new_strikes;
|
||||
hb_vector_t<Offset32To<SBIXStrike>*> new_strikes;
|
||||
hb_vector_t<hb_serialize_context_t::objidx_t> objidxs;
|
||||
for (int i = strikes.len - 1; i >= 0; --i)
|
||||
{
|
||||
|
@ -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<UnsizedArrayOf<HBUINT8>>
|
||||
NNOffset32To<UnsizedArrayOf<HBUINT8>>
|
||||
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<SortedArrayOf<SVGDocumentIndexEntry>>
|
||||
Offset32To<SortedArrayOf<SVGDocumentIndexEntry>>
|
||||
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. */
|
||||
|
@ -103,7 +103,7 @@ struct BaseCoordFormat3
|
||||
protected:
|
||||
HBUINT16 format; /* Format identifier--format = 3 */
|
||||
FWORD coordinate; /* X or Y value, in design units */
|
||||
OffsetTo<Device>
|
||||
Offset16To<Device>
|
||||
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<BaseCoord>
|
||||
Offset16To<BaseCoord>
|
||||
minCoord; /* Offset to BaseCoord table that defines
|
||||
* the minimum extent value, from beginning
|
||||
* of MinMax table (may be NULL) */
|
||||
OffsetTo<BaseCoord>
|
||||
Offset16To<BaseCoord>
|
||||
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<BaseCoord>
|
||||
Offset16To<BaseCoord>
|
||||
minCoord; /* Offset to BaseCoord table that defines
|
||||
* minimum extent value, from the beginning
|
||||
* of MinMax table (may be NULL) */
|
||||
OffsetTo<BaseCoord>
|
||||
Offset16To<BaseCoord>
|
||||
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<MinMax>
|
||||
Offset16To<MinMax>
|
||||
minMax; /* Offset to MinMax table, from beginning
|
||||
* of BaseScript table */
|
||||
public:
|
||||
@ -305,10 +305,10 @@ struct BaseScript
|
||||
}
|
||||
|
||||
protected:
|
||||
OffsetTo<BaseValues>
|
||||
Offset16To<BaseValues>
|
||||
baseValues; /* Offset to BaseValues table, from beginning
|
||||
* of BaseScript table (may be NULL) */
|
||||
OffsetTo<MinMax>
|
||||
Offset16To<MinMax>
|
||||
defaultMinMax; /* Offset to MinMax table, from beginning of
|
||||
* BaseScript table (may be NULL) */
|
||||
SortedArrayOf<BaseLangSysRecord>
|
||||
@ -339,7 +339,7 @@ struct BaseScriptRecord
|
||||
|
||||
protected:
|
||||
Tag baseScriptTag; /* 4-byte script identification tag */
|
||||
OffsetTo<BaseScript>
|
||||
Offset16To<BaseScript>
|
||||
baseScript; /* Offset to BaseScript table, from beginning
|
||||
* of BaseScriptList */
|
||||
|
||||
@ -426,12 +426,12 @@ struct Axis
|
||||
}
|
||||
|
||||
protected:
|
||||
OffsetTo<SortedArrayOf<Tag>>
|
||||
Offset16To<SortedArrayOf<Tag>>
|
||||
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<BaseScriptList>
|
||||
Offset16To<BaseScriptList>
|
||||
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 */
|
||||
OffsetTo<Axis>hAxis; /* Offset to horizontal Axis table, from beginning
|
||||
Offset16To<Axis>hAxis; /* Offset to horizontal Axis table, from beginning
|
||||
* of BASE table (may be NULL) */
|
||||
OffsetTo<Axis>vAxis; /* Offset to vertical Axis table, from beginning
|
||||
Offset16To<Axis>vAxis; /* Offset to vertical Axis table, from beginning
|
||||
* of BASE table (may be NULL) */
|
||||
LOffsetTo<VariationStore>
|
||||
Offset32To<VariationStore>
|
||||
varStore; /* Offset to the table of Item Variation
|
||||
* Store--from beginning of BASE
|
||||
* header (may be NULL). Introduced
|
||||
|
@ -384,7 +384,7 @@ struct Record
|
||||
}
|
||||
|
||||
Tag tag; /* 4-byte Tag identifier */
|
||||
OffsetTo<Type>
|
||||
Offset16To<Type>
|
||||
offset; /* Offset from beginning of object holding
|
||||
* the Record */
|
||||
public:
|
||||
@ -394,9 +394,9 @@ struct Record
|
||||
template <typename Type>
|
||||
struct RecordArrayOf : SortedArrayOf<Record<Type>>
|
||||
{
|
||||
const OffsetTo<Type>& get_offset (unsigned int i) const
|
||||
const Offset16To<Type>& get_offset (unsigned int i) const
|
||||
{ return (*this)[i].offset; }
|
||||
OffsetTo<Type>& get_offset (unsigned int i)
|
||||
Offset16To<Type>& 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<LangSys>
|
||||
Offset16To<LangSys>
|
||||
defaultLangSys; /* Offset to DefaultLangSys table--from
|
||||
* beginning of Script table--may be Null */
|
||||
RecordArrayOf<LangSys>
|
||||
@ -1153,7 +1153,7 @@ struct Feature
|
||||
unsigned int new_offset_int = orig_offset -
|
||||
(((char *) this) - ((char *) closure->list_base));
|
||||
|
||||
OffsetTo<FeatureParams> new_offset;
|
||||
Offset16To<FeatureParams> 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<FeatureParams>
|
||||
Offset16To<FeatureParams>
|
||||
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 <TSubTable> ())
|
||||
| hb_filter ([this, glyphset, lookup_type] (const OffsetTo<TSubTable> &_) { return (this+_).intersects (glyphset, lookup_type); })
|
||||
| hb_filter ([this, glyphset, lookup_type] (const Offset16To<TSubTable> &_) { return (this+_).intersects (glyphset, lookup_type); })
|
||||
| hb_apply (subset_offset_array (c, out->get_subtables<TSubTable> (), this, lookup_type))
|
||||
;
|
||||
|
||||
@ -2861,7 +2861,7 @@ struct VariationStore
|
||||
|
||||
protected:
|
||||
HBUINT16 format;
|
||||
LOffsetTo<VarRegionList> regions;
|
||||
Offset32To<VarRegionList> regions;
|
||||
LOffsetArrayOf<VarData> dataSets;
|
||||
public:
|
||||
DEFINE_SIZE_ARRAY (8, dataSets);
|
||||
@ -3016,7 +3016,7 @@ struct FeatureTableSubstitutionRecord
|
||||
|
||||
protected:
|
||||
HBUINT16 featureIndex;
|
||||
LOffsetTo<Feature> feature;
|
||||
Offset32To<Feature> feature;
|
||||
public:
|
||||
DEFINE_SIZE_STATIC (6);
|
||||
};
|
||||
@ -3122,9 +3122,9 @@ struct FeatureVariationRecord
|
||||
}
|
||||
|
||||
protected:
|
||||
LOffsetTo<ConditionSet>
|
||||
Offset32To<ConditionSet>
|
||||
conditions;
|
||||
LOffsetTo<FeatureTableSubstitution>
|
||||
Offset32To<FeatureTableSubstitution>
|
||||
substitutions;
|
||||
public:
|
||||
DEFINE_SIZE_STATIC (8);
|
||||
|
@ -110,7 +110,7 @@ struct AttachList
|
||||
}
|
||||
|
||||
protected:
|
||||
OffsetTo<Coverage>
|
||||
Offset16To<Coverage>
|
||||
coverage; /* Offset to Coverage table -- from
|
||||
* beginning of AttachList table */
|
||||
OffsetArrayOf<AttachPoint>
|
||||
@ -220,7 +220,7 @@ struct CaretValueFormat3
|
||||
protected:
|
||||
HBUINT16 caretValueFormat; /* Format identifier--format = 3 */
|
||||
FWORD coordinate; /* X or Y value, in design units */
|
||||
OffsetTo<Device>
|
||||
Offset16To<Device>
|
||||
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<CaretValue>& offset : carets.iter ())
|
||||
for (const Offset16To<CaretValue>& offset : carets.iter ())
|
||||
(this+offset).collect_variation_indices (c->layout_variation_indices);
|
||||
}
|
||||
|
||||
@ -408,7 +408,7 @@ struct LigCaretList
|
||||
}
|
||||
|
||||
protected:
|
||||
OffsetTo<Coverage>
|
||||
Offset16To<Coverage>
|
||||
coverage; /* Offset to Coverage table--from
|
||||
* beginning of LigCaretList table */
|
||||
OffsetArrayOf<LigGlyph>
|
||||
@ -432,7 +432,7 @@ struct MarkGlyphSetsFormat1
|
||||
out->format = format;
|
||||
|
||||
bool ret = true;
|
||||
for (const LOffsetTo<Coverage>& offset : coverage.iter ())
|
||||
for (const Offset32To<Coverage>& 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<LOffsetTo<Coverage>>
|
||||
ArrayOf<Offset32To<Coverage>>
|
||||
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<ClassDef>
|
||||
Offset16To<ClassDef>
|
||||
glyphClassDef; /* Offset to class definition table
|
||||
* for glyph type--from beginning of
|
||||
* GDEF header (may be Null) */
|
||||
OffsetTo<AttachList>
|
||||
Offset16To<AttachList>
|
||||
attachList; /* Offset to list of glyphs with
|
||||
* attachment points--from beginning
|
||||
* of GDEF header (may be Null) */
|
||||
OffsetTo<LigCaretList>
|
||||
Offset16To<LigCaretList>
|
||||
ligCaretList; /* Offset to list of positioning points
|
||||
* for ligature carets--from beginning
|
||||
* of GDEF header (may be Null) */
|
||||
OffsetTo<ClassDef>
|
||||
Offset16To<ClassDef>
|
||||
markAttachClassDef; /* Offset to class definition table for
|
||||
* mark attachment type--from beginning
|
||||
* of GDEF header (may be Null) */
|
||||
OffsetTo<MarkGlyphSets>
|
||||
Offset16To<MarkGlyphSets>
|
||||
markGlyphSetsDef; /* Offset to the table of mark set
|
||||
* definitions--from beginning of GDEF
|
||||
* header (may be NULL). Introduced
|
||||
* in version 0x00010002. */
|
||||
LOffsetTo<VariationStore>
|
||||
Offset32To<VariationStore>
|
||||
varStore; /* Offset to the table of Item Variation
|
||||
* Store--from beginning of GDEF
|
||||
* header (may be NULL). Introduced
|
||||
|
@ -89,16 +89,16 @@ struct ValueFormat : HBUINT16
|
||||
HBINT16 yAdvance; /* Vertical adjustment for advance--in
|
||||
* design units (only used for vertical
|
||||
* writing) */
|
||||
OffsetTo<Device> xPlaDevice; /* Offset to Device table for
|
||||
Offset16To<Device> xPlaDevice; /* Offset to Device table for
|
||||
* horizontal placement--measured from
|
||||
* beginning of PosTable (may be NULL) */
|
||||
OffsetTo<Device> yPlaDevice; /* Offset to Device table for vertical
|
||||
Offset16To<Device> yPlaDevice; /* Offset to Device table for vertical
|
||||
* placement--measured from beginning
|
||||
* of PosTable (may be NULL) */
|
||||
OffsetTo<Device> xAdvDevice; /* Offset to Device table for
|
||||
Offset16To<Device> xAdvDevice; /* Offset to Device table for
|
||||
* horizontal advance--measured from
|
||||
* beginning of PosTable (may be NULL) */
|
||||
OffsetTo<Device> yAdvDevice; /* Offset to Device table for vertical
|
||||
Offset16To<Device> 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<Device>& get_device (Value* value)
|
||||
static inline Offset16To<Device>& get_device (Value* value)
|
||||
{
|
||||
return *static_cast<OffsetTo<Device> *> (value);
|
||||
return *static_cast<Offset16To<Device> *> (value);
|
||||
}
|
||||
static inline const OffsetTo<Device>& get_device (const Value* value, bool *worked=nullptr)
|
||||
static inline const Offset16To<Device>& get_device (const Value* value, bool *worked=nullptr)
|
||||
{
|
||||
if (worked) *worked |= bool (*value);
|
||||
return *static_cast<const OffsetTo<Device> *> (value);
|
||||
return *static_cast<const Offset16To<Device> *> (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<Device>
|
||||
Offset16To<Device>
|
||||
xDeviceTable; /* Offset to Device table for X
|
||||
* coordinate-- from beginning of
|
||||
* Anchor table (may be NULL) */
|
||||
OffsetTo<Device>
|
||||
Offset16To<Device>
|
||||
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<OffsetTo<Anchor>>
|
||||
UnsizedArrayOf<Offset16To<Anchor>>
|
||||
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<Anchor>
|
||||
Offset16To<Anchor>
|
||||
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<Coverage>
|
||||
Offset16To<Coverage>
|
||||
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<Coverage>
|
||||
Offset16To<Coverage>
|
||||
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<PairSet> &_)
|
||||
| hb_map ([glyphs, this] (const Offset16To<PairSet> &_)
|
||||
{ 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<PairSet>& _)
|
||||
| hb_filter ([this, c, out] (const Offset16To<PairSet>& _)
|
||||
{
|
||||
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<Coverage>
|
||||
Offset16To<Coverage>
|
||||
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<Coverage>
|
||||
Offset16To<Coverage>
|
||||
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<ClassDef>
|
||||
Offset16To<ClassDef>
|
||||
classDef1; /* Offset to ClassDef table--from
|
||||
* beginning of PairPos subtable--for
|
||||
* the first glyph of the pair */
|
||||
OffsetTo<ClassDef>
|
||||
Offset16To<ClassDef>
|
||||
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<Anchor>
|
||||
Offset16To<Anchor>
|
||||
entryAnchor; /* Offset to EntryAnchor table--from
|
||||
* beginning of CursivePos
|
||||
* subtable--may be NULL */
|
||||
OffsetTo<Anchor>
|
||||
Offset16To<Anchor>
|
||||
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<Coverage>
|
||||
Offset16To<Coverage>
|
||||
coverage; /* Offset to Coverage table--from
|
||||
* beginning of subtable */
|
||||
ArrayOf<EntryExitRecord>
|
||||
@ -2005,17 +2005,17 @@ struct MarkBasePosFormat1
|
||||
|
||||
protected:
|
||||
HBUINT16 format; /* Format identifier--format = 1 */
|
||||
OffsetTo<Coverage>
|
||||
Offset16To<Coverage>
|
||||
markCoverage; /* Offset to MarkCoverage table--from
|
||||
* beginning of MarkBasePos subtable */
|
||||
OffsetTo<Coverage>
|
||||
Offset16To<Coverage>
|
||||
baseCoverage; /* Offset to BaseCoverage table--from
|
||||
* beginning of MarkBasePos subtable */
|
||||
HBUINT16 classCount; /* Number of classes defined for marks */
|
||||
OffsetTo<MarkArray>
|
||||
Offset16To<MarkArray>
|
||||
markArray; /* Offset to MarkArray table--from
|
||||
* beginning of MarkBasePos subtable */
|
||||
OffsetTo<BaseArray>
|
||||
Offset16To<BaseArray>
|
||||
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<Coverage>
|
||||
Offset16To<Coverage>
|
||||
markCoverage; /* Offset to Mark Coverage table--from
|
||||
* beginning of MarkLigPos subtable */
|
||||
OffsetTo<Coverage>
|
||||
Offset16To<Coverage>
|
||||
ligatureCoverage; /* Offset to Ligature Coverage
|
||||
* table--from beginning of MarkLigPos
|
||||
* subtable */
|
||||
HBUINT16 classCount; /* Number of defined mark classes */
|
||||
OffsetTo<MarkArray>
|
||||
Offset16To<MarkArray>
|
||||
markArray; /* Offset to MarkArray table--from
|
||||
* beginning of MarkLigPos subtable */
|
||||
OffsetTo<LigatureArray>
|
||||
Offset16To<LigatureArray>
|
||||
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<Coverage>
|
||||
Offset16To<Coverage>
|
||||
mark1Coverage; /* Offset to Combining Mark1 Coverage
|
||||
* table--from beginning of MarkMarkPos
|
||||
* subtable */
|
||||
OffsetTo<Coverage>
|
||||
Offset16To<Coverage>
|
||||
mark2Coverage; /* Offset to Combining Mark2 Coverage
|
||||
* table--from beginning of MarkMarkPos
|
||||
* subtable */
|
||||
HBUINT16 classCount; /* Number of defined mark classes */
|
||||
OffsetTo<MarkArray>
|
||||
Offset16To<MarkArray>
|
||||
mark1Array; /* Offset to Mark1Array table--from
|
||||
* beginning of MarkMarkPos subtable */
|
||||
OffsetTo<Mark2Array>
|
||||
Offset16To<Mark2Array>
|
||||
mark2Array; /* Offset to Mark2Array table--from
|
||||
* beginning of MarkMarkPos subtable */
|
||||
public:
|
||||
|
@ -138,7 +138,7 @@ struct SingleSubstFormat1
|
||||
|
||||
protected:
|
||||
HBUINT16 format; /* Format identifier--format = 1 */
|
||||
OffsetTo<Coverage>
|
||||
Offset16To<Coverage>
|
||||
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<Coverage>
|
||||
Offset16To<Coverage>
|
||||
coverage; /* Offset to Coverage table--from
|
||||
* beginning of Substitution table */
|
||||
ArrayOf<HBGlyphID>
|
||||
@ -488,7 +488,7 @@ struct MultipleSubstFormat1
|
||||
|
||||
protected:
|
||||
HBUINT16 format; /* Format identifier--format = 1 */
|
||||
OffsetTo<Coverage>
|
||||
Offset16To<Coverage>
|
||||
coverage; /* Offset to Coverage table--from
|
||||
* beginning of Substitution table */
|
||||
OffsetArrayOf<Sequence>
|
||||
@ -727,7 +727,7 @@ struct AlternateSubstFormat1
|
||||
|
||||
protected:
|
||||
HBUINT16 format; /* Format identifier--format = 1 */
|
||||
OffsetTo<Coverage>
|
||||
Offset16To<Coverage>
|
||||
coverage; /* Offset to Coverage table--from
|
||||
* beginning of Substitution table */
|
||||
OffsetArrayOf<AlternateSet>
|
||||
@ -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<LigatureSet> &_)
|
||||
| hb_map ([this, glyphs] (const Offset16To<LigatureSet> &_)
|
||||
{ return (this+_).intersects (glyphs); })
|
||||
| hb_any
|
||||
;
|
||||
@ -1107,7 +1107,7 @@ struct LigatureSubstFormat1
|
||||
|
||||
protected:
|
||||
HBUINT16 format; /* Format identifier--format = 1 */
|
||||
OffsetTo<Coverage>
|
||||
Offset16To<Coverage>
|
||||
coverage; /* Offset to Coverage table--from
|
||||
* beginning of Substitution table */
|
||||
OffsetArrayOf<LigatureSet>
|
||||
@ -1364,7 +1364,7 @@ struct ReverseChainSingleSubstFormat1
|
||||
|
||||
protected:
|
||||
HBUINT16 format; /* Format identifier--format = 1 */
|
||||
OffsetTo<Coverage>
|
||||
Offset16To<Coverage>
|
||||
coverage; /* Offset to Coverage table--from
|
||||
* beginning of table */
|
||||
OffsetArrayOf<Coverage>
|
||||
|
@ -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> &coverage = (const OffsetTo<Coverage>&)value;
|
||||
const Offset16To<Coverage> &coverage = (const OffsetTo<Coverage>&)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> coverage;
|
||||
Offset16To<Coverage> 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> &coverage = (const OffsetTo<Coverage>&)value;
|
||||
const Offset16To<Coverage> &coverage = (const OffsetTo<Coverage>&)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> &coverage = (const OffsetTo<Coverage>&)value;
|
||||
const Offset16To<Coverage> &coverage = (const OffsetTo<Coverage>&)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>& _ : rule)
|
||||
for (const Offset16To<Rule>& _ : 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<Coverage>
|
||||
Offset16To<Coverage>
|
||||
coverage; /* Offset to Coverage table--from
|
||||
* beginning of table */
|
||||
OffsetArrayOf<RuleSet>
|
||||
@ -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<unsigned, const OffsetTo<RuleSet>&> _)
|
||||
| hb_apply ([&] (const hb_pair_t<unsigned, const Offset16To<RuleSet>&> _)
|
||||
{
|
||||
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<Coverage>
|
||||
Offset16To<Coverage>
|
||||
coverage; /* Offset to Coverage table--from
|
||||
* beginning of table */
|
||||
OffsetTo<ClassDef>
|
||||
Offset16To<ClassDef>
|
||||
classDef; /* Offset to glyph ClassDef table--from
|
||||
* beginning of table */
|
||||
OffsetArrayOf<RuleSet>
|
||||
@ -2218,10 +2218,10 @@ struct ContextFormat3
|
||||
|
||||
auto coverages = coverageZ.as_array (glyphCount);
|
||||
|
||||
for (const OffsetTo<Coverage>& offset : coverages)
|
||||
for (const Offset16To<Coverage>& offset : coverages)
|
||||
{
|
||||
/* TODO(subset) This looks like should not be necessary to write this way. */
|
||||
auto *o = c->serializer->allocate_size<OffsetTo<Coverage>> (OffsetTo<Coverage>::static_size);
|
||||
auto *o = c->serializer->allocate_size<Offset16To<Coverage>> (OffsetTo<Coverage>::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<OffsetTo<Coverage>>
|
||||
UnsizedArrayOf<Offset16To<Coverage>>
|
||||
coverageZ; /* Array of offsets to Coverage
|
||||
* table in glyph sequence order */
|
||||
/*UnsizedArrayOf<LookupRecord>
|
||||
@ -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<ChainRule>& _ : rule)
|
||||
for (const Offset16To<ChainRule>& _ : 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<Coverage>
|
||||
Offset16To<Coverage>
|
||||
coverage; /* Offset to Coverage table--from
|
||||
* beginning of table */
|
||||
OffsetArrayOf<ChainRuleSet>
|
||||
@ -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<unsigned, const OffsetTo<ChainRuleSet>&> _)
|
||||
| hb_apply ([&] (const hb_pair_t<unsigned, const Offset16To<ChainRuleSet>&> _)
|
||||
{
|
||||
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<ChainRuleSet>& _ : + hb_enumerate (ruleSet)
|
||||
for (const Offset16To<ChainRuleSet>& _ : + 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<Coverage>
|
||||
Offset16To<Coverage>
|
||||
coverage; /* Offset to Coverage table--from
|
||||
* beginning of table */
|
||||
OffsetTo<ClassDef>
|
||||
Offset16To<ClassDef>
|
||||
backtrackClassDef; /* Offset to glyph ClassDef table
|
||||
* containing backtrack sequence
|
||||
* data--from beginning of table */
|
||||
OffsetTo<ClassDef>
|
||||
Offset16To<ClassDef>
|
||||
inputClassDef; /* Offset to glyph ClassDef
|
||||
* table containing input sequence
|
||||
* data--from beginning of table */
|
||||
OffsetTo<ClassDef>
|
||||
Offset16To<ClassDef>
|
||||
lookaheadClassDef; /* Offset to glyph ClassDef table
|
||||
* containing lookahead sequence
|
||||
* data--from beginning of table */
|
||||
@ -3376,7 +3376,7 @@ struct ExtensionFormat1
|
||||
|
||||
template <typename X>
|
||||
const X& get_subtable () const
|
||||
{ return this + reinterpret_cast<const LOffsetTo<typename T::SubTable> &> (extensionOffset); }
|
||||
{ return this + reinterpret_cast<const Offset32To<typename T::SubTable> &> (extensionOffset); }
|
||||
|
||||
template <typename context_t, typename ...Ts>
|
||||
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<const LOffsetTo<typename T::SubTable> &> (extensionOffset);
|
||||
reinterpret_cast<const Offset32To<typename T::SubTable> &> (extensionOffset);
|
||||
auto& dest_offset =
|
||||
reinterpret_cast<LOffsetTo<typename T::SubTable> &> (out->extensionOffset);
|
||||
reinterpret_cast<Offset32To<typename T::SubTable> &> (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<TLookup> TLookupList;
|
||||
reinterpret_cast<OffsetTo<TLookupList> &> (out->lookupList)
|
||||
reinterpret_cast<Offset16To<TLookupList> &> (out->lookupList)
|
||||
.serialize_subset (c->subset_context,
|
||||
reinterpret_cast<const OffsetTo<TLookupList> &> (lookupList),
|
||||
reinterpret_cast<const Offset16To<TLookupList> &> (lookupList),
|
||||
this,
|
||||
c);
|
||||
|
||||
reinterpret_cast<OffsetTo<RecordListOfFeature> &> (out->featureList)
|
||||
reinterpret_cast<Offset16To<RecordListOfFeature> &> (out->featureList)
|
||||
.serialize_subset (c->subset_context,
|
||||
reinterpret_cast<const OffsetTo<RecordListOfFeature> &> (featureList),
|
||||
reinterpret_cast<const Offset16To<RecordListOfFeature> &> (featureList),
|
||||
this,
|
||||
c);
|
||||
|
||||
@ -3750,7 +3750,7 @@ struct GSUBGPOS
|
||||
likely (version.major == 1) &&
|
||||
scriptList.sanitize (c, this) &&
|
||||
featureList.sanitize (c, this) &&
|
||||
reinterpret_cast<const OffsetTo<TLookupList> &> (lookupList).sanitize (c, this))))
|
||||
reinterpret_cast<const Offset16To<TLookupList> &> (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<ScriptList>
|
||||
Offset16To<ScriptList>
|
||||
scriptList; /* ScriptList table */
|
||||
OffsetTo<FeatureList>
|
||||
Offset16To<FeatureList>
|
||||
featureList; /* FeatureList table */
|
||||
OffsetTo<LookupList>
|
||||
Offset16To<LookupList>
|
||||
lookupList; /* LookupList table */
|
||||
LOffsetTo<FeatureVariations>
|
||||
Offset32To<FeatureVariations>
|
||||
featureVars; /* Offset to Feature Variations
|
||||
table--from beginning of table
|
||||
* (may be NULL). Introduced
|
||||
|
@ -71,43 +71,43 @@ struct JstfPriority
|
||||
}
|
||||
|
||||
protected:
|
||||
OffsetTo<JstfModList>
|
||||
Offset16To<JstfModList>
|
||||
shrinkageEnableGSUB; /* Offset to Shrinkage Enable GSUB
|
||||
* JstfModList table--from beginning of
|
||||
* JstfPriority table--may be NULL */
|
||||
OffsetTo<JstfModList>
|
||||
Offset16To<JstfModList>
|
||||
shrinkageDisableGSUB; /* Offset to Shrinkage Disable GSUB
|
||||
* JstfModList table--from beginning of
|
||||
* JstfPriority table--may be NULL */
|
||||
OffsetTo<JstfModList>
|
||||
Offset16To<JstfModList>
|
||||
shrinkageEnableGPOS; /* Offset to Shrinkage Enable GPOS
|
||||
* JstfModList table--from beginning of
|
||||
* JstfPriority table--may be NULL */
|
||||
OffsetTo<JstfModList>
|
||||
Offset16To<JstfModList>
|
||||
shrinkageDisableGPOS; /* Offset to Shrinkage Disable GPOS
|
||||
* JstfModList table--from beginning of
|
||||
* JstfPriority table--may be NULL */
|
||||
OffsetTo<JstfMax>
|
||||
Offset16To<JstfMax>
|
||||
shrinkageJstfMax; /* Offset to Shrinkage JstfMax table--
|
||||
* from beginning of JstfPriority table
|
||||
* --may be NULL */
|
||||
OffsetTo<JstfModList>
|
||||
Offset16To<JstfModList>
|
||||
extensionEnableGSUB; /* Offset to Extension Enable GSUB
|
||||
* JstfModList table--from beginning of
|
||||
* JstfPriority table--may be NULL */
|
||||
OffsetTo<JstfModList>
|
||||
Offset16To<JstfModList>
|
||||
extensionDisableGSUB; /* Offset to Extension Disable GSUB
|
||||
* JstfModList table--from beginning of
|
||||
* JstfPriority table--may be NULL */
|
||||
OffsetTo<JstfModList>
|
||||
Offset16To<JstfModList>
|
||||
extensionEnableGPOS; /* Offset to Extension Enable GPOS
|
||||
* JstfModList table--from beginning of
|
||||
* JstfPriority table--may be NULL */
|
||||
OffsetTo<JstfModList>
|
||||
Offset16To<JstfModList>
|
||||
extensionDisableGPOS; /* Offset to Extension Disable GPOS
|
||||
* JstfModList table--from beginning of
|
||||
* JstfPriority table--may be NULL */
|
||||
OffsetTo<JstfMax>
|
||||
Offset16To<JstfMax>
|
||||
extensionJstfMax; /* Offset to Extension JstfMax table--
|
||||
* from beginning of JstfPriority table
|
||||
* --may be NULL */
|
||||
@ -174,10 +174,10 @@ struct JstfScript
|
||||
}
|
||||
|
||||
protected:
|
||||
OffsetTo<ExtenderGlyphs>
|
||||
Offset16To<ExtenderGlyphs>
|
||||
extenderGlyphs; /* Offset to ExtenderGlyph table--from beginning
|
||||
* of JstfScript table-may be NULL */
|
||||
OffsetTo<JstfLangSys>
|
||||
Offset16To<JstfLangSys>
|
||||
defaultLangSys; /* Offset to DefaultJstfLangSys table--from
|
||||
* beginning of JstfScript table--may be Null */
|
||||
RecordArrayOf<JstfLangSys>
|
||||
|
@ -49,7 +49,7 @@ struct MathValueRecord
|
||||
|
||||
protected:
|
||||
HBINT16 value; /* The X or Y value in design units */
|
||||
OffsetTo<Device> deviceTable; /* Offset to the device table - from the
|
||||
Offset16To<Device> 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> coverage; /* Offset to Coverage table -
|
||||
Offset16To<Coverage> coverage; /* Offset to Coverage table -
|
||||
* from the beginning of
|
||||
* MathItalicsCorrectionInfo
|
||||
* table. */
|
||||
@ -214,7 +214,7 @@ struct MathTopAccentAttachment
|
||||
}
|
||||
|
||||
protected:
|
||||
OffsetTo<Coverage> topAccentCoverage; /* Offset to Coverage table -
|
||||
Offset16To<Coverage> 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> mathKern[4];
|
||||
Offset16To<MathKern> mathKern[4];
|
||||
|
||||
public:
|
||||
DEFINE_SIZE_STATIC (8);
|
||||
@ -346,7 +346,7 @@ struct MathKernInfo
|
||||
}
|
||||
|
||||
protected:
|
||||
OffsetTo<Coverage>
|
||||
Offset16To<Coverage>
|
||||
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> mathItalicsCorrectionInfo;
|
||||
Offset16To<MathItalicsCorrectionInfo> mathItalicsCorrectionInfo;
|
||||
|
||||
/* Offset to MathTopAccentAttachment table -
|
||||
* from the beginning of MathGlyphInfo table. */
|
||||
OffsetTo<MathTopAccentAttachment> mathTopAccentAttachment;
|
||||
Offset16To<MathTopAccentAttachment> 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<Coverage> extendedShapeCoverage;
|
||||
Offset16To<Coverage> extendedShapeCoverage;
|
||||
|
||||
/* Offset to MathKernInfo table -
|
||||
* from the beginning of MathGlyphInfo table. */
|
||||
OffsetTo<MathKernInfo> mathKernInfo;
|
||||
Offset16To<MathKernInfo> 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<MathGlyphAssembly> glyphAssembly;
|
||||
Offset16To<MathGlyphAssembly> glyphAssembly;
|
||||
|
||||
/* MathGlyphVariantRecords for alternative variants of the glyphs. */
|
||||
ArrayOf<MathGlyphVariantRecord> mathGlyphVariantRecord;
|
||||
@ -636,7 +636,7 @@ struct MathVariants
|
||||
{
|
||||
bool vertical = HB_DIRECTION_IS_VERTICAL (direction);
|
||||
unsigned int count = vertical ? vertGlyphCount : horizGlyphCount;
|
||||
const OffsetTo<Coverage> &coverage = vertical ? vertGlyphCoverage
|
||||
const Offset16To<Coverage> &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<Coverage> vertGlyphCoverage;
|
||||
Offset16To<Coverage> vertGlyphCoverage;
|
||||
/* Offset to Coverage table -
|
||||
* from the beginning of MathVariants
|
||||
* table. */
|
||||
OffsetTo<Coverage> horizGlyphCoverage;
|
||||
Offset16To<Coverage> 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<OffsetTo<MathGlyphConstruction>>
|
||||
UnsizedArrayOf<Offset16To<MathGlyphConstruction>>
|
||||
glyphConstruction;
|
||||
|
||||
public:
|
||||
@ -711,11 +711,11 @@ struct MATH
|
||||
protected:
|
||||
FixedVersion<>version; /* Version of the MATH table
|
||||
* initially set to 0x00010000u */
|
||||
OffsetTo<MathConstants>
|
||||
Offset16To<MathConstants>
|
||||
mathConstants; /* MathConstants table */
|
||||
OffsetTo<MathGlyphInfo>
|
||||
Offset16To<MathGlyphInfo>
|
||||
mathGlyphInfo; /* MathGlyphInfo table */
|
||||
OffsetTo<MathVariants>
|
||||
Offset16To<MathVariants>
|
||||
mathVariants; /* MathVariants table */
|
||||
|
||||
public:
|
||||
|
@ -56,7 +56,7 @@ struct DataMap
|
||||
|
||||
protected:
|
||||
Tag tag; /* A tag indicating the type of metadata. */
|
||||
LNNOffsetTo<UnsizedArrayOf<HBUINT8>>
|
||||
NNOffset32To<UnsizedArrayOf<HBUINT8>>
|
||||
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
|
||||
|
@ -149,7 +149,7 @@ struct NameRecord
|
||||
HBUINT16 languageID; /* Language ID. */
|
||||
HBUINT16 nameID; /* Name ID. */
|
||||
HBUINT16 length; /* String length (in bytes). */
|
||||
NNOffsetTo<UnsizedArrayOf<HBUINT8>>
|
||||
NNOffset16To<UnsizedArrayOf<HBUINT8>>
|
||||
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<UnsizedArrayOf<HBUINT8>>
|
||||
NNOffset16To<UnsizedArrayOf<HBUINT8>>
|
||||
stringOffset; /* Offset to start of string storage (from start of table). */
|
||||
UnsizedArrayOf<NameRecord>
|
||||
nameRecordZ; /* The name records where count is the number of records. */
|
||||
|
@ -208,7 +208,7 @@ struct ManifestLookup
|
||||
{
|
||||
public:
|
||||
OT::Tag tag;
|
||||
OT::OffsetTo<OT::SubstLookup> lookupOffset;
|
||||
OT::Offset16To<OT::SubstLookup> lookupOffset;
|
||||
public:
|
||||
DEFINE_SIZE_STATIC (6);
|
||||
};
|
||||
|
@ -297,7 +297,7 @@ struct STAT
|
||||
unsigned int axis_index;
|
||||
if (!get_design_axes ().lfind (tag, &axis_index)) return false;
|
||||
|
||||
hb_array_t<const OffsetTo<AxisValue>> axis_values = get_axis_value_offsets ();
|
||||
hb_array_t<const Offset16To<AxisValue>> 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 StatAxisRecord> const get_design_axes () const
|
||||
{ return (this+designAxesOffset).as_array (designAxisCount); }
|
||||
|
||||
hb_array_t<const OffsetTo<AxisValue>> const get_axis_value_offsets () const
|
||||
hb_array_t<const Offset16To<AxisValue>> 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<UnsizedArrayOf<StatAxisRecord>>
|
||||
NNOffset32To<UnsizedArrayOf<StatAxisRecord>>
|
||||
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<UnsizedArrayOf<OffsetTo<AxisValue>>>
|
||||
NNOffset32To<UnsizedArrayOf<Offset16To<AxisValue>>>
|
||||
offsetToAxisValueOffsets;
|
||||
/* Offset in bytes from the beginning of
|
||||
* the STAT table to the start of the design
|
||||
|
@ -303,7 +303,7 @@ struct fvar
|
||||
protected:
|
||||
FixedVersion<>version; /* Version of the fvar table
|
||||
* initially set to 0x00010000u */
|
||||
OffsetTo<AxisRecord>
|
||||
Offset16To<AxisRecord>
|
||||
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. */
|
||||
|
@ -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<HBUINT8>
|
||||
Offset16To<HBUINT8>
|
||||
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<UnsizedArrayOf<F2DOT14>>
|
||||
NNOffset32To<UnsizedArrayOf<F2DOT14>>
|
||||
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<GlyphVariationData>
|
||||
Offset32To<GlyphVariationData>
|
||||
dataZ; /* Offset from the start of this table to the array of
|
||||
* GlyphVariationData tables. */
|
||||
UnsizedArrayOf<HBUINT8>
|
||||
|
@ -425,13 +425,13 @@ struct HVARVVAR
|
||||
protected:
|
||||
FixedVersion<>version; /* Version of the metrics variation table
|
||||
* initially set to 0x00010000u */
|
||||
LOffsetTo<VariationStore>
|
||||
Offset32To<VariationStore>
|
||||
varStore; /* Offset to item variation store table. */
|
||||
LOffsetTo<DeltaSetIndexMap>
|
||||
Offset32To<DeltaSetIndexMap>
|
||||
advMap; /* Offset to advance var-idx mapping. */
|
||||
LOffsetTo<DeltaSetIndexMap>
|
||||
Offset32To<DeltaSetIndexMap>
|
||||
lsbMap; /* Offset to lsb/tsb var-idx mapping. */
|
||||
LOffsetTo<DeltaSetIndexMap>
|
||||
Offset32To<DeltaSetIndexMap>
|
||||
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<VVAR> (c); }
|
||||
|
||||
protected:
|
||||
LOffsetTo<DeltaSetIndexMap>
|
||||
Offset32To<DeltaSetIndexMap>
|
||||
vorgMap; /* Offset to vertical-origin var-idx mapping. */
|
||||
|
||||
public:
|
||||
|
@ -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<VariationStore>
|
||||
Offset16To<VariationStore>
|
||||
varStore; /* Offset to item variation store table. */
|
||||
UnsizedArrayOf<HBUINT8>
|
||||
valuesZ; /* Array of value records. The records must be
|
||||
|
Loading…
Reference in New Issue
Block a user