[>64k:layout] Templatize GSUBGPOSFormat1
This commit is contained in:
parent
5fd0a3f0b9
commit
9ef9fc0114
|
@ -774,7 +774,7 @@ struct List16OfOffsetTo : ArrayOf<OffsetTo<Type, OffsetType>, HBUINT16>
|
||||||
bool sanitize (hb_sanitize_context_t *c, Ts&&... ds) const
|
bool sanitize (hb_sanitize_context_t *c, Ts&&... ds) const
|
||||||
{
|
{
|
||||||
TRACE_SANITIZE (this);
|
TRACE_SANITIZE (this);
|
||||||
return_trace (Array16OfOffset16To<Type>::sanitize (c, this, std::forward<Ts> (ds)...));
|
return_trace ((Array16Of<OffsetTo<Type, OffsetType>>::sanitize (c, this, std::forward<Ts> (ds)...)));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1407,8 +1407,8 @@ struct Lookup
|
||||||
template <typename Types>
|
template <typename Types>
|
||||||
using LookupList = List16OfOffsetTo<Lookup, typename Types::HBUINT>;
|
using LookupList = List16OfOffsetTo<Lookup, typename Types::HBUINT>;
|
||||||
|
|
||||||
template <typename TLookup>
|
template <typename TLookup, typename OffsetType>
|
||||||
struct LookupOffsetList : List16OfOffset16To<TLookup>
|
struct LookupOffsetList : List16OfOffsetTo<TLookup, OffsetType>
|
||||||
{
|
{
|
||||||
bool subset (hb_subset_context_t *c,
|
bool subset (hb_subset_context_t *c,
|
||||||
hb_subset_layout_context_t *l) const
|
hb_subset_layout_context_t *l) const
|
||||||
|
|
|
@ -4020,7 +4020,7 @@ struct GSUBGPOSVersion1_2
|
||||||
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 Offset16To<TLookupList> &> (lookupList).sanitize (c, this))))
|
reinterpret_cast<const typename Types::template OffsetTo<TLookupList> &> (lookupList).sanitize (c, this))))
|
||||||
return_trace (false);
|
return_trace (false);
|
||||||
|
|
||||||
#ifndef HB_NO_VAR
|
#ifndef HB_NO_VAR
|
||||||
|
@ -4038,16 +4038,16 @@ struct GSUBGPOSVersion1_2
|
||||||
auto *out = c->subset_context->serializer->embed (*this);
|
auto *out = c->subset_context->serializer->embed (*this);
|
||||||
if (unlikely (!out)) return_trace (false);
|
if (unlikely (!out)) return_trace (false);
|
||||||
|
|
||||||
typedef LookupOffsetList<TLookup> TLookupList;
|
typedef LookupOffsetList<TLookup, typename Types::HBUINT> TLookupList;
|
||||||
reinterpret_cast<Offset16To<TLookupList> &> (out->lookupList)
|
reinterpret_cast<typename Types::template OffsetTo<TLookupList> &> (out->lookupList)
|
||||||
.serialize_subset (c->subset_context,
|
.serialize_subset (c->subset_context,
|
||||||
reinterpret_cast<const Offset16To<TLookupList> &> (lookupList),
|
reinterpret_cast<const typename Types::template OffsetTo<TLookupList> &> (lookupList),
|
||||||
this,
|
this,
|
||||||
c);
|
c);
|
||||||
|
|
||||||
reinterpret_cast<Offset16To<RecordListOfFeature> &> (out->featureList)
|
reinterpret_cast<typename Types::template OffsetTo<RecordListOfFeature> &> (out->featureList)
|
||||||
.serialize_subset (c->subset_context,
|
.serialize_subset (c->subset_context,
|
||||||
reinterpret_cast<const Offset16To<RecordListOfFeature> &> (featureList),
|
reinterpret_cast<const typename Types::template OffsetTo<RecordListOfFeature> &> (featureList),
|
||||||
this,
|
this,
|
||||||
c);
|
c);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue