Rename hb_apply_context_t to hb_ot_apply_context_t

pull/719/head
Behdad Esfahbod 7 years ago
parent 94b49beee9
commit fd03449094
  1. 16
      src/hb-aat-layout-morx-table.hh
  2. 2
      src/hb-aat-layout-private.hh
  3. 2
      src/hb-aat-layout.cc
  4. 48
      src/hb-ot-layout-gpos-table.hh
  5. 24
      src/hb-ot-layout-gsub-table.hh
  6. 58
      src/hb-ot-layout-gsubgpos-private.hh
  7. 4
      src/hb-ot-layout-private.hh
  8. 16
      src/hb-ot-layout.cc
  9. 2
      src/hb-ot-shape-complex-arabic-fallback.hh
  10. 4
      src/hb-ot-shape-fallback.cc
  11. 2
      src/hb-ot-shape.cc

@ -148,7 +148,7 @@ struct RearrangementSubtable
unsigned int last_zero_before_start;
};
inline bool apply (hb_apply_context_t *c) const
inline bool apply (hb_ot_apply_context_t *c) const
{
TRACE_APPLY (this);
@ -245,7 +245,7 @@ struct ContextualSubtable
const UnsizedOffsetListOf<Lookup<GlyphID>, HBUINT32> &subs;
};
inline bool apply (hb_apply_context_t *c) const
inline bool apply (hb_ot_apply_context_t *c) const
{
TRACE_APPLY (this);
@ -326,7 +326,7 @@ struct LigatureSubtable
private:
};
inline bool apply (hb_apply_context_t *c) const
inline bool apply (hb_ot_apply_context_t *c) const
{
TRACE_APPLY (this);
@ -360,7 +360,7 @@ struct LigatureSubtable
struct NoncontextualSubtable
{
inline bool apply (hb_apply_context_t *c) const
inline bool apply (hb_ot_apply_context_t *c) const
{
TRACE_APPLY (this);
@ -396,7 +396,7 @@ struct NoncontextualSubtable
struct InsertionSubtable
{
inline bool apply (hb_apply_context_t *c) const
inline bool apply (hb_ot_apply_context_t *c) const
{
TRACE_APPLY (this);
/* TODO */
@ -448,7 +448,7 @@ struct ChainSubtable
Insertion = 5
};
inline void apply (hb_apply_context_t *c, const char *end) const
inline void apply (hb_ot_apply_context_t *c, const char *end) const
{
dispatch (c, end);
}
@ -496,7 +496,7 @@ struct ChainSubtable
struct Chain
{
inline void apply (hb_apply_context_t *c, const char *end) const
inline void apply (hb_ot_apply_context_t *c, const char *end) const
{
const ChainSubtable *subtable = &StructAtOffset<ChainSubtable> (featureZ, featureZ[0].static_size * featureCount);
unsigned int count = subtableCount;
@ -555,7 +555,7 @@ struct morx
{
static const hb_tag_t tableTag = HB_AAT_TAG_MORX;
inline void apply (hb_apply_context_t *c, unsigned int length) const
inline void apply (hb_ot_apply_context_t *c, unsigned int length) const
{
const char *end = (const char *) this + length;
const Chain *chain = chains;

@ -35,6 +35,6 @@
HB_INTERNAL void
hb_aat_layout_substitute (OT::hb_apply_context_t *c);
hb_aat_layout_substitute (OT::hb_ot_apply_context_t *c);
#endif /* HB_AAT_LAYOUT_PRIVATE_HH */

@ -68,7 +68,7 @@ _hb_aat_layout_create (hb_face_t *face)
}
void
hb_aat_layout_substitute (OT::hb_apply_context_t *c)
hb_aat_layout_substitute (OT::hb_ot_apply_context_t *c)
{
unsigned int length;
const AAT::morx& morx = _get_morx (c->face, &length);

@ -103,7 +103,7 @@ struct ValueFormat : HBUINT16
inline unsigned int get_size (void) const
{ return get_len () * Value::static_size; }
void apply_value (hb_apply_context_t *c,
void apply_value (hb_ot_apply_context_t *c,
const void *base,
const Value *values,
hb_glyph_position_t &glyph_pos) const
@ -232,7 +232,7 @@ struct ValueFormat : HBUINT16
struct AnchorFormat1
{
inline void get_anchor (hb_apply_context_t *c, hb_codepoint_t glyph_id HB_UNUSED,
inline void get_anchor (hb_ot_apply_context_t *c, hb_codepoint_t glyph_id HB_UNUSED,
float *x, float *y) const
{
hb_font_t *font = c->font;
@ -256,7 +256,7 @@ struct AnchorFormat1
struct AnchorFormat2
{
inline void get_anchor (hb_apply_context_t *c, hb_codepoint_t glyph_id,
inline void get_anchor (hb_ot_apply_context_t *c, hb_codepoint_t glyph_id,
float *x, float *y) const
{
hb_font_t *font = c->font;
@ -288,7 +288,7 @@ struct AnchorFormat2
struct AnchorFormat3
{
inline void get_anchor (hb_apply_context_t *c, hb_codepoint_t glyph_id HB_UNUSED,
inline void get_anchor (hb_ot_apply_context_t *c, hb_codepoint_t glyph_id HB_UNUSED,
float *x, float *y) const
{
hb_font_t *font = c->font;
@ -325,7 +325,7 @@ struct AnchorFormat3
struct Anchor
{
inline void get_anchor (hb_apply_context_t *c, hb_codepoint_t glyph_id,
inline void get_anchor (hb_ot_apply_context_t *c, hb_codepoint_t glyph_id,
float *x, float *y) const
{
*x = *y = 0;
@ -413,7 +413,7 @@ struct MarkRecord
struct MarkArray : ArrayOf<MarkRecord> /* Array of MarkRecords--in Coverage order */
{
inline bool apply (hb_apply_context_t *c,
inline bool apply (hb_ot_apply_context_t *c,
unsigned int mark_index, unsigned int glyph_index,
const AnchorMatrix &anchors, unsigned int class_count,
unsigned int glyph_pos) const
@ -470,7 +470,7 @@ struct SinglePosFormat1
return this+coverage;
}
inline bool apply (hb_apply_context_t *c) const
inline bool apply (hb_ot_apply_context_t *c) const
{
TRACE_APPLY (this);
hb_buffer_t *buffer = c->buffer;
@ -518,7 +518,7 @@ struct SinglePosFormat2
return this+coverage;
}
inline bool apply (hb_apply_context_t *c) const
inline bool apply (hb_ot_apply_context_t *c) const
{
TRACE_APPLY (this);
hb_buffer_t *buffer = c->buffer;
@ -610,7 +610,7 @@ struct PairSet
c->input->add_array (&record->secondGlyph, len, record_size);
}
inline bool apply (hb_apply_context_t *c,
inline bool apply (hb_ot_apply_context_t *c,
const ValueFormat *valueFormats,
unsigned int pos) const
{
@ -695,14 +695,14 @@ struct PairPosFormat1
return this+coverage;
}
inline bool apply (hb_apply_context_t *c) const
inline bool apply (hb_ot_apply_context_t *c) const
{
TRACE_APPLY (this);
hb_buffer_t *buffer = c->buffer;
unsigned int index = (this+coverage).get_coverage (buffer->cur().codepoint);
if (likely (index == NOT_COVERED)) return_trace (false);
hb_apply_context_t::skipping_iterator_t &skippy_iter = c->iter_input;
hb_ot_apply_context_t::skipping_iterator_t &skippy_iter = c->iter_input;
skippy_iter.reset (buffer->idx, 1);
if (!skippy_iter.next ()) return_trace (false);
@ -759,14 +759,14 @@ struct PairPosFormat2
return this+coverage;
}
inline bool apply (hb_apply_context_t *c) const
inline bool apply (hb_ot_apply_context_t *c) const
{
TRACE_APPLY (this);
hb_buffer_t *buffer = c->buffer;
unsigned int index = (this+coverage).get_coverage (buffer->cur().codepoint);
if (likely (index == NOT_COVERED)) return_trace (false);
hb_apply_context_t::skipping_iterator_t &skippy_iter = c->iter_input;
hb_ot_apply_context_t::skipping_iterator_t &skippy_iter = c->iter_input;
skippy_iter.reset (buffer->idx, 1);
if (!skippy_iter.next ()) return_trace (false);
@ -900,7 +900,7 @@ struct CursivePosFormat1
return this+coverage;
}
inline bool apply (hb_apply_context_t *c) const
inline bool apply (hb_ot_apply_context_t *c) const
{
TRACE_APPLY (this);
hb_buffer_t *buffer = c->buffer;
@ -908,7 +908,7 @@ struct CursivePosFormat1
const EntryExitRecord &this_record = entryExitRecord[(this+coverage).get_coverage (buffer->cur().codepoint)];
if (!this_record.exitAnchor) return_trace (false);
hb_apply_context_t::skipping_iterator_t &skippy_iter = c->iter_input;
hb_ot_apply_context_t::skipping_iterator_t &skippy_iter = c->iter_input;
skippy_iter.reset (buffer->idx, 1);
if (!skippy_iter.next ()) return_trace (false);
@ -1059,7 +1059,7 @@ struct MarkBasePosFormat1
return this+markCoverage;
}
inline bool apply (hb_apply_context_t *c) const
inline bool apply (hb_ot_apply_context_t *c) const
{
TRACE_APPLY (this);
hb_buffer_t *buffer = c->buffer;
@ -1067,7 +1067,7 @@ struct MarkBasePosFormat1
if (likely (mark_index == NOT_COVERED)) return_trace (false);
/* Now we search backwards for a non-mark glyph */
hb_apply_context_t::skipping_iterator_t &skippy_iter = c->iter_input;
hb_ot_apply_context_t::skipping_iterator_t &skippy_iter = c->iter_input;
skippy_iter.reset (buffer->idx, 1);
skippy_iter.set_lookup_props (LookupFlag::IgnoreMarks);
do {
@ -1162,7 +1162,7 @@ struct MarkLigPosFormat1
return this+markCoverage;
}
inline bool apply (hb_apply_context_t *c) const
inline bool apply (hb_ot_apply_context_t *c) const
{
TRACE_APPLY (this);
hb_buffer_t *buffer = c->buffer;
@ -1170,7 +1170,7 @@ struct MarkLigPosFormat1
if (likely (mark_index == NOT_COVERED)) return_trace (false);
/* Now we search backwards for a non-mark glyph */
hb_apply_context_t::skipping_iterator_t &skippy_iter = c->iter_input;
hb_ot_apply_context_t::skipping_iterator_t &skippy_iter = c->iter_input;
skippy_iter.reset (buffer->idx, 1);
skippy_iter.set_lookup_props (LookupFlag::IgnoreMarks);
if (!skippy_iter.prev ()) return_trace (false);
@ -1275,7 +1275,7 @@ struct MarkMarkPosFormat1
return this+mark1Coverage;
}
inline bool apply (hb_apply_context_t *c) const
inline bool apply (hb_ot_apply_context_t *c) const
{
TRACE_APPLY (this);
hb_buffer_t *buffer = c->buffer;
@ -1283,7 +1283,7 @@ struct MarkMarkPosFormat1
if (likely (mark1_index == NOT_COVERED)) return_trace (false);
/* now we search backwards for a suitable mark glyph until a non-mark glyph */
hb_apply_context_t::skipping_iterator_t &skippy_iter = c->iter_input;
hb_ot_apply_context_t::skipping_iterator_t &skippy_iter = c->iter_input;
skippy_iter.reset (buffer->idx, 1);
skippy_iter.set_lookup_props (c->lookup_props & ~LookupFlag::IgnoreFlags);
if (!skippy_iter.prev ()) return_trace (false);
@ -1450,7 +1450,7 @@ struct PosLookup : Lookup
return false;
}
inline bool apply (hb_apply_context_t *c) const
inline bool apply (hb_ot_apply_context_t *c) const
{
TRACE_APPLY (this);
return_trace (dispatch (c));
@ -1469,7 +1469,7 @@ struct PosLookup : Lookup
dispatch (&c);
}
static bool apply_recurse_func (hb_apply_context_t *c, unsigned int lookup_index);
static bool apply_recurse_func (hb_ot_apply_context_t *c, unsigned int lookup_index);
template <typename context_t>
static inline typename context_t::return_t dispatch_recurse_func (context_t *c, unsigned int lookup_index);
@ -1621,7 +1621,7 @@ template <typename context_t>
return l.dispatch (c);
}
/*static*/ inline bool PosLookup::apply_recurse_func (hb_apply_context_t *c, unsigned int lookup_index)
/*static*/ inline bool PosLookup::apply_recurse_func (hb_ot_apply_context_t *c, unsigned int lookup_index)
{
const GPOS &gpos = *(hb_ot_layout_from_face (c->face)->gpos);
const PosLookup &l = gpos.get_lookup (lookup_index);

@ -76,7 +76,7 @@ struct SingleSubstFormat1
return_trace (c->len == 1 && (this+coverage).get_coverage (c->glyphs[0]) != NOT_COVERED);
}
inline bool apply (hb_apply_context_t *c) const
inline bool apply (hb_ot_apply_context_t *c) const
{
TRACE_APPLY (this);
hb_codepoint_t glyph_id = c->buffer->cur().codepoint;
@ -161,7 +161,7 @@ struct SingleSubstFormat2
return_trace (c->len == 1 && (this+coverage).get_coverage (c->glyphs[0]) != NOT_COVERED);
}
inline bool apply (hb_apply_context_t *c) const
inline bool apply (hb_ot_apply_context_t *c) const
{
TRACE_APPLY (this);
hb_codepoint_t glyph_id = c->buffer->cur().codepoint;
@ -272,7 +272,7 @@ struct Sequence
c->output->add_array (substitute.array, substitute.len);
}
inline bool apply (hb_apply_context_t *c) const
inline bool apply (hb_ot_apply_context_t *c) const
{
TRACE_APPLY (this);
unsigned int count = substitute.len;
@ -363,7 +363,7 @@ struct MultipleSubstFormat1
return_trace (c->len == 1 && (this+coverage).get_coverage (c->glyphs[0]) != NOT_COVERED);
}
inline bool apply (hb_apply_context_t *c) const
inline bool apply (hb_ot_apply_context_t *c) const
{
TRACE_APPLY (this);
@ -495,7 +495,7 @@ struct AlternateSubstFormat1
return_trace (c->len == 1 && (this+coverage).get_coverage (c->glyphs[0]) != NOT_COVERED);
}
inline bool apply (hb_apply_context_t *c) const
inline bool apply (hb_ot_apply_context_t *c) const
{
TRACE_APPLY (this);
hb_codepoint_t glyph_id = c->buffer->cur().codepoint;
@ -628,7 +628,7 @@ struct Ligature
return_trace (true);
}
inline bool apply (hb_apply_context_t *c) const
inline bool apply (hb_ot_apply_context_t *c) const
{
TRACE_APPLY (this);
unsigned int count = component.len;
@ -730,7 +730,7 @@ struct LigatureSet
return_trace (false);
}
inline bool apply (hb_apply_context_t *c) const
inline bool apply (hb_ot_apply_context_t *c) const
{
TRACE_APPLY (this);
unsigned int num_ligs = ligature.len;
@ -821,7 +821,7 @@ struct LigatureSubstFormat1
return_trace (lig_set.would_apply (c));
}
inline bool apply (hb_apply_context_t *c) const
inline bool apply (hb_ot_apply_context_t *c) const
{
TRACE_APPLY (this);
hb_codepoint_t glyph_id = c->buffer->cur().codepoint;
@ -993,7 +993,7 @@ struct ReverseChainSingleSubstFormat1
return_trace (c->len == 1 && (this+coverage).get_coverage (c->glyphs[0]) != NOT_COVERED);
}
inline bool apply (hb_apply_context_t *c) const
inline bool apply (hb_ot_apply_context_t *c) const
{
TRACE_APPLY (this);
if (unlikely (c->nesting_level_left != HB_MAX_NESTING_LEVEL))
@ -1150,7 +1150,7 @@ struct SubstLookup : Lookup
return lookup_type_is_reverse (type);
}
inline bool apply (hb_apply_context_t *c) const
inline bool apply (hb_ot_apply_context_t *c) const
{
TRACE_APPLY (this);
return_trace (dispatch (c));
@ -1186,7 +1186,7 @@ struct SubstLookup : Lookup
return_trace (dispatch (c));
}
static bool apply_recurse_func (hb_apply_context_t *c, unsigned int lookup_index);
static bool apply_recurse_func (hb_ot_apply_context_t *c, unsigned int lookup_index);
inline SubstLookupSubTable& serialize_subtable (hb_serialize_context_t *c,
unsigned int i)
@ -1343,7 +1343,7 @@ template <typename context_t>
return l.dispatch (c);
}
/*static*/ inline bool SubstLookup::apply_recurse_func (hb_apply_context_t *c, unsigned int lookup_index)
/*static*/ inline bool SubstLookup::apply_recurse_func (hb_ot_apply_context_t *c, unsigned int lookup_index)
{
const GSUB &gsub = *(hb_ot_layout_from_face (c->face)->gsub);
const SubstLookup &l = gsub.get_lookup (lookup_index);

@ -218,8 +218,8 @@ struct hb_add_coverage_context_t :
};
struct hb_apply_context_t :
hb_dispatch_context_t<hb_apply_context_t, bool, HB_DEBUG_APPLY>
struct hb_ot_apply_context_t :
hb_dispatch_context_t<hb_ot_apply_context_t, bool, HB_DEBUG_APPLY>
{
struct matcher_t
{
@ -271,7 +271,7 @@ struct hb_apply_context_t :
};
inline may_skip_t
may_skip (const hb_apply_context_t *c,
may_skip (const hb_ot_apply_context_t *c,
const hb_glyph_info_t &info) const
{
if (!c->check_glyph_property (&info, lookup_props))
@ -297,7 +297,7 @@ struct hb_apply_context_t :
struct skipping_iterator_t
{
inline void init (hb_apply_context_t *c_, bool context_match = false)
inline void init (hb_ot_apply_context_t *c_, bool context_match = false)
{
c = c_;
match_glyph_data = nullptr;
@ -333,7 +333,7 @@ struct hb_apply_context_t :
inline void reject (void) { num_items++; match_glyph_data--; }
inline matcher_t::may_skip_t
may_skip (const hb_apply_context_t *c,
may_skip (const hb_ot_apply_context_t *c,
const hb_glyph_info_t &info) const
{
return matcher.may_skip (c, info);
@ -396,7 +396,7 @@ struct hb_apply_context_t :
unsigned int idx;
protected:
hb_apply_context_t *c;
hb_ot_apply_context_t *c;
matcher_t matcher;
const HBUINT16 *match_glyph_data;
@ -406,7 +406,7 @@ struct hb_apply_context_t :
inline const char *get_name (void) { return "APPLY"; }
typedef return_t (*recurse_func_t) (hb_apply_context_t *c, unsigned int lookup_index);
typedef return_t (*recurse_func_t) (hb_ot_apply_context_t *c, unsigned int lookup_index);
template <typename T>
inline return_t dispatch (const T &obj) { return obj.apply (this); }
static return_t default_return_value (void) { return false; }
@ -444,7 +444,7 @@ struct hb_apply_context_t :
bool has_glyph_classes;
hb_apply_context_t (unsigned int table_index_,
hb_ot_apply_context_t (unsigned int table_index_,
hb_font_t *font_,
hb_buffer_t *buffer_) :
iter_input (), iter_context (),
@ -670,7 +670,7 @@ static inline bool would_match_input (hb_would_apply_context_t *c,
return true;
}
static inline bool match_input (hb_apply_context_t *c,
static inline bool match_input (hb_ot_apply_context_t *c,
unsigned int count, /* Including the first glyph (not matched) */
const HBUINT16 input[], /* Array of input values--start with second glyph */
match_func_t match_func,
@ -686,7 +686,7 @@ static inline bool match_input (hb_apply_context_t *c,
hb_buffer_t *buffer = c->buffer;
hb_apply_context_t::skipping_iterator_t &skippy_iter = c->iter_input;
hb_ot_apply_context_t::skipping_iterator_t &skippy_iter = c->iter_input;
skippy_iter.reset (buffer->idx, count - 1);
skippy_iter.set_match_func (match_func, match_data, input);
@ -763,7 +763,7 @@ static inline bool match_input (hb_apply_context_t *c,
j--;
}
if (found && skippy_iter.may_skip (c, out[j]) == hb_apply_context_t::matcher_t::SKIP_YES)
if (found && skippy_iter.may_skip (c, out[j]) == hb_ot_apply_context_t::matcher_t::SKIP_YES)
ligbase = LIGBASE_MAY_SKIP;
else
ligbase = LIGBASE_MAY_NOT_SKIP;
@ -796,7 +796,7 @@ static inline bool match_input (hb_apply_context_t *c,
return_trace (true);
}
static inline bool ligate_input (hb_apply_context_t *c,
static inline bool ligate_input (hb_ot_apply_context_t *c,
unsigned int count, /* Including the first glyph */
unsigned int match_positions[HB_MAX_CONTEXT_LENGTH], /* Including the first glyph */
unsigned int match_length,
@ -894,7 +894,7 @@ static inline bool ligate_input (hb_apply_context_t *c,
return_trace (true);
}
static inline bool match_backtrack (hb_apply_context_t *c,
static inline bool match_backtrack (hb_ot_apply_context_t *c,
unsigned int count,
const HBUINT16 backtrack[],
match_func_t match_func,
@ -903,7 +903,7 @@ static inline bool match_backtrack (hb_apply_context_t *c,
{
TRACE_APPLY (nullptr);
hb_apply_context_t::skipping_iterator_t &skippy_iter = c->iter_context;
hb_ot_apply_context_t::skipping_iterator_t &skippy_iter = c->iter_context;
skippy_iter.reset (c->buffer->backtrack_len (), count);
skippy_iter.set_match_func (match_func, match_data, backtrack);
@ -916,7 +916,7 @@ static inline bool match_backtrack (hb_apply_context_t *c,
return_trace (true);
}
static inline bool match_lookahead (hb_apply_context_t *c,
static inline bool match_lookahead (hb_ot_apply_context_t *c,
unsigned int count,
const HBUINT16 lookahead[],
match_func_t match_func,
@ -926,7 +926,7 @@ static inline bool match_lookahead (hb_apply_context_t *c,
{
TRACE_APPLY (nullptr);
hb_apply_context_t::skipping_iterator_t &skippy_iter = c->iter_context;
hb_ot_apply_context_t::skipping_iterator_t &skippy_iter = c->iter_context;
skippy_iter.reset (c->buffer->idx + offset - 1, count);
skippy_iter.set_match_func (match_func, match_data, lookahead);
@ -967,7 +967,7 @@ static inline void recurse_lookups (context_t *c,
c->recurse (lookupRecord[i].lookupListIndex);
}
static inline bool apply_lookup (hb_apply_context_t *c,
static inline bool apply_lookup (hb_ot_apply_context_t *c,
unsigned int count, /* Including the first glyph */
unsigned int match_positions[HB_MAX_CONTEXT_LENGTH], /* Including the first glyph */
unsigned int lookupCount,
@ -1149,7 +1149,7 @@ static inline bool context_would_apply_lookup (hb_would_apply_context_t *c,
inputCount, input,
lookup_context.funcs.match, lookup_context.match_data);
}
static inline bool context_apply_lookup (hb_apply_context_t *c,
static inline bool context_apply_lookup (hb_ot_apply_context_t *c,
unsigned int inputCount, /* Including the first glyph (not matched) */
const HBUINT16 input[], /* Array of input values--start with second glyph */
unsigned int lookupCount,
@ -1198,7 +1198,7 @@ struct Rule
return_trace (context_would_apply_lookup (c, inputCount, inputZ, lookupCount, lookupRecord, lookup_context));
}
inline bool apply (hb_apply_context_t *c, ContextApplyLookupContext &lookup_context) const
inline bool apply (hb_ot_apply_context_t *c, ContextApplyLookupContext &lookup_context) const
{
TRACE_APPLY (this);
const LookupRecord *lookupRecord = &StructAtOffset<LookupRecord> (inputZ, inputZ[0].static_size * (inputCount ? inputCount - 1 : 0));
@ -1259,7 +1259,7 @@ struct RuleSet
return_trace (false);
}
inline bool apply (hb_apply_context_t *c, ContextApplyLookupContext &lookup_context) const
inline bool apply (hb_ot_apply_context_t *c, ContextApplyLookupContext &lookup_context) const
{
TRACE_APPLY (this);
unsigned int num_rules = rule.len;
@ -1339,7 +1339,7 @@ struct ContextFormat1
return this+coverage;
}
inline bool apply (hb_apply_context_t *c) const
inline bool apply (hb_ot_apply_context_t *c) const
{
TRACE_APPLY (this);
unsigned int index = (this+coverage).get_coverage (c->buffer->cur().codepoint);
@ -1431,7 +1431,7 @@ struct ContextFormat2
return this+coverage;
}
inline bool apply (hb_apply_context_t *c) const
inline bool apply (hb_ot_apply_context_t *c) const
{
TRACE_APPLY (this);
unsigned int index = (this+coverage).get_coverage (c->buffer->cur().codepoint);
@ -1522,7 +1522,7 @@ struct ContextFormat3
return this+coverageZ[0];
}
inline bool apply (hb_apply_context_t *c) const
inline bool apply (hb_ot_apply_context_t *c) const
{
TRACE_APPLY (this);
unsigned int index = (this+coverageZ[0]).get_coverage (c->buffer->cur().codepoint);
@ -1673,7 +1673,7 @@ static inline bool chain_context_would_apply_lookup (hb_would_apply_context_t *c
lookup_context.funcs.match, lookup_context.match_data[1]);
}
static inline bool chain_context_apply_lookup (hb_apply_context_t *c,
static inline bool chain_context_apply_lookup (hb_ot_apply_context_t *c,
unsigned int backtrackCount,
const HBUINT16 backtrack[],
unsigned int inputCount, /* Including the first glyph (not matched) */
@ -1748,7 +1748,7 @@ struct ChainRule
lookup.array, lookup_context));
}
inline bool apply (hb_apply_context_t *c, ChainContextApplyLookupContext &lookup_context) const
inline bool apply (hb_ot_apply_context_t *c, ChainContextApplyLookupContext &lookup_context) const
{
TRACE_APPLY (this);
const HeadlessArrayOf<HBUINT16> &input = StructAfter<HeadlessArrayOf<HBUINT16> > (backtrack);
@ -1820,7 +1820,7 @@ struct ChainRuleSet
return_trace (false);
}
inline bool apply (hb_apply_context_t *c, ChainContextApplyLookupContext &lookup_context) const
inline bool apply (hb_ot_apply_context_t *c, ChainContextApplyLookupContext &lookup_context) const
{
TRACE_APPLY (this);
unsigned int num_rules = rule.len;
@ -1897,7 +1897,7 @@ struct ChainContextFormat1
return this+coverage;
}
inline bool apply (hb_apply_context_t *c) const
inline bool apply (hb_ot_apply_context_t *c) const
{
TRACE_APPLY (this);
unsigned int index = (this+coverage).get_coverage (c->buffer->cur().codepoint);
@ -2001,7 +2001,7 @@ struct ChainContextFormat2
return this+coverage;
}
inline bool apply (hb_apply_context_t *c) const
inline bool apply (hb_ot_apply_context_t *c) const
{
TRACE_APPLY (this);
unsigned int index = (this+coverage).get_coverage (c->buffer->cur().codepoint);
@ -2125,7 +2125,7 @@ struct ChainContextFormat3
return this+input[0];
}
inline bool apply (hb_apply_context_t *c) const
inline bool apply (hb_ot_apply_context_t *c) const
{
TRACE_APPLY (this);
const OffsetArrayOf<Coverage> &input = StructAfter<OffsetArrayOf<Coverage> > (backtrack);

@ -90,12 +90,12 @@ hb_ot_layout_substitute_start (hb_font_t *font,
struct hb_ot_layout_lookup_accelerator_t;
namespace OT {
struct hb_apply_context_t;
struct hb_ot_apply_context_t;
struct SubstLookup;
}
HB_INTERNAL void
hb_ot_layout_substitute_lookup (OT::hb_apply_context_t *c,
hb_ot_layout_substitute_lookup (OT::hb_ot_apply_context_t *c,
const OT::SubstLookup &lookup,
const hb_ot_layout_lookup_accelerator_t &accel);

@ -1057,13 +1057,13 @@ struct hb_get_subtables_context_t :
OT::hb_dispatch_context_t<hb_get_subtables_context_t, hb_void_t, HB_DEBUG_APPLY>
{
template <typename Type>
static inline bool apply_to (const void *obj, OT::hb_apply_context_t *c)
static inline bool apply_to (const void *obj, OT::hb_ot_apply_context_t *c)
{
const Type *typed_obj = (const Type *) obj;
return typed_obj->apply (c);
}
typedef bool (*hb_apply_func_t) (const void *obj, OT::hb_apply_context_t *c);
typedef bool (*hb_apply_func_t) (const void *obj, OT::hb_ot_apply_context_t *c);
struct hb_applicable_t
{
@ -1073,7 +1073,7 @@ struct hb_get_subtables_context_t :
apply_func = apply_func_;
}
inline bool apply (OT::hb_apply_context_t *c) const { return apply_func (obj, c); }
inline bool apply (OT::hb_ot_apply_context_t *c) const { return apply_func (obj, c); }
private:
const void *obj;
@ -1104,7 +1104,7 @@ struct hb_get_subtables_context_t :
};
static inline bool
apply_forward (OT::hb_apply_context_t *c,
apply_forward (OT::hb_ot_apply_context_t *c,
const hb_ot_layout_lookup_accelerator_t &accel,
const hb_get_subtables_context_t::array_t &subtables)
{
@ -1134,7 +1134,7 @@ apply_forward (OT::hb_apply_context_t *c,
}
static inline bool
apply_backward (OT::hb_apply_context_t *c,
apply_backward (OT::hb_ot_apply_context_t *c,
const hb_ot_layout_lookup_accelerator_t &accel,
const hb_get_subtables_context_t::array_t &subtables)
{
@ -1163,7 +1163,7 @@ apply_backward (OT::hb_apply_context_t *c,
template <typename Proxy>
static inline void
apply_string (OT::hb_apply_context_t *c,
apply_string (OT::hb_ot_apply_context_t *c,
const typename Proxy::Lookup &lookup,
const hb_ot_layout_lookup_accelerator_t &accel)
{
@ -1214,7 +1214,7 @@ inline void hb_ot_map_t::apply (const Proxy &proxy,
{
const unsigned int table_index = proxy.table_index;
unsigned int i = 0;
OT::hb_apply_context_t c (table_index, font, buffer);
OT::hb_ot_apply_context_t c (table_index, font, buffer);
c.set_recurse_func (Proxy::Lookup::apply_recurse_func);
for (unsigned int stage_index = 0; stage_index < stages[table_index].len; stage_index++) {
@ -1254,7 +1254,7 @@ void hb_ot_map_t::position (const hb_ot_shape_plan_t *plan, hb_font_t *font, hb_
}
HB_INTERNAL void
hb_ot_layout_substitute_lookup (OT::hb_apply_context_t *c,
hb_ot_layout_substitute_lookup (OT::hb_ot_apply_context_t *c,
const OT::SubstLookup &lookup,
const hb_ot_layout_lookup_accelerator_t &accel)
{

@ -340,7 +340,7 @@ arabic_fallback_plan_shape (arabic_fallback_plan_t *fallback_plan,
hb_font_t *font,
hb_buffer_t *buffer)
{
OT::hb_apply_context_t c (0, font, buffer);
OT::hb_ot_apply_context_t c (0, font, buffer);
for (unsigned int i = 0; i < fallback_plan->num_lookups; i++)
if (fallback_plan->lookup_array[i]) {
c.set_lookup_mask (fallback_plan->mask_array[i]);

@ -442,10 +442,10 @@ _hb_ot_shape_fallback_kern (const hb_ot_shape_plan_t *plan,
{
if (!plan->has_kern) return;
OT::hb_apply_context_t c (1, font, buffer);
OT::hb_ot_apply_context_t c (1, font, buffer);
c.set_lookup_mask (plan->kern_mask);
c.set_lookup_props (OT::LookupFlag::IgnoreMarks);
OT::hb_apply_context_t::skipping_iterator_t &skippy_iter = c.iter_input;
OT::hb_ot_apply_context_t::skipping_iterator_t &skippy_iter = c.iter_input;
skippy_iter.init (&c);
unsigned int count = buffer->len;

@ -619,7 +619,7 @@ hb_ot_substitute_complex (hb_ot_shape_context_t *c)
c->plan->substitute (c->font, buffer);
/* XXX Call morx instead. */
//OT::hb_apply_context_t ac (0, c->font, c->buffer);
//OT::hb_ot_apply_context_t ac (0, c->font, c->buffer);
//hb_aat_layout_substitute (&ac);
}

Loading…
Cancel
Save