}
}
- inline bool substitute (LOOKUP_ARGS_DEF) const {
-
- unsigned int property;
- if (!_hb_ot_layout_check_glyph_property (layout, IN_CURITEM (), lookup_flag, &property))
- return false;
+ inline bool substitute (LOOKUP_ARGS_DEF, unsigned int property) const {
hb_codepoint_t glyph_id = IN_CURGLYPH ();
private:
- inline bool substitute (LOOKUP_ARGS_DEF) const {
-
- unsigned int property;
- if (!_hb_ot_layout_check_glyph_property (layout, IN_CURITEM (), lookup_flag, &property))
- return false;
+ inline bool substitute (LOOKUP_ARGS_DEF, unsigned int property) const {
unsigned int index = (this+coverage) (IN_CURGLYPH ());
return (this+sequence[index]).substitute_sequence (LOOKUP_ARGS, property);
private:
- inline bool substitute (LOOKUP_ARGS_DEF) const {
+ inline bool substitute (LOOKUP_ARGS_DEF, unsigned int property) const {
switch (u.substFormat) {
- case 1: return u.format1.substitute (LOOKUP_ARGS);
+ case 1: return u.format1.substitute (LOOKUP_ARGS, property);
default:return false;
}
}
private:
- inline bool substitute (LOOKUP_ARGS_DEF) const {
-
- unsigned int property;
- if (!_hb_ot_layout_check_glyph_property (layout, IN_CURITEM (), lookup_flag, &property))
- return false;
+ inline bool substitute (LOOKUP_ARGS_DEF, unsigned int property) const {
hb_codepoint_t glyph_id = IN_CURGLYPH ();
private:
- inline bool substitute (LOOKUP_ARGS_DEF) const {
+ inline bool substitute (LOOKUP_ARGS_DEF, unsigned int property) const {
switch (u.substFormat) {
- case 1: return u.format1.substitute (LOOKUP_ARGS);
+ case 1: return u.format1.substitute (LOOKUP_ARGS, property);
default:return false;
}
}
private:
- inline bool substitute (LOOKUP_ARGS_DEF) const {
-
- unsigned int property;
- if (!_hb_ot_layout_check_glyph_property (layout, IN_CURITEM (), lookup_flag, &property))
- return false;
+ inline bool substitute (LOOKUP_ARGS_DEF, unsigned int property) const {
hb_codepoint_t glyph_id = IN_CURGLYPH ();
private:
- inline bool substitute (LOOKUP_ARGS_DEF) const {
+ inline bool substitute (LOOKUP_ARGS_DEF, unsigned int property) const {
switch (u.substFormat) {
- case 1: return u.format1.substitute (LOOKUP_ARGS);
+ case 1: return u.format1.substitute (LOOKUP_ARGS, property);
default:return false;
}
}
struct ContextSubst : Context {
- inline bool substitute (LOOKUP_ARGS_DEF) const {
+ inline bool substitute (LOOKUP_ARGS_DEF, unsigned int property) const {
return this->apply (LOOKUP_ARGS, substitute_lookup);
}
};
struct ChainContextSubstFormat1 {
/* TODO */
- inline bool substitute (LOOKUP_ARGS_DEF) const {
+ inline bool substitute (LOOKUP_ARGS_DEF, unsigned int property) const {
return false;
}
struct ChainContextSubstFormat2 {
/* TODO */
- inline bool substitute (LOOKUP_ARGS_DEF) const {
+ inline bool substitute (LOOKUP_ARGS_DEF, unsigned int property) const {
return false;
}
struct ChainContextSubstFormat3 {
/* TODO */
- inline bool substitute (LOOKUP_ARGS_DEF) const {
+ inline bool substitute (LOOKUP_ARGS_DEF, unsigned int property) const {
return false;
}
private:
- inline bool substitute (LOOKUP_ARGS_DEF) const {
+ inline bool substitute (LOOKUP_ARGS_DEF, unsigned int property) const {
switch (u.substFormat) {
- case 1: return u.format1.substitute (LOOKUP_ARGS);
- case 2: return u.format2.substitute (LOOKUP_ARGS);
- case 3: return u.format3.substitute (LOOKUP_ARGS);
+ case 1: return u.format1.substitute (LOOKUP_ARGS, property);
+ case 2: return u.format2.substitute (LOOKUP_ARGS, property);
+ case 3: return u.format3.substitute (LOOKUP_ARGS, property);
default:return false;
}
}
private:
inline unsigned int get_type (void) const { return extensionLookupType; }
- inline bool substitute (LOOKUP_ARGS_DEF) const;
+ inline bool substitute (LOOKUP_ARGS_DEF, unsigned int property) const;
private:
USHORT substFormat; /* Format identifier. Set to 1. */
}
}
- inline bool substitute (LOOKUP_ARGS_DEF) const {
+ inline bool substitute (LOOKUP_ARGS_DEF, unsigned int property) const {
switch (u.substFormat) {
- case 1: return u.format1.substitute (LOOKUP_ARGS);
+ case 1: return u.format1.substitute (LOOKUP_ARGS, property);
default:return false;
}
}
inline bool substitute (LOOKUP_ARGS_DEF,
unsigned int lookup_type) const {
+
+ unsigned int property;
+ if (!_hb_ot_layout_check_glyph_property (layout, IN_CURITEM (), lookup_flag, &property))
+ return false;
+
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_Single: return u.single.substitute (LOOKUP_ARGS, property);
+ case GSUB_Multiple: return u.multiple.substitute (LOOKUP_ARGS, property);
+ case GSUB_Alternate: return u.alternate.substitute (LOOKUP_ARGS, property);
+ case GSUB_Ligature: return u.ligature.substitute (LOOKUP_ARGS, property);
+ case GSUB_Context: return u.context.substitute (LOOKUP_ARGS, property);
/*
- case GSUB_ChainingContext: return u.chainingContext.substitute (LOOKUP_ARGS);
+ case GSUB_ChainingContext: return u.chainingContext.substitute (LOOKUP_ARGS, property);
*/
- case GSUB_Extension: return u.extension.substitute (LOOKUP_ARGS);
+ case GSUB_Extension: return u.extension.substitute (LOOKUP_ARGS, property);
/*
- case GSUB_ReverseChainingContextSingle: return u.reverseChainingContextSingle.substitute (LOOKUP_ARGS);
+ case GSUB_ReverseChainingContextSingle: return u.reverseChainingContextSingle.substitute (LOOKUP_ARGS, property);
*/
default:return false;
}
/* Out-of-class implementation for methods chaining */
-inline bool ExtensionSubstFormat1::substitute (LOOKUP_ARGS_DEF) const {
+inline bool ExtensionSubstFormat1::substitute (LOOKUP_ARGS_DEF, unsigned int property) const {
/* XXX either check in sanitize or here that the lookuptype is not 7 again,
* or we can loop indefinitely. */
return (*(SubstLookupSubTable *)(((char *) this) + extensionOffset)).substitute (LOOKUP_ARGS,