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