Remove space between right angle brackets now that we have C++11 (#1689)
This commit is contained in:
parent
f27fdca4aa
commit
92588782d7
|
@ -83,7 +83,7 @@ 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> > >
|
LOffsetTo<Lookup<NNOffsetTo<GlyphAnchors>>>
|
||||||
lookupTable; /* Offset to the table's lookup table */
|
lookupTable; /* Offset to the table's lookup table */
|
||||||
LNNOffsetTo<HBUINT8>
|
LNNOffsetTo<HBUINT8>
|
||||||
anchorData; /* Offset to the glyph data table */
|
anchorData; /* Offset to the glyph data table */
|
||||||
|
|
|
@ -125,7 +125,7 @@ struct LookupFormat2
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
HBUINT16 format; /* Format identifier--format = 2 */
|
HBUINT16 format; /* Format identifier--format = 2 */
|
||||||
VarSizedBinSearchArrayOf<LookupSegmentSingle<T> >
|
VarSizedBinSearchArrayOf<LookupSegmentSingle<T>>
|
||||||
segments; /* The actual segments. These must already be sorted,
|
segments; /* The actual segments. These must already be sorted,
|
||||||
* according to the first word in each one (the last
|
* according to the first word in each one (the last
|
||||||
* glyph in each segment). */
|
* glyph in each segment). */
|
||||||
|
@ -164,7 +164,7 @@ struct LookupSegmentArray
|
||||||
|
|
||||||
GlyphID last; /* Last GlyphID in this segment */
|
GlyphID last; /* Last GlyphID in this segment */
|
||||||
GlyphID first; /* First GlyphID in this segment */
|
GlyphID first; /* First GlyphID in this segment */
|
||||||
NNOffsetTo<UnsizedArrayOf<T> >
|
NNOffsetTo<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:
|
||||||
|
@ -196,7 +196,7 @@ struct LookupFormat4
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
HBUINT16 format; /* Format identifier--format = 4 */
|
HBUINT16 format; /* Format identifier--format = 4 */
|
||||||
VarSizedBinSearchArrayOf<LookupSegmentArray<T> >
|
VarSizedBinSearchArrayOf<LookupSegmentArray<T>>
|
||||||
segments; /* The actual segments. These must already be sorted,
|
segments; /* The actual segments. These must already be sorted,
|
||||||
* according to the first word in each one (the last
|
* according to the first word in each one (the last
|
||||||
* glyph in each segment). */
|
* glyph in each segment). */
|
||||||
|
@ -253,7 +253,7 @@ struct LookupFormat6
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
HBUINT16 format; /* Format identifier--format = 6 */
|
HBUINT16 format; /* Format identifier--format = 6 */
|
||||||
VarSizedBinSearchArrayOf<LookupSingle<T> >
|
VarSizedBinSearchArrayOf<LookupSingle<T>>
|
||||||
entries; /* The actual entries, sorted by glyph index. */
|
entries; /* The actual entries, sorted by glyph index. */
|
||||||
public:
|
public:
|
||||||
DEFINE_SIZE_ARRAY (8, entries);
|
DEFINE_SIZE_ARRAY (8, entries);
|
||||||
|
@ -419,7 +419,7 @@ struct Lookup
|
||||||
/* Ugly hand-coded null objects for template Lookup<> :(. */
|
/* Ugly hand-coded null objects for template Lookup<> :(. */
|
||||||
extern HB_INTERNAL const unsigned char _hb_Null_AAT_Lookup[2];
|
extern HB_INTERNAL const unsigned char _hb_Null_AAT_Lookup[2];
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct Null<AAT::Lookup<T> > {
|
struct Null<AAT::Lookup<T>> {
|
||||||
static AAT::Lookup<T> const & get_null ()
|
static AAT::Lookup<T> const & get_null ()
|
||||||
{ return *reinterpret_cast<const AAT::Lookup<T> *> (_hb_Null_AAT_Lookup); }
|
{ return *reinterpret_cast<const AAT::Lookup<T> *> (_hb_Null_AAT_Lookup); }
|
||||||
};
|
};
|
||||||
|
@ -510,7 +510,7 @@ struct StateTable
|
||||||
const Entry<Extra> &get_entry (int state, unsigned int klass) const
|
const Entry<Extra> &get_entry (int state, unsigned int klass) const
|
||||||
{
|
{
|
||||||
if (unlikely (klass >= nClasses))
|
if (unlikely (klass >= nClasses))
|
||||||
klass = StateTable<Types, Entry<Extra> >::CLASS_OUT_OF_BOUNDS;
|
klass = StateTable<Types, Entry<Extra>>::CLASS_OUT_OF_BOUNDS;
|
||||||
|
|
||||||
const HBUSHORT *states = (this+stateArrayTable).arrayZ;
|
const HBUSHORT *states = (this+stateArrayTable).arrayZ;
|
||||||
const Entry<Extra> *entries = (this+entryTable).arrayZ;
|
const Entry<Extra> *entries = (this+entryTable).arrayZ;
|
||||||
|
@ -631,7 +631,7 @@ struct StateTable
|
||||||
classTable; /* Offset to the class table. */
|
classTable; /* Offset to the class table. */
|
||||||
NNOffsetTo<UnsizedArrayOf<HBUSHORT>, HBUINT>
|
NNOffsetTo<UnsizedArrayOf<HBUSHORT>, HBUINT>
|
||||||
stateArrayTable;/* Offset to the state array. */
|
stateArrayTable;/* Offset to the state array. */
|
||||||
NNOffsetTo<UnsizedArrayOf<Entry<Extra> >, HBUINT>
|
NNOffsetTo<UnsizedArrayOf<Entry<Extra>>, HBUINT>
|
||||||
entryTable; /* Offset to the entry array. */
|
entryTable; /* Offset to the entry array. */
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -309,7 +309,7 @@ struct WidthDeltaPair
|
||||||
public:
|
public:
|
||||||
DEFINE_SIZE_STATIC (24);
|
DEFINE_SIZE_STATIC (24);
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef OT::LArrayOf<WidthDeltaPair> WidthDeltaCluster;
|
typedef OT::LArrayOf<WidthDeltaPair> WidthDeltaCluster;
|
||||||
|
|
||||||
struct JustificationCategory
|
struct JustificationCategory
|
||||||
|
@ -371,7 +371,7 @@ struct JustificationHeader
|
||||||
* 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<OffsetTo<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. */
|
||||||
|
|
|
@ -712,18 +712,18 @@ struct KerxSubTableFormat6
|
||||||
{
|
{
|
||||||
struct Long
|
struct Long
|
||||||
{
|
{
|
||||||
LNNOffsetTo<Lookup<HBUINT32> > rowIndexTable;
|
LNNOffsetTo<Lookup<HBUINT32>> rowIndexTable;
|
||||||
LNNOffsetTo<Lookup<HBUINT32> > columnIndexTable;
|
LNNOffsetTo<Lookup<HBUINT32>> columnIndexTable;
|
||||||
LNNOffsetTo<UnsizedArrayOf<FWORD32> > array;
|
LNNOffsetTo<UnsizedArrayOf<FWORD32>> array;
|
||||||
} l;
|
} l;
|
||||||
struct Short
|
struct Short
|
||||||
{
|
{
|
||||||
LNNOffsetTo<Lookup<HBUINT16> > rowIndexTable;
|
LNNOffsetTo<Lookup<HBUINT16>> rowIndexTable;
|
||||||
LNNOffsetTo<Lookup<HBUINT16> > columnIndexTable;
|
LNNOffsetTo<Lookup<HBUINT16>> columnIndexTable;
|
||||||
LNNOffsetTo<UnsizedArrayOf<FWORD> > array;
|
LNNOffsetTo<UnsizedArrayOf<FWORD>> array;
|
||||||
} s;
|
} s;
|
||||||
} u;
|
} u;
|
||||||
LNNOffsetTo<UnsizedArrayOf<FWORD> > vector;
|
LNNOffsetTo<UnsizedArrayOf<FWORD>> vector;
|
||||||
public:
|
public:
|
||||||
DEFINE_SIZE_STATIC (KernSubTableHeader::static_size + 24);
|
DEFINE_SIZE_STATIC (KernSubTableHeader::static_size + 24);
|
||||||
};
|
};
|
||||||
|
|
|
@ -81,7 +81,7 @@ struct lcar
|
||||||
protected:
|
protected:
|
||||||
FixedVersion<>version; /* Version number of the ligature caret table */
|
FixedVersion<>version; /* Version number of the ligature caret table */
|
||||||
HBUINT16 format; /* Format of the ligature caret table. */
|
HBUINT16 format; /* Format of the ligature caret table. */
|
||||||
Lookup<OffsetTo<LigCaretClassEntry> >
|
Lookup<OffsetTo<LigCaretClassEntry>>
|
||||||
lookup; /* data Lookup table associating glyphs */
|
lookup; /* data Lookup table associating glyphs */
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -969,7 +969,7 @@ struct Chain
|
||||||
void apply (hb_aat_apply_context_t *c,
|
void apply (hb_aat_apply_context_t *c,
|
||||||
hb_mask_t flags) const
|
hb_mask_t flags) const
|
||||||
{
|
{
|
||||||
const ChainSubtable<Types> *subtable = &StructAfter<ChainSubtable<Types> > (featureZ.as_array (featureCount));
|
const ChainSubtable<Types> *subtable = &StructAfter<ChainSubtable<Types>> (featureZ.as_array (featureCount));
|
||||||
unsigned int count = subtableCount;
|
unsigned int count = subtableCount;
|
||||||
for (unsigned int i = 0; i < count; i++)
|
for (unsigned int i = 0; i < count; i++)
|
||||||
{
|
{
|
||||||
|
@ -1031,7 +1031,7 @@ struct Chain
|
||||||
if (unlikely (!c->buffer->successful)) return;
|
if (unlikely (!c->buffer->successful)) return;
|
||||||
|
|
||||||
skip:
|
skip:
|
||||||
subtable = &StructAfter<ChainSubtable<Types> > (*subtable);
|
subtable = &StructAfter<ChainSubtable<Types>> (*subtable);
|
||||||
c->set_lookup_index (c->lookup_index + 1);
|
c->set_lookup_index (c->lookup_index + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1049,13 +1049,13 @@ struct Chain
|
||||||
if (!c->check_array (featureZ.arrayZ, featureCount))
|
if (!c->check_array (featureZ.arrayZ, featureCount))
|
||||||
return_trace (false);
|
return_trace (false);
|
||||||
|
|
||||||
const ChainSubtable<Types> *subtable = &StructAfter<ChainSubtable<Types> > (featureZ.as_array (featureCount));
|
const ChainSubtable<Types> *subtable = &StructAfter<ChainSubtable<Types>> (featureZ.as_array (featureCount));
|
||||||
unsigned int count = subtableCount;
|
unsigned int count = subtableCount;
|
||||||
for (unsigned int i = 0; i < count; i++)
|
for (unsigned int i = 0; i < count; i++)
|
||||||
{
|
{
|
||||||
if (!subtable->sanitize (c))
|
if (!subtable->sanitize (c))
|
||||||
return_trace (false);
|
return_trace (false);
|
||||||
subtable = &StructAfter<ChainSubtable<Types> > (*subtable);
|
subtable = &StructAfter<ChainSubtable<Types>> (*subtable);
|
||||||
}
|
}
|
||||||
|
|
||||||
return_trace (true);
|
return_trace (true);
|
||||||
|
@ -1095,7 +1095,7 @@ struct mortmorx
|
||||||
for (unsigned int i = 0; i < count; i++)
|
for (unsigned int i = 0; i < count; i++)
|
||||||
{
|
{
|
||||||
map->chain_flags.push (chain->compile_flags (mapper));
|
map->chain_flags.push (chain->compile_flags (mapper));
|
||||||
chain = &StructAfter<Chain<Types> > (*chain);
|
chain = &StructAfter<Chain<Types>> (*chain);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1109,7 +1109,7 @@ struct mortmorx
|
||||||
{
|
{
|
||||||
chain->apply (c, c->plan->aat_map.chain_flags[i]);
|
chain->apply (c, c->plan->aat_map.chain_flags[i]);
|
||||||
if (unlikely (!c->buffer->successful)) return;
|
if (unlikely (!c->buffer->successful)) return;
|
||||||
chain = &StructAfter<Chain<Types> > (*chain);
|
chain = &StructAfter<Chain<Types>> (*chain);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1125,7 +1125,7 @@ struct mortmorx
|
||||||
{
|
{
|
||||||
if (!chain->sanitize (c, version))
|
if (!chain->sanitize (c, version))
|
||||||
return_trace (false);
|
return_trace (false);
|
||||||
chain = &StructAfter<Chain<Types> > (*chain);
|
chain = &StructAfter<Chain<Types>> (*chain);
|
||||||
}
|
}
|
||||||
|
|
||||||
return_trace (true);
|
return_trace (true);
|
||||||
|
|
|
@ -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> >
|
NNOffsetTo<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. */
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@ struct FTStringRange
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
NNOffsetTo<UnsizedArrayOf<HBUINT8> >
|
NNOffsetTo<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) */
|
||||||
|
|
|
@ -246,7 +246,7 @@ struct path_procs_null_t
|
||||||
static void flex1 (ENV &env, PARAM& param) {}
|
static void flex1 (ENV &env, PARAM& param) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename ARG, typename OPSET, typename ENV, typename PARAM, typename PATH=path_procs_null_t<ENV, PARAM> >
|
template <typename ARG, typename OPSET, typename ENV, typename PARAM, typename PATH=path_procs_null_t<ENV, PARAM>>
|
||||||
struct cs_opset_t : opset_t<ARG>
|
struct cs_opset_t : opset_t<ARG>
|
||||||
{
|
{
|
||||||
static void process_op (op_code_t op, ENV &env, PARAM& param)
|
static void process_op (op_code_t op, ENV &env, PARAM& param)
|
||||||
|
|
|
@ -81,7 +81,7 @@ struct cff1_cs_interp_env_t : cs_interp_env_t<number_t, CFF1Subrs>
|
||||||
typedef cs_interp_env_t<number_t, CFF1Subrs> SUPER;
|
typedef cs_interp_env_t<number_t, CFF1Subrs> SUPER;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename OPSET, typename PARAM, typename PATH=path_procs_null_t<cff1_cs_interp_env_t, PARAM> >
|
template <typename OPSET, typename PARAM, typename PATH=path_procs_null_t<cff1_cs_interp_env_t, PARAM>>
|
||||||
struct cff1_cs_opset_t : cs_opset_t<number_t, OPSET, cff1_cs_interp_env_t, PARAM, PATH>
|
struct cff1_cs_opset_t : cs_opset_t<number_t, OPSET, cff1_cs_interp_env_t, PARAM, PATH>
|
||||||
{
|
{
|
||||||
/* PostScript-originated legacy opcodes (OpCode_add etc) are unsupported */
|
/* PostScript-originated legacy opcodes (OpCode_add etc) are unsupported */
|
||||||
|
|
|
@ -193,7 +193,7 @@ struct cff2_cs_interp_env_t : cs_interp_env_t<blend_arg_t, CFF2Subrs>
|
||||||
|
|
||||||
typedef cs_interp_env_t<blend_arg_t, CFF2Subrs> SUPER;
|
typedef cs_interp_env_t<blend_arg_t, CFF2Subrs> SUPER;
|
||||||
};
|
};
|
||||||
template <typename OPSET, typename PARAM, typename PATH=path_procs_null_t<cff2_cs_interp_env_t, PARAM> >
|
template <typename OPSET, typename PARAM, typename PATH=path_procs_null_t<cff2_cs_interp_env_t, PARAM>>
|
||||||
struct cff2_cs_opset_t : cs_opset_t<blend_arg_t, OPSET, cff2_cs_interp_env_t, PARAM, PATH>
|
struct cff2_cs_opset_t : cs_opset_t<blend_arg_t, OPSET, cff2_cs_interp_env_t, PARAM, PATH>
|
||||||
{
|
{
|
||||||
static void process_op (op_code_t op, cff2_cs_interp_env_t &env, PARAM& param)
|
static void process_op (op_code_t op, cff2_cs_interp_env_t &env, PARAM& param)
|
||||||
|
|
|
@ -387,7 +387,7 @@ struct
|
||||||
template <typename A, typename B>
|
template <typename A, typename B>
|
||||||
struct hb_zip_iter_t :
|
struct hb_zip_iter_t :
|
||||||
hb_iter_t<hb_zip_iter_t<A, B>,
|
hb_iter_t<hb_zip_iter_t<A, B>,
|
||||||
hb_pair_t<typename A::item_t, typename B::item_t> >
|
hb_pair_t<typename A::item_t, typename B::item_t>>
|
||||||
{
|
{
|
||||||
hb_zip_iter_t () {}
|
hb_zip_iter_t () {}
|
||||||
hb_zip_iter_t (const A& a, const B& b) : a (a), b (b) {}
|
hb_zip_iter_t (const A& a, const B& b) : a (a), b (b) {}
|
||||||
|
@ -427,7 +427,7 @@ template <typename Iter,
|
||||||
hb_enable_if (hb_is_iterator (Iter))>
|
hb_enable_if (hb_is_iterator (Iter))>
|
||||||
struct hb_enumerate_iter_t :
|
struct hb_enumerate_iter_t :
|
||||||
hb_iter_t<hb_enumerate_iter_t<Iter>,
|
hb_iter_t<hb_enumerate_iter_t<Iter>,
|
||||||
hb_pair_t<unsigned, typename Iter::item_t> >
|
hb_pair_t<unsigned, typename Iter::item_t>>
|
||||||
{
|
{
|
||||||
hb_enumerate_iter_t (const Iter& it) : i (0), it (it) {}
|
hb_enumerate_iter_t (const Iter& it) : i (0), it (it) {}
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@ template <typename T, typename B>
|
||||||
struct _hb_null_size
|
struct _hb_null_size
|
||||||
{ enum { value = sizeof (T) }; };
|
{ enum { value = sizeof (T) }; };
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct _hb_null_size<T, hb_bool_tt<true || sizeof (T::min_size)> >
|
struct _hb_null_size<T, hb_bool_tt<true || sizeof (T::min_size)>>
|
||||||
{ enum { value = T::null_size }; };
|
{ enum { value = T::null_size }; };
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
|
@ -67,7 +67,7 @@ template <typename T, typename B>
|
||||||
struct _hb_static_size
|
struct _hb_static_size
|
||||||
{ enum { value = sizeof (T) }; };
|
{ enum { value = sizeof (T) }; };
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct _hb_static_size<T, hb_bool_tt<true || sizeof (T::min_size)> >
|
struct _hb_static_size<T, hb_bool_tt<true || sizeof (T::min_size)>>
|
||||||
{ enum { value = T::static_size }; };
|
{ enum { value = T::static_size }; };
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
|
@ -95,7 +95,7 @@ struct Null {
|
||||||
template <typename QType>
|
template <typename QType>
|
||||||
struct NullHelper
|
struct NullHelper
|
||||||
{
|
{
|
||||||
typedef hb_remove_const<hb_remove_reference<QType> > Type;
|
typedef hb_remove_const<hb_remove_reference<QType>> Type;
|
||||||
static const Type & get_null () { return Null<Type>::get_null (); }
|
static const Type & get_null () { return Null<Type>::get_null (); }
|
||||||
};
|
};
|
||||||
#define Null(Type) NullHelper<Type>::get_null ()
|
#define Null(Type) NullHelper<Type>::get_null ()
|
||||||
|
@ -148,7 +148,7 @@ static inline Type& Crap () {
|
||||||
template <typename QType>
|
template <typename QType>
|
||||||
struct CrapHelper
|
struct CrapHelper
|
||||||
{
|
{
|
||||||
typedef hb_remove_const<hb_remove_reference<QType> > Type;
|
typedef hb_remove_const<hb_remove_reference<QType>> Type;
|
||||||
static Type & get_crap () { return Crap<Type> (); }
|
static Type & get_crap () { return Crap<Type> (); }
|
||||||
};
|
};
|
||||||
#define Crap(Type) CrapHelper<Type>::get_crap ()
|
#define Crap(Type) CrapHelper<Type>::get_crap ()
|
||||||
|
|
|
@ -222,7 +222,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<OffsetTable> >
|
LArrayOf<LOffsetTo<OffsetTable>>
|
||||||
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:
|
||||||
|
@ -334,7 +334,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> >
|
NNOffsetTo<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:
|
||||||
|
@ -390,7 +390,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> >
|
NNOffsetTo<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
|
||||||
|
@ -422,7 +422,7 @@ struct ResourceForkHeader
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
LNNOffsetTo<UnsizedArrayOf<HBUINT8> >
|
LNNOffsetTo<UnsizedArrayOf<HBUINT8>>
|
||||||
data; /* Offset from beginning of resource fork
|
data; /* Offset from beginning of resource fork
|
||||||
* to resource data */
|
* to resource data */
|
||||||
LNNOffsetTo<ResourceMap >
|
LNNOffsetTo<ResourceMap >
|
||||||
|
|
|
@ -442,7 +442,7 @@ struct UnsizedArrayOf
|
||||||
|
|
||||||
/* Unsized array of offset's */
|
/* Unsized array of offset's */
|
||||||
template <typename Type, typename OffsetType, bool has_null=true>
|
template <typename Type, typename OffsetType, bool has_null=true>
|
||||||
using UnsizedOffsetArrayOf = UnsizedArrayOf<OffsetTo<Type, OffsetType, has_null> >;
|
using UnsizedOffsetArrayOf = UnsizedArrayOf<OffsetTo<Type, OffsetType, has_null>>;
|
||||||
|
|
||||||
/* Unsized array of offsets relative to the beginning of the array itself. */
|
/* Unsized array of offsets relative to the beginning of the array itself. */
|
||||||
template <typename Type, typename OffsetType, bool has_null=true>
|
template <typename Type, typename OffsetType, bool has_null=true>
|
||||||
|
@ -628,9 +628,9 @@ using PString = ArrayOf<HBUINT8, HBUINT8>;
|
||||||
|
|
||||||
/* Array of Offset's */
|
/* Array of Offset's */
|
||||||
template <typename Type>
|
template <typename Type>
|
||||||
using OffsetArrayOf = ArrayOf<OffsetTo<Type, HBUINT16> >;
|
using OffsetArrayOf = ArrayOf<OffsetTo<Type, HBUINT16>>;
|
||||||
template <typename Type>
|
template <typename Type>
|
||||||
using LOffsetArrayOf = ArrayOf<OffsetTo<Type, HBUINT32> >;
|
using LOffsetArrayOf = ArrayOf<OffsetTo<Type, HBUINT32>>;
|
||||||
template <typename Type>
|
template <typename Type>
|
||||||
using LOffsetLArrayOf = ArrayOf<OffsetTo<Type, HBUINT32>, HBUINT32>;
|
using LOffsetLArrayOf = ArrayOf<OffsetTo<Type, HBUINT32>, HBUINT32>;
|
||||||
|
|
||||||
|
@ -882,7 +882,7 @@ struct BinSearchHeader
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename Type, typename LenType=HBUINT16>
|
template <typename Type, typename LenType=HBUINT16>
|
||||||
using BinSearchArrayOf = SortedArrayOf<Type, BinSearchHeader<LenType> >;
|
using BinSearchArrayOf = SortedArrayOf<Type, BinSearchHeader<LenType>>;
|
||||||
|
|
||||||
|
|
||||||
struct VarSizedBinSearchHeader
|
struct VarSizedBinSearchHeader
|
||||||
|
|
|
@ -144,7 +144,7 @@ struct IndexSubtableFormat1Or3
|
||||||
}
|
}
|
||||||
|
|
||||||
IndexSubtableHeader header;
|
IndexSubtableHeader header;
|
||||||
UnsizedArrayOf<Offset<OffsetType> >
|
UnsizedArrayOf<Offset<OffsetType>>
|
||||||
offsetArrayZ;
|
offsetArrayZ;
|
||||||
public:
|
public:
|
||||||
DEFINE_SIZE_ARRAY(8, offsetArrayZ);
|
DEFINE_SIZE_ARRAY(8, offsetArrayZ);
|
||||||
|
|
|
@ -125,9 +125,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> >
|
LNNOffsetTo<SortedUnsizedArrayOf<BaseGlyphRecord>>
|
||||||
baseGlyphsZ; /* Offset to Base Glyph records. */
|
baseGlyphsZ; /* Offset to Base Glyph records. */
|
||||||
LNNOffsetTo<UnsizedArrayOf<LayerRecord> >
|
LNNOffsetTo<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> >
|
LNNOffsetTo<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> >
|
LNNOffsetTo<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> >
|
LNNOffsetTo<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. */
|
||||||
|
@ -176,7 +176,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> >
|
LNNOffsetTo<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>
|
||||||
|
|
|
@ -121,7 +121,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<LOffsetTo<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:
|
||||||
|
|
|
@ -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> >
|
LNNOffsetTo<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> >
|
LOffsetTo<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. */
|
||||||
|
|
|
@ -47,9 +47,9 @@ struct KernSubTableFormat3
|
||||||
int get_kerning (hb_codepoint_t left, hb_codepoint_t right) const
|
int get_kerning (hb_codepoint_t left, hb_codepoint_t right) const
|
||||||
{
|
{
|
||||||
hb_array_t<const FWORD> kernValue = kernValueZ.as_array (kernValueCount);
|
hb_array_t<const FWORD> kernValue = kernValueZ.as_array (kernValueCount);
|
||||||
hb_array_t<const HBUINT8> leftClass = StructAfter<const UnsizedArrayOf<HBUINT8> > (kernValue).as_array (glyphCount);
|
hb_array_t<const HBUINT8> leftClass = StructAfter<const UnsizedArrayOf<HBUINT8>> (kernValue).as_array (glyphCount);
|
||||||
hb_array_t<const HBUINT8> rightClass = StructAfter<const UnsizedArrayOf<HBUINT8> > (leftClass).as_array (glyphCount);
|
hb_array_t<const HBUINT8> rightClass = StructAfter<const UnsizedArrayOf<HBUINT8>> (leftClass).as_array (glyphCount);
|
||||||
hb_array_t<const HBUINT8> kernIndex = StructAfter<const UnsizedArrayOf<HBUINT8> > (rightClass).as_array (leftClassCount * rightClassCount);
|
hb_array_t<const HBUINT8> kernIndex = StructAfter<const UnsizedArrayOf<HBUINT8>> (rightClass).as_array (leftClassCount * rightClassCount);
|
||||||
|
|
||||||
unsigned int leftC = leftClass[left];
|
unsigned int leftC = leftClass[left];
|
||||||
unsigned int rightC = rightClass[right];
|
unsigned int rightC = rightClass[right];
|
||||||
|
|
|
@ -447,7 +447,7 @@ struct Axis
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
OffsetTo<SortedArrayOf<Tag> >
|
OffsetTo<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
|
||||||
|
|
|
@ -103,7 +103,7 @@ 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 OffsetTo<Type>& get_offset (unsigned int i) const
|
||||||
{ return (*this)[i].offset; }
|
{ return (*this)[i].offset; }
|
||||||
|
@ -649,14 +649,14 @@ struct Lookup
|
||||||
|
|
||||||
template <typename TSubTable>
|
template <typename TSubTable>
|
||||||
const TSubTable& get_subtable (unsigned int i) const
|
const TSubTable& get_subtable (unsigned int i) const
|
||||||
{ return this+CastR<OffsetArrayOf<TSubTable> > (subTable)[i]; }
|
{ return this+CastR<OffsetArrayOf<TSubTable>> (subTable)[i]; }
|
||||||
|
|
||||||
template <typename TSubTable>
|
template <typename TSubTable>
|
||||||
const OffsetArrayOf<TSubTable>& get_subtables () const
|
const OffsetArrayOf<TSubTable>& get_subtables () const
|
||||||
{ return CastR<OffsetArrayOf<TSubTable> > (subTable); }
|
{ return CastR<OffsetArrayOf<TSubTable>> (subTable); }
|
||||||
template <typename TSubTable>
|
template <typename TSubTable>
|
||||||
OffsetArrayOf<TSubTable>& get_subtables ()
|
OffsetArrayOf<TSubTable>& get_subtables ()
|
||||||
{ return CastR<OffsetArrayOf<TSubTable> > (subTable); }
|
{ return CastR<OffsetArrayOf<TSubTable>> (subTable); }
|
||||||
|
|
||||||
unsigned int get_size () const
|
unsigned int get_size () const
|
||||||
{
|
{
|
||||||
|
@ -774,7 +774,7 @@ struct Lookup
|
||||||
if (!markFilteringSet.sanitize (c)) return_trace (false);
|
if (!markFilteringSet.sanitize (c)) return_trace (false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (unlikely (!CastR<OffsetArrayOf<SubTableSanitizeWrapper<TSubTable> > > (subTable)
|
if (unlikely (!CastR<OffsetArrayOf<SubTableSanitizeWrapper<TSubTable>>> (subTable)
|
||||||
.sanitize (c, this, get_type ())))
|
.sanitize (c, this, get_type ())))
|
||||||
return_trace (false);
|
return_trace (false);
|
||||||
|
|
||||||
|
|
|
@ -220,7 +220,7 @@ struct LigGlyph
|
||||||
{
|
{
|
||||||
if (caret_count)
|
if (caret_count)
|
||||||
{
|
{
|
||||||
hb_array_t <const OffsetTo<CaretValue> > array = carets.sub_array (start_offset, caret_count);
|
hb_array_t <const OffsetTo<CaretValue>> array = carets.sub_array (start_offset, caret_count);
|
||||||
unsigned int count = array.length;
|
unsigned int count = array.length;
|
||||||
for (unsigned int i = 0; i < count; i++)
|
for (unsigned int i = 0; i < count; i++)
|
||||||
caret_array[i] = (this+array[i]).get_caret_value (font, direction, glyph_id, var_store);
|
caret_array[i] = (this+array[i]).get_caret_value (font, direction, glyph_id, var_store);
|
||||||
|
@ -296,7 +296,7 @@ struct MarkGlyphSetsFormat1
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
HBUINT16 format; /* Format identifier--format = 1 */
|
HBUINT16 format; /* Format identifier--format = 1 */
|
||||||
ArrayOf<LOffsetTo<Coverage> >
|
ArrayOf<LOffsetTo<Coverage>>
|
||||||
coverage; /* Array of long offsets to mark set
|
coverage; /* Array of long offsets to mark set
|
||||||
* coverage tables */
|
* coverage tables */
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -174,11 +174,11 @@ struct ValueFormat : HBUINT16
|
||||||
}
|
}
|
||||||
|
|
||||||
HB_INTERNAL static OffsetTo<Device>& get_device (Value* value)
|
HB_INTERNAL static OffsetTo<Device>& get_device (Value* value)
|
||||||
{ return *CastP<OffsetTo<Device> > (value); }
|
{ return *CastP<OffsetTo<Device>> (value); }
|
||||||
HB_INTERNAL static const OffsetTo<Device>& get_device (const Value* value, bool *worked=nullptr)
|
HB_INTERNAL static const OffsetTo<Device>& get_device (const Value* value, bool *worked=nullptr)
|
||||||
{
|
{
|
||||||
if (worked) *worked |= bool (*value);
|
if (worked) *worked |= bool (*value);
|
||||||
return *CastP<OffsetTo<Device> > (value);
|
return *CastP<OffsetTo<Device>> (value);
|
||||||
}
|
}
|
||||||
|
|
||||||
HB_INTERNAL static const HBINT16& get_short (const Value* value, bool *worked=nullptr)
|
HB_INTERNAL static const HBINT16& get_short (const Value* value, bool *worked=nullptr)
|
||||||
|
@ -393,7 +393,7 @@ struct AnchorMatrix
|
||||||
|
|
||||||
HBUINT16 rows; /* Number of rows */
|
HBUINT16 rows; /* Number of rows */
|
||||||
protected:
|
protected:
|
||||||
UnsizedArrayOf<OffsetTo<Anchor> >
|
UnsizedArrayOf<OffsetTo<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:
|
||||||
|
|
|
@ -983,7 +983,7 @@ struct ReverseChainSingleSubstFormat1
|
||||||
if (!(this+coverage).intersects (glyphs))
|
if (!(this+coverage).intersects (glyphs))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage> > (backtrack);
|
const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage>> (backtrack);
|
||||||
|
|
||||||
unsigned int count;
|
unsigned int count;
|
||||||
|
|
||||||
|
@ -1004,8 +1004,8 @@ struct ReverseChainSingleSubstFormat1
|
||||||
{
|
{
|
||||||
if (!intersects (c->glyphs)) return;
|
if (!intersects (c->glyphs)) return;
|
||||||
|
|
||||||
const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage> > (backtrack);
|
const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage>> (backtrack);
|
||||||
const ArrayOf<GlyphID> &substitute = StructAfter<ArrayOf<GlyphID> > (lookahead);
|
const ArrayOf<GlyphID> &substitute = StructAfter<ArrayOf<GlyphID>> (lookahead);
|
||||||
|
|
||||||
+ hb_zip (this+coverage, substitute)
|
+ hb_zip (this+coverage, substitute)
|
||||||
| hb_filter (*c->glyphs, hb_first)
|
| hb_filter (*c->glyphs, hb_first)
|
||||||
|
@ -1024,12 +1024,12 @@ struct ReverseChainSingleSubstFormat1
|
||||||
for (unsigned int i = 0; i < count; i++)
|
for (unsigned int i = 0; i < count; i++)
|
||||||
if (unlikely (!(this+backtrack[i]).add_coverage (c->before))) return;
|
if (unlikely (!(this+backtrack[i]).add_coverage (c->before))) return;
|
||||||
|
|
||||||
const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage> > (backtrack);
|
const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage>> (backtrack);
|
||||||
count = lookahead.len;
|
count = lookahead.len;
|
||||||
for (unsigned int i = 0; i < count; i++)
|
for (unsigned int i = 0; i < count; i++)
|
||||||
if (unlikely (!(this+lookahead[i]).add_coverage (c->after))) return;
|
if (unlikely (!(this+lookahead[i]).add_coverage (c->after))) return;
|
||||||
|
|
||||||
const ArrayOf<GlyphID> &substitute = StructAfter<ArrayOf<GlyphID> > (lookahead);
|
const ArrayOf<GlyphID> &substitute = StructAfter<ArrayOf<GlyphID>> (lookahead);
|
||||||
count = substitute.len;
|
count = substitute.len;
|
||||||
c->output->add_array (substitute.arrayZ, substitute.len);
|
c->output->add_array (substitute.arrayZ, substitute.len);
|
||||||
}
|
}
|
||||||
|
@ -1048,8 +1048,8 @@ struct ReverseChainSingleSubstFormat1
|
||||||
unsigned int index = (this+coverage).get_coverage (c->buffer->cur().codepoint);
|
unsigned int index = (this+coverage).get_coverage (c->buffer->cur().codepoint);
|
||||||
if (likely (index == NOT_COVERED)) return_trace (false);
|
if (likely (index == NOT_COVERED)) return_trace (false);
|
||||||
|
|
||||||
const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage> > (backtrack);
|
const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage>> (backtrack);
|
||||||
const ArrayOf<GlyphID> &substitute = StructAfter<ArrayOf<GlyphID> > (lookahead);
|
const ArrayOf<GlyphID> &substitute = StructAfter<ArrayOf<GlyphID>> (lookahead);
|
||||||
|
|
||||||
unsigned int start_index = 0, end_index = 0;
|
unsigned int start_index = 0, end_index = 0;
|
||||||
if (match_backtrack (c,
|
if (match_backtrack (c,
|
||||||
|
@ -1084,10 +1084,10 @@ struct ReverseChainSingleSubstFormat1
|
||||||
TRACE_SANITIZE (this);
|
TRACE_SANITIZE (this);
|
||||||
if (!(coverage.sanitize (c, this) && backtrack.sanitize (c, this)))
|
if (!(coverage.sanitize (c, this) && backtrack.sanitize (c, this)))
|
||||||
return_trace (false);
|
return_trace (false);
|
||||||
const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage> > (backtrack);
|
const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage>> (backtrack);
|
||||||
if (!lookahead.sanitize (c, this))
|
if (!lookahead.sanitize (c, this))
|
||||||
return_trace (false);
|
return_trace (false);
|
||||||
const ArrayOf<GlyphID> &substitute = StructAfter<ArrayOf<GlyphID> > (lookahead);
|
const ArrayOf<GlyphID> &substitute = StructAfter<ArrayOf<GlyphID>> (lookahead);
|
||||||
return_trace (substitute.sanitize (c));
|
return_trace (substitute.sanitize (c));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1299,7 +1299,7 @@ struct Rule
|
||||||
|
|
||||||
void closure (hb_closure_context_t *c, ContextClosureLookupContext &lookup_context) const
|
void closure (hb_closure_context_t *c, ContextClosureLookupContext &lookup_context) const
|
||||||
{
|
{
|
||||||
const UnsizedArrayOf<LookupRecord> &lookupRecord = StructAfter<UnsizedArrayOf<LookupRecord> >
|
const UnsizedArrayOf<LookupRecord> &lookupRecord = StructAfter<UnsizedArrayOf<LookupRecord>>
|
||||||
(inputZ.as_array ((inputCount ? inputCount - 1 : 0)));
|
(inputZ.as_array ((inputCount ? inputCount - 1 : 0)));
|
||||||
context_closure_lookup (c,
|
context_closure_lookup (c,
|
||||||
inputCount, inputZ.arrayZ,
|
inputCount, inputZ.arrayZ,
|
||||||
|
@ -1310,7 +1310,7 @@ struct Rule
|
||||||
void collect_glyphs (hb_collect_glyphs_context_t *c,
|
void collect_glyphs (hb_collect_glyphs_context_t *c,
|
||||||
ContextCollectGlyphsLookupContext &lookup_context) const
|
ContextCollectGlyphsLookupContext &lookup_context) const
|
||||||
{
|
{
|
||||||
const UnsizedArrayOf<LookupRecord> &lookupRecord = StructAfter<UnsizedArrayOf<LookupRecord> >
|
const UnsizedArrayOf<LookupRecord> &lookupRecord = StructAfter<UnsizedArrayOf<LookupRecord>>
|
||||||
(inputZ.as_array (inputCount ? inputCount - 1 : 0));
|
(inputZ.as_array (inputCount ? inputCount - 1 : 0));
|
||||||
context_collect_glyphs_lookup (c,
|
context_collect_glyphs_lookup (c,
|
||||||
inputCount, inputZ.arrayZ,
|
inputCount, inputZ.arrayZ,
|
||||||
|
@ -1321,7 +1321,7 @@ struct Rule
|
||||||
bool would_apply (hb_would_apply_context_t *c,
|
bool would_apply (hb_would_apply_context_t *c,
|
||||||
ContextApplyLookupContext &lookup_context) const
|
ContextApplyLookupContext &lookup_context) const
|
||||||
{
|
{
|
||||||
const UnsizedArrayOf<LookupRecord> &lookupRecord = StructAfter<UnsizedArrayOf<LookupRecord> >
|
const UnsizedArrayOf<LookupRecord> &lookupRecord = StructAfter<UnsizedArrayOf<LookupRecord>>
|
||||||
(inputZ.as_array (inputCount ? inputCount - 1 : 0));
|
(inputZ.as_array (inputCount ? inputCount - 1 : 0));
|
||||||
return context_would_apply_lookup (c,
|
return context_would_apply_lookup (c,
|
||||||
inputCount, inputZ.arrayZ,
|
inputCount, inputZ.arrayZ,
|
||||||
|
@ -1333,7 +1333,7 @@ struct Rule
|
||||||
ContextApplyLookupContext &lookup_context) const
|
ContextApplyLookupContext &lookup_context) const
|
||||||
{
|
{
|
||||||
TRACE_APPLY (this);
|
TRACE_APPLY (this);
|
||||||
const UnsizedArrayOf<LookupRecord> &lookupRecord = StructAfter<UnsizedArrayOf<LookupRecord> >
|
const UnsizedArrayOf<LookupRecord> &lookupRecord = StructAfter<UnsizedArrayOf<LookupRecord>>
|
||||||
(inputZ.as_array (inputCount ? inputCount - 1 : 0));
|
(inputZ.as_array (inputCount ? inputCount - 1 : 0));
|
||||||
return_trace (context_apply_lookup (c, inputCount, inputZ.arrayZ, lookupCount, lookupRecord.arrayZ, lookup_context));
|
return_trace (context_apply_lookup (c, inputCount, inputZ.arrayZ, lookupCount, lookupRecord.arrayZ, lookup_context));
|
||||||
}
|
}
|
||||||
|
@ -1751,7 +1751,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<OffsetTo<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>
|
||||||
|
@ -1923,8 +1923,8 @@ struct ChainRule
|
||||||
{
|
{
|
||||||
bool intersects (const hb_set_t *glyphs, ChainContextClosureLookupContext &lookup_context) const
|
bool intersects (const hb_set_t *glyphs, ChainContextClosureLookupContext &lookup_context) const
|
||||||
{
|
{
|
||||||
const HeadlessArrayOf<HBUINT16> &input = StructAfter<HeadlessArrayOf<HBUINT16> > (backtrack);
|
const HeadlessArrayOf<HBUINT16> &input = StructAfter<HeadlessArrayOf<HBUINT16>> (backtrack);
|
||||||
const ArrayOf<HBUINT16> &lookahead = StructAfter<ArrayOf<HBUINT16> > (input);
|
const ArrayOf<HBUINT16> &lookahead = StructAfter<ArrayOf<HBUINT16>> (input);
|
||||||
return chain_context_intersects (glyphs,
|
return chain_context_intersects (glyphs,
|
||||||
backtrack.len, backtrack.arrayZ,
|
backtrack.len, backtrack.arrayZ,
|
||||||
input.lenP1, input.arrayZ,
|
input.lenP1, input.arrayZ,
|
||||||
|
@ -1935,9 +1935,9 @@ struct ChainRule
|
||||||
void closure (hb_closure_context_t *c,
|
void closure (hb_closure_context_t *c,
|
||||||
ChainContextClosureLookupContext &lookup_context) const
|
ChainContextClosureLookupContext &lookup_context) const
|
||||||
{
|
{
|
||||||
const HeadlessArrayOf<HBUINT16> &input = StructAfter<HeadlessArrayOf<HBUINT16> > (backtrack);
|
const HeadlessArrayOf<HBUINT16> &input = StructAfter<HeadlessArrayOf<HBUINT16>> (backtrack);
|
||||||
const ArrayOf<HBUINT16> &lookahead = StructAfter<ArrayOf<HBUINT16> > (input);
|
const ArrayOf<HBUINT16> &lookahead = StructAfter<ArrayOf<HBUINT16>> (input);
|
||||||
const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord> > (lookahead);
|
const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord>> (lookahead);
|
||||||
chain_context_closure_lookup (c,
|
chain_context_closure_lookup (c,
|
||||||
backtrack.len, backtrack.arrayZ,
|
backtrack.len, backtrack.arrayZ,
|
||||||
input.lenP1, input.arrayZ,
|
input.lenP1, input.arrayZ,
|
||||||
|
@ -1949,9 +1949,9 @@ struct ChainRule
|
||||||
void collect_glyphs (hb_collect_glyphs_context_t *c,
|
void collect_glyphs (hb_collect_glyphs_context_t *c,
|
||||||
ChainContextCollectGlyphsLookupContext &lookup_context) const
|
ChainContextCollectGlyphsLookupContext &lookup_context) const
|
||||||
{
|
{
|
||||||
const HeadlessArrayOf<HBUINT16> &input = StructAfter<HeadlessArrayOf<HBUINT16> > (backtrack);
|
const HeadlessArrayOf<HBUINT16> &input = StructAfter<HeadlessArrayOf<HBUINT16>> (backtrack);
|
||||||
const ArrayOf<HBUINT16> &lookahead = StructAfter<ArrayOf<HBUINT16> > (input);
|
const ArrayOf<HBUINT16> &lookahead = StructAfter<ArrayOf<HBUINT16>> (input);
|
||||||
const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord> > (lookahead);
|
const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord>> (lookahead);
|
||||||
chain_context_collect_glyphs_lookup (c,
|
chain_context_collect_glyphs_lookup (c,
|
||||||
backtrack.len, backtrack.arrayZ,
|
backtrack.len, backtrack.arrayZ,
|
||||||
input.lenP1, input.arrayZ,
|
input.lenP1, input.arrayZ,
|
||||||
|
@ -1963,9 +1963,9 @@ struct ChainRule
|
||||||
bool would_apply (hb_would_apply_context_t *c,
|
bool would_apply (hb_would_apply_context_t *c,
|
||||||
ChainContextApplyLookupContext &lookup_context) const
|
ChainContextApplyLookupContext &lookup_context) const
|
||||||
{
|
{
|
||||||
const HeadlessArrayOf<HBUINT16> &input = StructAfter<HeadlessArrayOf<HBUINT16> > (backtrack);
|
const HeadlessArrayOf<HBUINT16> &input = StructAfter<HeadlessArrayOf<HBUINT16>> (backtrack);
|
||||||
const ArrayOf<HBUINT16> &lookahead = StructAfter<ArrayOf<HBUINT16> > (input);
|
const ArrayOf<HBUINT16> &lookahead = StructAfter<ArrayOf<HBUINT16>> (input);
|
||||||
const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord> > (lookahead);
|
const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord>> (lookahead);
|
||||||
return chain_context_would_apply_lookup (c,
|
return chain_context_would_apply_lookup (c,
|
||||||
backtrack.len, backtrack.arrayZ,
|
backtrack.len, backtrack.arrayZ,
|
||||||
input.lenP1, input.arrayZ,
|
input.lenP1, input.arrayZ,
|
||||||
|
@ -1976,9 +1976,9 @@ struct ChainRule
|
||||||
bool apply (hb_ot_apply_context_t *c, ChainContextApplyLookupContext &lookup_context) const
|
bool apply (hb_ot_apply_context_t *c, ChainContextApplyLookupContext &lookup_context) const
|
||||||
{
|
{
|
||||||
TRACE_APPLY (this);
|
TRACE_APPLY (this);
|
||||||
const HeadlessArrayOf<HBUINT16> &input = StructAfter<HeadlessArrayOf<HBUINT16> > (backtrack);
|
const HeadlessArrayOf<HBUINT16> &input = StructAfter<HeadlessArrayOf<HBUINT16>> (backtrack);
|
||||||
const ArrayOf<HBUINT16> &lookahead = StructAfter<ArrayOf<HBUINT16> > (input);
|
const ArrayOf<HBUINT16> &lookahead = StructAfter<ArrayOf<HBUINT16>> (input);
|
||||||
const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord> > (lookahead);
|
const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord>> (lookahead);
|
||||||
return_trace (chain_context_apply_lookup (c,
|
return_trace (chain_context_apply_lookup (c,
|
||||||
backtrack.len, backtrack.arrayZ,
|
backtrack.len, backtrack.arrayZ,
|
||||||
input.lenP1, input.arrayZ,
|
input.lenP1, input.arrayZ,
|
||||||
|
@ -1990,11 +1990,11 @@ struct ChainRule
|
||||||
{
|
{
|
||||||
TRACE_SANITIZE (this);
|
TRACE_SANITIZE (this);
|
||||||
if (!backtrack.sanitize (c)) return_trace (false);
|
if (!backtrack.sanitize (c)) return_trace (false);
|
||||||
const HeadlessArrayOf<HBUINT16> &input = StructAfter<HeadlessArrayOf<HBUINT16> > (backtrack);
|
const HeadlessArrayOf<HBUINT16> &input = StructAfter<HeadlessArrayOf<HBUINT16>> (backtrack);
|
||||||
if (!input.sanitize (c)) return_trace (false);
|
if (!input.sanitize (c)) return_trace (false);
|
||||||
const ArrayOf<HBUINT16> &lookahead = StructAfter<ArrayOf<HBUINT16> > (input);
|
const ArrayOf<HBUINT16> &lookahead = StructAfter<ArrayOf<HBUINT16>> (input);
|
||||||
if (!lookahead.sanitize (c)) return_trace (false);
|
if (!lookahead.sanitize (c)) return_trace (false);
|
||||||
const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord> > (lookahead);
|
const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord>> (lookahead);
|
||||||
return_trace (lookup.sanitize (c));
|
return_trace (lookup.sanitize (c));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2330,12 +2330,12 @@ struct ChainContextFormat3
|
||||||
{
|
{
|
||||||
bool intersects (const hb_set_t *glyphs) const
|
bool intersects (const hb_set_t *glyphs) const
|
||||||
{
|
{
|
||||||
const OffsetArrayOf<Coverage> &input = StructAfter<OffsetArrayOf<Coverage> > (backtrack);
|
const OffsetArrayOf<Coverage> &input = StructAfter<OffsetArrayOf<Coverage>> (backtrack);
|
||||||
|
|
||||||
if (!(this+input[0]).intersects (glyphs))
|
if (!(this+input[0]).intersects (glyphs))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage> > (input);
|
const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage>> (input);
|
||||||
struct ChainContextClosureLookupContext lookup_context = {
|
struct ChainContextClosureLookupContext lookup_context = {
|
||||||
{intersects_coverage},
|
{intersects_coverage},
|
||||||
{this, this, this}
|
{this, this, this}
|
||||||
|
@ -2349,13 +2349,13 @@ struct ChainContextFormat3
|
||||||
|
|
||||||
void closure (hb_closure_context_t *c) const
|
void closure (hb_closure_context_t *c) const
|
||||||
{
|
{
|
||||||
const OffsetArrayOf<Coverage> &input = StructAfter<OffsetArrayOf<Coverage> > (backtrack);
|
const OffsetArrayOf<Coverage> &input = StructAfter<OffsetArrayOf<Coverage>> (backtrack);
|
||||||
|
|
||||||
if (!(this+input[0]).intersects (c->glyphs))
|
if (!(this+input[0]).intersects (c->glyphs))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage> > (input);
|
const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage>> (input);
|
||||||
const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord> > (lookahead);
|
const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord>> (lookahead);
|
||||||
struct ChainContextClosureLookupContext lookup_context = {
|
struct ChainContextClosureLookupContext lookup_context = {
|
||||||
{intersects_coverage},
|
{intersects_coverage},
|
||||||
{this, this, this}
|
{this, this, this}
|
||||||
|
@ -2370,12 +2370,12 @@ struct ChainContextFormat3
|
||||||
|
|
||||||
void collect_glyphs (hb_collect_glyphs_context_t *c) const
|
void collect_glyphs (hb_collect_glyphs_context_t *c) const
|
||||||
{
|
{
|
||||||
const OffsetArrayOf<Coverage> &input = StructAfter<OffsetArrayOf<Coverage> > (backtrack);
|
const OffsetArrayOf<Coverage> &input = StructAfter<OffsetArrayOf<Coverage>> (backtrack);
|
||||||
|
|
||||||
(this+input[0]).add_coverage (c->input);
|
(this+input[0]).add_coverage (c->input);
|
||||||
|
|
||||||
const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage> > (input);
|
const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage>> (input);
|
||||||
const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord> > (lookahead);
|
const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord>> (lookahead);
|
||||||
struct ChainContextCollectGlyphsLookupContext lookup_context = {
|
struct ChainContextCollectGlyphsLookupContext lookup_context = {
|
||||||
{collect_coverage},
|
{collect_coverage},
|
||||||
{this, this, this}
|
{this, this, this}
|
||||||
|
@ -2390,9 +2390,9 @@ struct ChainContextFormat3
|
||||||
|
|
||||||
bool would_apply (hb_would_apply_context_t *c) const
|
bool would_apply (hb_would_apply_context_t *c) const
|
||||||
{
|
{
|
||||||
const OffsetArrayOf<Coverage> &input = StructAfter<OffsetArrayOf<Coverage> > (backtrack);
|
const OffsetArrayOf<Coverage> &input = StructAfter<OffsetArrayOf<Coverage>> (backtrack);
|
||||||
const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage> > (input);
|
const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage>> (input);
|
||||||
const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord> > (lookahead);
|
const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord>> (lookahead);
|
||||||
struct ChainContextApplyLookupContext lookup_context = {
|
struct ChainContextApplyLookupContext lookup_context = {
|
||||||
{match_coverage},
|
{match_coverage},
|
||||||
{this, this, this}
|
{this, this, this}
|
||||||
|
@ -2406,20 +2406,20 @@ struct ChainContextFormat3
|
||||||
|
|
||||||
const Coverage &get_coverage () const
|
const Coverage &get_coverage () const
|
||||||
{
|
{
|
||||||
const OffsetArrayOf<Coverage> &input = StructAfter<OffsetArrayOf<Coverage> > (backtrack);
|
const OffsetArrayOf<Coverage> &input = StructAfter<OffsetArrayOf<Coverage>> (backtrack);
|
||||||
return this+input[0];
|
return this+input[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
bool apply (hb_ot_apply_context_t *c) const
|
bool apply (hb_ot_apply_context_t *c) const
|
||||||
{
|
{
|
||||||
TRACE_APPLY (this);
|
TRACE_APPLY (this);
|
||||||
const OffsetArrayOf<Coverage> &input = StructAfter<OffsetArrayOf<Coverage> > (backtrack);
|
const OffsetArrayOf<Coverage> &input = StructAfter<OffsetArrayOf<Coverage>> (backtrack);
|
||||||
|
|
||||||
unsigned int index = (this+input[0]).get_coverage (c->buffer->cur().codepoint);
|
unsigned int index = (this+input[0]).get_coverage (c->buffer->cur().codepoint);
|
||||||
if (likely (index == NOT_COVERED)) return_trace (false);
|
if (likely (index == NOT_COVERED)) return_trace (false);
|
||||||
|
|
||||||
const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage> > (input);
|
const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage>> (input);
|
||||||
const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord> > (lookahead);
|
const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord>> (lookahead);
|
||||||
struct ChainContextApplyLookupContext lookup_context = {
|
struct ChainContextApplyLookupContext lookup_context = {
|
||||||
{match_coverage},
|
{match_coverage},
|
||||||
{this, this, this}
|
{this, this, this}
|
||||||
|
@ -2442,12 +2442,12 @@ struct ChainContextFormat3
|
||||||
{
|
{
|
||||||
TRACE_SANITIZE (this);
|
TRACE_SANITIZE (this);
|
||||||
if (!backtrack.sanitize (c, this)) return_trace (false);
|
if (!backtrack.sanitize (c, this)) return_trace (false);
|
||||||
const OffsetArrayOf<Coverage> &input = StructAfter<OffsetArrayOf<Coverage> > (backtrack);
|
const OffsetArrayOf<Coverage> &input = StructAfter<OffsetArrayOf<Coverage>> (backtrack);
|
||||||
if (!input.sanitize (c, this)) return_trace (false);
|
if (!input.sanitize (c, this)) return_trace (false);
|
||||||
if (!input.len) return_trace (false); /* To be consistent with Context. */
|
if (!input.len) return_trace (false); /* To be consistent with Context. */
|
||||||
const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage> > (input);
|
const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage>> (input);
|
||||||
if (!lookahead.sanitize (c, this)) return_trace (false);
|
if (!lookahead.sanitize (c, this)) return_trace (false);
|
||||||
const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord> > (lookahead);
|
const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord>> (lookahead);
|
||||||
return_trace (lookup.sanitize (c));
|
return_trace (lookup.sanitize (c));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2674,9 +2674,9 @@ struct GSUBGPOS
|
||||||
|
|
||||||
typedef OffsetListOf<TLookup> TLookupList;
|
typedef OffsetListOf<TLookup> TLookupList;
|
||||||
/* TODO Use intersects() to count how many subtables survive? */
|
/* TODO Use intersects() to count how many subtables survive? */
|
||||||
CastR<OffsetTo<TLookupList> > (out->lookupList)
|
CastR<OffsetTo<TLookupList>> (out->lookupList)
|
||||||
.serialize_subset (c,
|
.serialize_subset (c,
|
||||||
this+CastR<const OffsetTo<TLookupList> > (lookupList),
|
this+CastR<const OffsetTo<TLookupList>> (lookupList),
|
||||||
out);
|
out);
|
||||||
|
|
||||||
if (version.to_int () >= 0x00010001u)
|
if (version.to_int () >= 0x00010001u)
|
||||||
|
@ -2700,7 +2700,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) &&
|
||||||
CastR<OffsetTo<TLookupList> > (lookupList).sanitize (c, this) &&
|
CastR<OffsetTo<TLookupList>> (lookupList).sanitize (c, this) &&
|
||||||
(version.to_int () < 0x00010001u || featureVars.sanitize (c, this)));
|
(version.to_int () < 0x00010001u || featureVars.sanitize (c, this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -664,7 +664,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<OffsetTo<MathGlyphConstruction>>
|
||||||
glyphConstruction;
|
glyphConstruction;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -213,7 +213,7 @@ struct name
|
||||||
|
|
||||||
c->push<char> ();
|
c->push<char> ();
|
||||||
char *new_pos = c->allocate_size<char> (size);
|
char *new_pos = c->allocate_size<char> (size);
|
||||||
|
|
||||||
if (unlikely (new_pos == nullptr))
|
if (unlikely (new_pos == nullptr))
|
||||||
{
|
{
|
||||||
acc.fini ();
|
acc.fini ();
|
||||||
|
@ -233,7 +233,7 @@ struct name
|
||||||
}
|
}
|
||||||
|
|
||||||
bool pack_record_and_strings (name *dest_name_unpacked,
|
bool pack_record_and_strings (name *dest_name_unpacked,
|
||||||
hb_serialize_context_t *c,
|
hb_serialize_context_t *c,
|
||||||
unsigned length)
|
unsigned length)
|
||||||
{
|
{
|
||||||
hb_hashmap_t<unsigned, unsigned> id_str_idx_map;
|
hb_hashmap_t<unsigned, unsigned> id_str_idx_map;
|
||||||
|
@ -243,7 +243,7 @@ struct name
|
||||||
id_str_idx_map.set ((unsigned)i, objidx);
|
id_str_idx_map.set ((unsigned)i, objidx);
|
||||||
}
|
}
|
||||||
|
|
||||||
const void *base = & (dest_name_unpacked->nameRecordZ[length]);
|
const void *base = & (dest_name_unpacked->nameRecordZ[length]);
|
||||||
for (int i = length-1; i >= 0; i--)
|
for (int i = length-1; i >= 0; i--)
|
||||||
{
|
{
|
||||||
unsigned str_idx = id_str_idx_map.get ((unsigned)i);
|
unsigned str_idx = id_str_idx_map.get ((unsigned)i);
|
||||||
|
@ -298,7 +298,7 @@ struct name
|
||||||
DEBUG_MSG (SUBSET, nullptr, "Failed to serialize write new name.");
|
DEBUG_MSG (SUBSET, nullptr, "Failed to serialize write new name.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -409,7 +409,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> >
|
NNOffsetTo<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. */
|
||||||
|
|
|
@ -249,7 +249,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> >
|
LNNOffsetTo<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
|
||||||
|
@ -257,7 +257,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> > >
|
LNNOffsetTo<UnsizedArrayOf<OffsetTo<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
|
||||||
|
|
|
@ -912,7 +912,7 @@ static inline bool _write_cff1 (const cff_subset_plan &plan,
|
||||||
/* top dict INDEX */
|
/* top dict INDEX */
|
||||||
{
|
{
|
||||||
assert (plan.offsets.topDictInfo.offset == (unsigned) (c.head - c.start));
|
assert (plan.offsets.topDictInfo.offset == (unsigned) (c.head - c.start));
|
||||||
CFF1IndexOf<TopDict> *dest = c.start_embed< CFF1IndexOf<TopDict> > ();
|
CFF1IndexOf<TopDict> *dest = c.start_embed< CFF1IndexOf<TopDict>> ();
|
||||||
if (dest == nullptr) return false;
|
if (dest == nullptr) return false;
|
||||||
cff1_top_dict_op_serializer_t topSzr;
|
cff1_top_dict_op_serializer_t topSzr;
|
||||||
top_dict_modifiers_t modifier (plan.offsets, plan.topDictModSIDs);
|
top_dict_modifiers_t modifier (plan.offsets, plan.topDictModSIDs);
|
||||||
|
|
|
@ -56,7 +56,7 @@ struct some_array_t
|
||||||
typedef array_iter_t<T> iter_t;
|
typedef array_iter_t<T> iter_t;
|
||||||
array_iter_t<T> iter () { return array_iter_t<T> (arr); }
|
array_iter_t<T> iter () { return array_iter_t<T> (arr); }
|
||||||
operator array_iter_t<T> () { return iter (); }
|
operator array_iter_t<T> () { return iter (); }
|
||||||
operator hb_iter_t<array_iter_t<T> > () { return iter (); }
|
operator hb_iter_t<array_iter_t<T>> () { return iter (); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
hb_array_t<T> arr;
|
hb_array_t<T> arr;
|
||||||
|
@ -134,9 +134,9 @@ main (int argc, char **argv)
|
||||||
(void) static_cast<hb_iter_t<hb_array_t<int>, int&>&> (sa);
|
(void) static_cast<hb_iter_t<hb_array_t<int>, int&>&> (sa);
|
||||||
test_iterable (sa);
|
test_iterable (sa);
|
||||||
|
|
||||||
test_iterable<hb_array_t<int> > ();
|
test_iterable<hb_array_t<int>> ();
|
||||||
test_iterable<hb_sorted_array_t<const int> > ();
|
test_iterable<hb_sorted_array_t<const int>> ();
|
||||||
test_iterable<hb_vector_t<float> > ();
|
test_iterable<hb_vector_t<float>> ();
|
||||||
test_iterable<hb_set_t> ();
|
test_iterable<hb_set_t> ();
|
||||||
test_iterable<OT::Coverage> ();
|
test_iterable<OT::Coverage> ();
|
||||||
|
|
||||||
|
@ -144,7 +144,7 @@ main (int argc, char **argv)
|
||||||
|
|
||||||
hb_any (st);
|
hb_any (st);
|
||||||
|
|
||||||
hb_array_t<hb_vector_t<int> > pa;
|
hb_array_t<hb_vector_t<int>> pa;
|
||||||
pa->as_array ();
|
pa->as_array ();
|
||||||
|
|
||||||
+ hb_iter (src)
|
+ hb_iter (src)
|
||||||
|
|
Loading…
Reference in New Issue