Fix debug build
Context needs to be called 'c'. The TRACE_* rely on that.
This commit is contained in:
parent
05d1e77db8
commit
6fa690c75a
|
@ -271,13 +271,13 @@ struct CmapSubtableLongSegmented
|
||||||
return_trace (c->check_struct (this) && groups.sanitize (c));
|
return_trace (c->check_struct (this) && groups.sanitize (c));
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool serialize (hb_serialize_context_t *context,
|
inline bool serialize (hb_serialize_context_t *c,
|
||||||
hb_prealloced_array_t<CmapSubtableLongGroup> &group_data)
|
hb_prealloced_array_t<CmapSubtableLongGroup> &group_data)
|
||||||
{
|
{
|
||||||
TRACE_SERIALIZE (this);
|
TRACE_SERIALIZE (this);
|
||||||
if (unlikely (!context->extend_min (*this))) return_trace (false);
|
if (unlikely (!c->extend_min (*this))) return_trace (false);
|
||||||
Supplier<CmapSubtableLongGroup> supplier (group_data.array, group_data.len);
|
Supplier<CmapSubtableLongGroup> supplier (group_data.array, group_data.len);
|
||||||
if (unlikely (!groups.serialize (context, supplier, group_data.len))) return_trace (false);
|
if (unlikely (!groups.serialize (c, supplier, group_data.len))) return_trace (false);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -555,37 +555,37 @@ struct cmap
|
||||||
size_t dest_sz,
|
size_t dest_sz,
|
||||||
void *dest) const
|
void *dest) const
|
||||||
{
|
{
|
||||||
hb_serialize_context_t context (dest, dest_sz);
|
hb_serialize_context_t c (dest, dest_sz);
|
||||||
|
|
||||||
OT::cmap *cmap = context.start_serialize<OT::cmap> ();
|
OT::cmap *cmap = c.start_serialize<OT::cmap> ();
|
||||||
if (unlikely (!context.extend_min (*cmap)))
|
if (unlikely (!c.extend_min (*cmap)))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
cmap->version.set (0);
|
cmap->version.set (0);
|
||||||
|
|
||||||
if (unlikely (!cmap->encodingRecord.serialize (&context, /* numTables */ 1))) return false;
|
if (unlikely (!cmap->encodingRecord.serialize (&c, /* numTables */ 1))) return false;
|
||||||
|
|
||||||
EncodingRecord &rec = cmap->encodingRecord[0];
|
EncodingRecord &rec = cmap->encodingRecord[0];
|
||||||
rec.platformID.set (3); // Windows
|
rec.platformID.set (3); // Windows
|
||||||
rec.encodingID.set (10); // Unicode UCS-4
|
rec.encodingID.set (10); // Unicode UCS-4
|
||||||
|
|
||||||
/* capture offset to subtable */
|
/* capture offset to subtable */
|
||||||
CmapSubtable &subtable = rec.subtable.serialize (&context, cmap);
|
CmapSubtable &subtable = rec.subtable.serialize (&c, cmap);
|
||||||
|
|
||||||
subtable.u.format.set (12);
|
subtable.u.format.set (12);
|
||||||
|
|
||||||
CmapSubtableFormat12 &format12 = subtable.u.format12;
|
CmapSubtableFormat12 &format12 = subtable.u.format12;
|
||||||
if (unlikely (!context.extend_min (format12))) return false;
|
if (unlikely (!c.extend_min (format12))) return false;
|
||||||
|
|
||||||
format12.format.set (12);
|
format12.format.set (12);
|
||||||
format12.reservedZ.set (0);
|
format12.reservedZ.set (0);
|
||||||
format12.lengthZ.set (16 + 12 * groups.len);
|
format12.lengthZ.set (16 + 12 * groups.len);
|
||||||
|
|
||||||
if (unlikely (!format12.serialize (&context, groups))) return false;
|
if (unlikely (!format12.serialize (&c, groups))) return false;
|
||||||
|
|
||||||
context.end_serialize ();
|
c.end_serialize ();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue