[>64k:layout] Add List16OfOffsetTo

This commit is contained in:
Behdad Esfahbod committed 2022-07-12 13:42:52 -06:00
1 parent 6d0e3e677b
commit f6c2aaeea4
1 file changed
+6 -3
+6 -3
View File
@@ -743,8 +743,8 @@ template <typename Type> using Array16OfOffset32To = ArrayOf<OffsetTo<Type, HBUI
template <typename Type> using Array32OfOffset32To = ArrayOf<OffsetTo<Type, HBUINT32>, HBUINT32>;
/* Array of offsets relative to the beginning of the array itself. */
template <typename Type>
struct List16OfOffset16To : Array16OfOffset16To<Type>
template <typename Type, typename OffsetType>
struct List16OfOffsetTo : ArrayOf<OffsetTo<Type, OffsetType>, HBUINT16>
{
const Type& operator [] (int i_) const
{
@@ -762,7 +762,7 @@ struct List16OfOffset16To : Array16OfOffset16To<Type>
bool subset (hb_subset_context_t *c) const
{
TRACE_SUBSET (this);
struct List16OfOffset16To<Type> *out = c->serializer->embed (*this);
struct List16OfOffsetTo *out = c->serializer->embed (*this);
if (unlikely (!out)) return_trace (false);
unsigned int count = this->len;
for (unsigned int i = 0; i < count; i++)
@@ -778,6 +778,9 @@ struct List16OfOffset16To : Array16OfOffset16To<Type>
}
};
template <typename Type>
using List16OfOffset16To = List16OfOffsetTo<Type, HBUINT16>;
/* An array starting at second element. */
template <typename Type, typename LenType=HBUINT16>
struct HeadlessArrayOf