[gsub] Minor

This commit is contained in:
Behdad Esfahbod 2019-05-31 15:48:54 -07:00
parent 2dbdec66a1
commit 2ad4ba7bc0
1 changed files with 21 additions and 19 deletions

View File

@ -180,7 +180,7 @@ struct SingleSubstFormat2
template<typename Iterator, template<typename Iterator,
hb_requires (hb_is_sorted_source_of (Iterator, hb_requires (hb_is_sorted_source_of (Iterator,
const hb_codepoint_pair_t))> hb_codepoint_pair_t))>
bool serialize (hb_serialize_context_t *c, bool serialize (hb_serialize_context_t *c,
Iterator it) Iterator it)
{ {
@ -1297,9 +1297,8 @@ struct SubstLookup : Lookup
{ {
TRACE_SERIALIZE (this); TRACE_SERIALIZE (this);
if (unlikely (!Lookup::serialize (c, SubTable::Single, lookup_props, 1))) return_trace (false); if (unlikely (!Lookup::serialize (c, SubTable::Single, lookup_props, 1))) return_trace (false);
return_trace (serialize_subtable (c, 0).u.single.
return_trace (serialize_subtable (c, 0).u.single serialize (c, hb_zip (glyphs, substitutes)));
.serialize (c, hb_zip (glyphs, substitutes)));
} }
bool serialize_multiple (hb_serialize_context_t *c, bool serialize_multiple (hb_serialize_context_t *c,
@ -1310,7 +1309,8 @@ struct SubstLookup : Lookup
{ {
TRACE_SERIALIZE (this); TRACE_SERIALIZE (this);
if (unlikely (!Lookup::serialize (c, SubTable::Multiple, lookup_props, 1))) return_trace (false); if (unlikely (!Lookup::serialize (c, SubTable::Multiple, lookup_props, 1))) return_trace (false);
return_trace (serialize_subtable (c, 0).u.multiple.serialize (c, return_trace (serialize_subtable (c, 0).u.multiple.
serialize (c,
glyphs, glyphs,
substitute_len_list, substitute_len_list,
substitute_glyphs_list)); substitute_glyphs_list));
@ -1324,7 +1324,8 @@ struct SubstLookup : Lookup
{ {
TRACE_SERIALIZE (this); TRACE_SERIALIZE (this);
if (unlikely (!Lookup::serialize (c, SubTable::Alternate, lookup_props, 1))) return_trace (false); if (unlikely (!Lookup::serialize (c, SubTable::Alternate, lookup_props, 1))) return_trace (false);
return_trace (serialize_subtable (c, 0).u.alternate.serialize (c, return_trace (serialize_subtable (c, 0).u.alternate.
serialize (c,
glyphs, glyphs,
alternate_len_list, alternate_len_list,
alternate_glyphs_list)); alternate_glyphs_list));
@ -1340,7 +1341,8 @@ struct SubstLookup : Lookup
{ {
TRACE_SERIALIZE (this); TRACE_SERIALIZE (this);
if (unlikely (!Lookup::serialize (c, SubTable::Ligature, lookup_props, 1))) return_trace (false); if (unlikely (!Lookup::serialize (c, SubTable::Ligature, lookup_props, 1))) return_trace (false);
return_trace (serialize_subtable (c, 0).u.ligature.serialize (c, return_trace (serialize_subtable (c, 0).u.ligature.
serialize (c,
first_glyphs, first_glyphs,
ligature_per_first_glyph_count_list, ligature_per_first_glyph_count_list,
ligatures_list, ligatures_list,