inline void collect_glyphs (hb_collect_glyphs_context_t *c) const
{
TRACE_COLLECT_GLYPHS (this);
- c->output->add_array (substitute.array, substitute.len);
+ c->output->add_array (substitute.arrayZ, substitute.len);
}
inline bool apply (hb_ot_apply_context_t *c) const
* as a "multiplied" substitution. */
if (unlikely (count == 1))
{
- c->replace_glyph (substitute.array[0]);
+ c->replace_glyph (substitute.arrayZ[0]);
return_trace (true);
}
/* Spec disallows this, but Uniscribe allows it.
for (unsigned int i = 0; i < count; i++) {
_hb_glyph_info_set_lig_props_for_component (&c->buffer->cur(), i);
- c->output_glyph_for_component (substitute.array[i], klass);
+ c->output_glyph_for_component (substitute.arrayZ[i], klass);
}
c->buffer->skip_glyph ();
if (unlikely (iter.get_coverage () >= count))
break; /* Work around malicious fonts. https://github.com/harfbuzz/harfbuzz/issues/363 */
const AlternateSet &alt_set = this+alternateSet[iter.get_coverage ()];
- c->output->add_array (alt_set.array, alt_set.len);
+ c->output->add_array (alt_set.arrayZ, alt_set.len);
}
}
inline void collect_glyphs (hb_collect_glyphs_context_t *c) const
{
TRACE_COLLECT_GLYPHS (this);
- c->input->add_array (component.array, component.len ? component.len - 1 : 0);
+ c->input->add_array (component.arrayZ, component.len ? component.len - 1 : 0);
c->output->add (ligGlyph);
}
const ArrayOf<GlyphID> &substitute = StructAfter<ArrayOf<GlyphID> > (lookahead);
count = substitute.len;
- c->output->add_array (substitute.array, substitute.len);
+ c->output->add_array (substitute.arrayZ, substitute.len);
}
inline const Coverage &get_coverage (void) const
unsigned int start_index = 0, end_index = 0;
if (match_backtrack (c,
- backtrack.len, (HBUINT16 *) backtrack.array,
+ backtrack.len, (HBUINT16 *) backtrack.arrayZ,
match_coverage, this,
&start_index) &&
match_lookahead (c,
- lookahead.len, (HBUINT16 *) lookahead.array,
+ lookahead.len, (HBUINT16 *) lookahead.arrayZ,
match_coverage, this,
1, &end_index))
{
return_trace (dispatch (c));
}
- inline hb_closure_context_t::return_t closure (hb_closure_context_t *c) const
+ inline hb_closure_context_t::return_t closure (hb_closure_context_t *c, unsigned int this_index) const
{
TRACE_CLOSURE (this);
- c->set_recurse_func (dispatch_recurse_func<hb_closure_context_t>);
+ if (!c->should_visit_lookup (this_index))
+ return_trace (HB_VOID);
+
+ c->set_recurse_func (dispatch_closure_recurse_func);
return_trace (dispatch (c));
}
template <typename context_t>
static inline typename context_t::return_t dispatch_recurse_func (context_t *c, unsigned int lookup_index);
+ static inline hb_closure_context_t::return_t dispatch_closure_recurse_func (hb_closure_context_t *c, unsigned int lookup_index)
+ {
+ if (!c->should_visit_lookup (lookup_index))
+ return HB_VOID;
+ return dispatch_recurse_func (c, lookup_index);
+ }
+
template <typename context_t>
inline typename context_t::return_t dispatch (context_t *c) const
{ return Lookup::dispatch<SubstLookupSubTable> (c); }
typedef OffsetListOf<SubstLookup> SubstLookupList;
/*
- * GSUB -- The Glyph Substitution Table
+ * GSUB -- Glyph Substitution
+ * https://docs.microsoft.com/en-us/typography/opentype/spec/gsub
*/
struct GSUB : GSUBGPOS