friend struct SinglePos;
private:
- inline bool position (LOOKUP_ARGS_DEF) const {
+ inline bool apply (LOOKUP_ARGS_DEF) const {
/* TODO */
return false;
}
friend struct SinglePos;
private:
- inline bool position (LOOKUP_ARGS_DEF) const {
+ inline bool apply (LOOKUP_ARGS_DEF) const {
/* TODO */
return false;
}
private:
- inline bool position (LOOKUP_ARGS_DEF) const {
+ inline bool apply (LOOKUP_ARGS_DEF) const {
switch (u.format) {
- case 1: return u.format1->position (LOOKUP_ARGS);
- case 2: return u.format2->position (LOOKUP_ARGS);
+ case 1: return u.format1->apply (LOOKUP_ARGS);
+ case 2: return u.format2->apply (LOOKUP_ARGS);
default:return false;
}
}
friend struct PairPos;
private:
- inline bool position (LOOKUP_ARGS_DEF) const {
+ inline bool apply (LOOKUP_ARGS_DEF) const {
/* TODO */
return false;
}
friend struct PairPos;
private:
- inline bool position (LOOKUP_ARGS_DEF) const {
+ inline bool apply (LOOKUP_ARGS_DEF) const {
/* TODO */
return false;
}
private:
- inline bool position (LOOKUP_ARGS_DEF) const {
+ inline bool apply (LOOKUP_ARGS_DEF) const {
switch (u.format) {
- case 1: return u.format1->position (LOOKUP_ARGS);
- case 2: return u.format2->position (LOOKUP_ARGS);
+ case 1: return u.format1->apply (LOOKUP_ARGS);
+ case 2: return u.format2->apply (LOOKUP_ARGS);
default:return false;
}
}
friend struct CursivePos;
private:
- inline bool position (LOOKUP_ARGS_DEF) const {
+ inline bool apply (LOOKUP_ARGS_DEF) const {
/* TODO */
return false;
}
private:
- inline bool position (LOOKUP_ARGS_DEF) const {
+ inline bool apply (LOOKUP_ARGS_DEF) const {
switch (u.format) {
- case 1: return u.format1->position (LOOKUP_ARGS);
+ case 1: return u.format1->apply (LOOKUP_ARGS);
default:return false;
}
}
friend struct MarkBasePos;
private:
- inline bool position (LOOKUP_ARGS_DEF) const {
+ inline bool apply (LOOKUP_ARGS_DEF) const {
/* TODO */
return false;
}
private:
- inline bool position (LOOKUP_ARGS_DEF) const {
+ inline bool apply (LOOKUP_ARGS_DEF) const {
switch (u.format) {
- case 1: return u.format1->position (LOOKUP_ARGS);
+ case 1: return u.format1->apply (LOOKUP_ARGS);
default:return false;
}
}
friend struct MarkLigPos;
private:
- inline bool position (LOOKUP_ARGS_DEF) const {
+ inline bool apply (LOOKUP_ARGS_DEF) const {
/* TODO */
return false;
}
private:
- inline bool position (LOOKUP_ARGS_DEF) const {
+ inline bool apply (LOOKUP_ARGS_DEF) const {
switch (u.format) {
- case 1: return u.format1->position (LOOKUP_ARGS);
+ case 1: return u.format1->apply (LOOKUP_ARGS);
default:return false;
}
}
friend struct MarkMarkPos;
private:
- inline bool position (LOOKUP_ARGS_DEF) const {
+ inline bool apply (LOOKUP_ARGS_DEF) const {
/* TODO */
return false;
}
private:
- inline bool position (LOOKUP_ARGS_DEF) const {
+ inline bool apply (LOOKUP_ARGS_DEF) const {
switch (u.format) {
- case 1: return u.format1->position (LOOKUP_ARGS);
+ case 1: return u.format1->apply (LOOKUP_ARGS);
default:return false;
}
}
struct ContextPos : Context {
- inline bool position (LOOKUP_ARGS_DEF) const {
- return this->apply (LOOKUP_ARGS, position_lookup);
+ inline bool apply (LOOKUP_ARGS_DEF) const {
+ return Context::apply (LOOKUP_ARGS, position_lookup);
}
};
ASSERT_SIZE (ContextPos, 2);
struct ChainContextPos : ChainContext {
- inline bool position (LOOKUP_ARGS_DEF) const {
- return this->apply (LOOKUP_ARGS, position_lookup);
+ inline bool apply (LOOKUP_ARGS_DEF) const {
+ return ChainContext::apply (LOOKUP_ARGS, position_lookup);
}
};
ASSERT_SIZE (ChainContextPos, 2);
private:
inline unsigned int get_type (void) const { return extensionLookupType; }
inline unsigned int get_offset (void) const { return (extensionOffset[0] << 16) + extensionOffset[1]; }
- inline bool position (LOOKUP_ARGS_DEF) const;
+ inline bool apply (LOOKUP_ARGS_DEF) const;
private:
USHORT format; /* Format identifier. Set to 1. */
}
}
- inline bool position (LOOKUP_ARGS_DEF) const {
+ inline bool apply (LOOKUP_ARGS_DEF) const {
switch (u.format) {
- case 1: return u.format1->position (LOOKUP_ARGS);
+ case 1: return u.format1->apply (LOOKUP_ARGS);
default:return false;
}
}
friend struct PosLookup;
- inline bool position (LOOKUP_ARGS_DEF, unsigned int lookup_type) const {
+ inline bool apply (LOOKUP_ARGS_DEF, unsigned int lookup_type) const {
switch (lookup_type) {
- case GPOS_Single: return u.single->position (LOOKUP_ARGS);
- case GPOS_Pair: return u.pair->position (LOOKUP_ARGS);
- case GPOS_Cursive: return u.cursive->position (LOOKUP_ARGS);
- case GPOS_MarkBase: return u.markBase->position (LOOKUP_ARGS);
- case GPOS_MarkLig: return u.markLig->position (LOOKUP_ARGS);
- case GPOS_MarkMark: return u.markMark->position (LOOKUP_ARGS);
- case GPOS_Context: return u.context->position (LOOKUP_ARGS);
- case GPOS_ChainContext: return u.chainContext->position (LOOKUP_ARGS);
- case GPOS_Extension: return u.extension->position (LOOKUP_ARGS);
+ case GPOS_Single: return u.single->apply (LOOKUP_ARGS);
+ case GPOS_Pair: return u.pair->apply (LOOKUP_ARGS);
+ case GPOS_Cursive: return u.cursive->apply (LOOKUP_ARGS);
+ case GPOS_MarkBase: return u.markBase->apply (LOOKUP_ARGS);
+ case GPOS_MarkLig: return u.markLig->apply (LOOKUP_ARGS);
+ case GPOS_MarkMark: return u.markMark->apply (LOOKUP_ARGS);
+ case GPOS_Context: return u.context->apply (LOOKUP_ARGS);
+ case GPOS_ChainContext: return u.chainContext->apply (LOOKUP_ARGS);
+ case GPOS_Extension: return u.extension->apply (LOOKUP_ARGS);
default:return false;
}
}
return type;
}
- inline bool position_subtables (hb_ot_layout_t *layout,
- hb_buffer_t *buffer,
- unsigned int context_length,
- unsigned int nesting_level_left,
- unsigned int property) const {
+ inline bool apply_subtables (hb_ot_layout_t *layout,
+ hb_buffer_t *buffer,
+ unsigned int context_length,
+ unsigned int nesting_level_left,
+ unsigned int property) const {
unsigned int lookup_type = get_type ();
unsigned int lookup_flag = get_flag ();
for (unsigned int i = 0; i < get_subtable_count (); i++)
- if (get_subtable (i).position (LOOKUP_ARGS, lookup_type))
+ if (get_subtable (i).apply (LOOKUP_ARGS, lookup_type))
return true;
return false;
}
- inline bool position_once (hb_ot_layout_t *layout, hb_buffer_t *buffer) const {
+ inline bool apply_once (hb_ot_layout_t *layout, hb_buffer_t *buffer) const {
unsigned int lookup_flag = get_flag ();
if (!_hb_ot_layout_check_glyph_property (layout, IN_CURITEM (), lookup_flag, &property))
return false;
- return position_subtables (layout, buffer, NO_CONTEXT, MAX_NESTING_LEVEL, property);
+ return apply_subtables (layout, buffer, NO_CONTEXT, MAX_NESTING_LEVEL, property);
}
- bool position_string (hb_ot_layout_t *layout,
- hb_buffer_t *buffer,
- hb_ot_layout_feature_mask_t mask) const {
+ bool apply_string (hb_ot_layout_t *layout,
+ hb_buffer_t *buffer,
+ hb_ot_layout_feature_mask_t mask) const {
bool ret = false;
bool done;
if (~IN_PROPERTIES (buffer->in_pos) & mask) {
- done = position_once (layout, buffer);
+ done = apply_once (layout, buffer);
ret |= done;
} else {
done = false;
hb_buffer_t *buffer,
unsigned int lookup_index,
hb_ot_layout_feature_mask_t mask) const {
- return get_lookup (lookup_index).position_string (layout, buffer, mask);
+ return get_lookup (lookup_index).apply_string (layout, buffer, mask);
}
};
/* Out-of-class implementation for methods recursing */
-inline bool ExtensionPosFormat1::position (LOOKUP_ARGS_DEF) const {
+inline bool ExtensionPosFormat1::apply (LOOKUP_ARGS_DEF) const {
unsigned int lookup_type = get_type ();
if (HB_UNLIKELY (lookup_type == GPOS_Extension))
return false;
- return ((PosLookupSubTable&)*(((char *) this) + get_offset ())).position (LOOKUP_ARGS, lookup_type);
+ return ((PosLookupSubTable&)*(((char *) this) + get_offset ())).apply (LOOKUP_ARGS, lookup_type);
}
static inline bool position_lookup (LOOKUP_ARGS_DEF, unsigned int lookup_index) {
if (HB_UNLIKELY (context_length < 1))
return false;
- return l.position_subtables (layout, buffer, context_length, nesting_level_left, property);
+ return l.apply_subtables (layout, buffer, context_length, nesting_level_left, property);
}
}
}
- inline bool substitute (LOOKUP_ARGS_DEF) const {
+ inline bool apply (LOOKUP_ARGS_DEF) const {
hb_codepoint_t glyph_id = IN_CURGLYPH ();
_hb_ot_layout_set_glyph_property (layout, substitute[n], property);
}
- inline bool substitute_sequence (LOOKUP_ARGS_DEF) const {
+ inline bool apply (LOOKUP_ARGS_DEF) const {
if (HB_UNLIKELY (!substitute.len))
return false;
private:
- inline bool substitute (LOOKUP_ARGS_DEF) const {
+ inline bool apply (LOOKUP_ARGS_DEF) const {
unsigned int index = (this+coverage) (IN_CURGLYPH ());
if (HB_LIKELY (index == NOT_COVERED))
return false;
- return (this+sequence[index]).substitute_sequence (LOOKUP_ARGS);
+ return (this+sequence[index]).apply (LOOKUP_ARGS);
}
private:
private:
- inline bool substitute (LOOKUP_ARGS_DEF) const {
+ inline bool apply (LOOKUP_ARGS_DEF) const {
switch (u.format) {
- case 1: return u.format1->substitute (LOOKUP_ARGS);
+ case 1: return u.format1->apply (LOOKUP_ARGS);
default:return false;
}
}
private:
- inline bool substitute (LOOKUP_ARGS_DEF) const {
+ inline bool apply (LOOKUP_ARGS_DEF) const {
hb_codepoint_t glyph_id = IN_CURGLYPH ();
private:
- inline bool substitute (LOOKUP_ARGS_DEF) const {
+ inline bool apply (LOOKUP_ARGS_DEF) const {
switch (u.format) {
- case 1: return u.format1->substitute (LOOKUP_ARGS);
+ case 1: return u.format1->apply (LOOKUP_ARGS);
default:return false;
}
}
friend struct LigatureSet;
private:
- inline bool substitute (LOOKUP_ARGS_DEF, bool is_mark) const {
+ inline bool apply (LOOKUP_ARGS_DEF, bool is_mark) const {
unsigned int i, j;
unsigned int count = component.len;
private:
- inline bool substitute (LOOKUP_ARGS_DEF, bool is_mark) const {
+ inline bool apply (LOOKUP_ARGS_DEF, bool is_mark) const {
unsigned int num_ligs = ligature.len;
for (unsigned int i = 0; i < num_ligs; i++) {
const Ligature &lig = this+ligature[i];
- if (lig.substitute (LOOKUP_ARGS, is_mark))
+ if (lig.apply (LOOKUP_ARGS, is_mark))
return true;
}
private:
- inline bool substitute (LOOKUP_ARGS_DEF) const {
+ inline bool apply (LOOKUP_ARGS_DEF) const {
hb_codepoint_t glyph_id = IN_CURGLYPH ();
return false;
const LigatureSet &lig_set = this+ligatureSet[index];
- return lig_set.substitute (LOOKUP_ARGS, first_is_mark);
+ return lig_set.apply (LOOKUP_ARGS, first_is_mark);
}
private:
private:
- inline bool substitute (LOOKUP_ARGS_DEF) const {
+ inline bool apply (LOOKUP_ARGS_DEF) const {
switch (u.format) {
- case 1: return u.format1->substitute (LOOKUP_ARGS);
+ case 1: return u.format1->apply (LOOKUP_ARGS);
default:return false;
}
}
struct ContextSubst : Context {
- inline bool substitute (LOOKUP_ARGS_DEF) const {
- return this->apply (LOOKUP_ARGS, substitute_lookup);
+ inline bool apply (LOOKUP_ARGS_DEF) const {
+ return Context::apply (LOOKUP_ARGS, substitute_lookup);
}
};
ASSERT_SIZE (ContextSubst, 2);
struct ChainContextSubst : ChainContext {
- inline bool substitute (LOOKUP_ARGS_DEF) const {
- return this->apply (LOOKUP_ARGS, substitute_lookup);
+ inline bool apply (LOOKUP_ARGS_DEF) const {
+ return ChainContext::apply (LOOKUP_ARGS, substitute_lookup);
}
};
ASSERT_SIZE (ChainContextSubst, 2);
private:
inline unsigned int get_type (void) const { return extensionLookupType; }
inline unsigned int get_offset (void) const { return (extensionOffset[0] << 16) + extensionOffset[1]; }
- inline bool substitute (LOOKUP_ARGS_DEF) const;
+ inline bool apply (LOOKUP_ARGS_DEF) const;
private:
USHORT format; /* Format identifier. Set to 1. */
}
}
- inline bool substitute (LOOKUP_ARGS_DEF) const {
+ inline bool apply (LOOKUP_ARGS_DEF) const {
switch (u.format) {
- case 1: return u.format1->substitute (LOOKUP_ARGS);
+ case 1: return u.format1->apply (LOOKUP_ARGS);
default:return false;
}
}
friend struct ReverseChainSingleSubst;
private:
- inline bool substitute (LOOKUP_ARGS_DEF) const {
+ inline bool apply (LOOKUP_ARGS_DEF) const {
if (HB_UNLIKELY (context_length != NO_CONTEXT))
return false; /* No chaining to this type */
private:
- inline bool substitute (LOOKUP_ARGS_DEF) const {
+ inline bool apply (LOOKUP_ARGS_DEF) const {
switch (u.format) {
- case 1: return u.format1->substitute (LOOKUP_ARGS);
+ case 1: return u.format1->apply (LOOKUP_ARGS);
default:return false;
}
}
friend struct SubstLookup;
- inline bool substitute (LOOKUP_ARGS_DEF, unsigned int lookup_type) const {
+ inline bool apply (LOOKUP_ARGS_DEF, unsigned int lookup_type) const {
switch (lookup_type) {
- case GSUB_Single: return u.single->substitute (LOOKUP_ARGS);
- case GSUB_Multiple: return u.multiple->substitute (LOOKUP_ARGS);
- case GSUB_Alternate: return u.alternate->substitute (LOOKUP_ARGS);
- case GSUB_Ligature: return u.ligature->substitute (LOOKUP_ARGS);
- case GSUB_Context: return u.context->substitute (LOOKUP_ARGS);
- case GSUB_ChainContext: return u.chainContext->substitute (LOOKUP_ARGS);
- case GSUB_Extension: return u.extension->substitute (LOOKUP_ARGS);
- case GSUB_ReverseChainSingle: return u.reverseChainContextSingle->substitute (LOOKUP_ARGS);
+ case GSUB_Single: return u.single->apply (LOOKUP_ARGS);
+ case GSUB_Multiple: return u.multiple->apply (LOOKUP_ARGS);
+ case GSUB_Alternate: return u.alternate->apply (LOOKUP_ARGS);
+ case GSUB_Ligature: return u.ligature->apply (LOOKUP_ARGS);
+ case GSUB_Context: return u.context->apply (LOOKUP_ARGS);
+ case GSUB_ChainContext: return u.chainContext->apply (LOOKUP_ARGS);
+ case GSUB_Extension: return u.extension->apply (LOOKUP_ARGS);
+ case GSUB_ReverseChainSingle: return u.reverseChainContextSingle->apply (LOOKUP_ARGS);
default:return false;
}
}
}
}
- inline bool substitute_subtables (hb_ot_layout_t *layout,
- hb_buffer_t *buffer,
- unsigned int context_length,
- unsigned int nesting_level_left,
- unsigned int property) const {
+ inline bool apply_subtables (hb_ot_layout_t *layout,
+ hb_buffer_t *buffer,
+ unsigned int context_length,
+ unsigned int nesting_level_left,
+ unsigned int property) const {
unsigned int lookup_type = get_type ();
unsigned int lookup_flag = get_flag ();
for (unsigned int i = 0; i < get_subtable_count (); i++)
- if (get_subtable (i).substitute (LOOKUP_ARGS, lookup_type))
+ if (get_subtable (i).apply (LOOKUP_ARGS, lookup_type))
return true;
return false;
}
- inline bool substitute_once (hb_ot_layout_t *layout, hb_buffer_t *buffer) const {
+ inline bool apply_once (hb_ot_layout_t *layout, hb_buffer_t *buffer) const {
unsigned int lookup_flag = get_flag ();
if (!_hb_ot_layout_check_glyph_property (layout, IN_CURITEM (), lookup_flag, &property))
return false;
- return substitute_subtables (layout, buffer, NO_CONTEXT, MAX_NESTING_LEVEL, property);
+ return apply_subtables (layout, buffer, NO_CONTEXT, MAX_NESTING_LEVEL, property);
}
- bool substitute_string (hb_ot_layout_t *layout,
- hb_buffer_t *buffer,
- hb_ot_layout_feature_mask_t mask) const {
+ bool apply_string (hb_ot_layout_t *layout,
+ hb_buffer_t *buffer,
+ hb_ot_layout_feature_mask_t mask) const {
bool ret = false;
while (buffer->in_pos < buffer->in_length) {
if ((~IN_PROPERTIES (buffer->in_pos) & mask) &&
- substitute_once (layout, buffer))
+ apply_once (layout, buffer))
ret = true;
else
_hb_buffer_next_glyph (buffer);
do {
if ((~IN_PROPERTIES (buffer->in_pos) & mask) &&
- substitute_once (layout, buffer))
+ apply_once (layout, buffer))
ret = true;
else
buffer->in_pos--;
hb_buffer_t *buffer,
unsigned int lookup_index,
hb_ot_layout_feature_mask_t mask) const {
- return get_lookup (lookup_index).substitute_string (layout, buffer, mask);
+ return get_lookup (lookup_index).apply_string (layout, buffer, mask);
}
};
/* Out-of-class implementation for methods recursing */
-inline bool ExtensionSubstFormat1::substitute (LOOKUP_ARGS_DEF) const {
+inline bool ExtensionSubstFormat1::apply (LOOKUP_ARGS_DEF) const {
unsigned int lookup_type = get_type ();
if (HB_UNLIKELY (lookup_type == GSUB_Extension))
return false;
- return ((SubstLookupSubTable&)*(((char *) this) + get_offset ())).substitute (LOOKUP_ARGS, lookup_type);
+ return ((SubstLookupSubTable&)*(((char *) this) + get_offset ())).apply (LOOKUP_ARGS, lookup_type);
}
static inline bool substitute_lookup (LOOKUP_ARGS_DEF, unsigned int lookup_index) {
if (HB_UNLIKELY (context_length < 1))
return false;
- return l.substitute_subtables (layout, buffer, context_length, nesting_level_left, property);
+ return l.apply_subtables (layout, buffer, context_length, nesting_level_left, property);
}