inline bool substitute (SUBTABLE_SUBSTITUTE_ARGS_DEF) const {
- if (HB_UNLIKELY (context_length < 1))
- return false;
-
unsigned int property;
if (!_hb_ot_layout_check_glyph_property (layout, IN_CURITEM (), lookup_flag, &property))
return false;
inline bool substitute (SUBTABLE_SUBSTITUTE_ARGS_DEF) const {
- if (HB_UNLIKELY (context_length < 1))
- return false;
-
unsigned int property;
if (!_hb_ot_layout_check_glyph_property (layout, IN_CURITEM (), lookup_flag, &property))
return false;
inline bool substitute (SUBTABLE_SUBSTITUTE_ARGS_DEF) const {
- if (HB_UNLIKELY (context_length < 1))
- return false;
-
unsigned int property;
if (!_hb_ot_layout_check_glyph_property (layout, IN_CURITEM (), lookup_flag, &property))
return false;
struct ChainContextSubstFormat1 {
/* TODO */
+ inline bool substitute (SUBTABLE_SUBSTITUTE_ARGS_DEF) const {
+ return false;
+ }
private:
USHORT substFormat; /* Format identifier--format = 1 */
* backtrack sequence (number of
* glyphs to be matched before the
* first glyph) */
- USHORT backtrack[]; /* Array of backtracking classes(to be
+ USHORT backtrack[]; /* Array of backtracking classes (to be
* matched before the input sequence) */
USHORT inputGlyphCount; /* Total number of classes in the input
* sequence (includes the first class) */
* look ahead sequence (number of
* classes to be matched after the
* input sequence) */
- USHORT lookAhead[]; /* Array of lookahead classes(to be
+ USHORT lookAhead[]; /* Array of lookahead classes (to be
* matched after the input sequence) */
USHORT substCount; /* Number of SubstLookupRecords */
SubstLookupRecord substLookupRecord[];/* Array of SubstLookupRecords--in
struct ChainContextSubstFormat2 {
/* TODO */
+ inline bool substitute (SUBTABLE_SUBSTITUTE_ARGS_DEF) const {
+ return false;
+ }
private:
USHORT substFormat; /* Format identifier--format = 2 */
struct ChainContextSubstFormat3 {
/* TODO */
+ inline bool substitute (SUBTABLE_SUBSTITUTE_ARGS_DEF) const {
+ return false;
+ }
private:
USHORT substFormat; /* Format identifier--format = 3 */
};
ASSERT_SIZE (ChainContextSubstFormat3, 10);
+struct ChainContextSubst {
+
+ friend struct SubstLookupSubTable;
+
+ private:
+
+ inline bool substitute (SUBTABLE_SUBSTITUTE_ARGS_DEF) const {
+ switch (u.substFormat) {
+ case 1: return u.format1.substitute (SUBTABLE_SUBSTITUTE_ARGS);
+ case 2: return u.format2.substitute (SUBTABLE_SUBSTITUTE_ARGS);
+ case 3: return u.format3.substitute (SUBTABLE_SUBSTITUTE_ARGS);
+ default:return false;
+ }
+ }
+
+ private:
+ union {
+ USHORT substFormat; /* Format identifier */
+ ChainContextSubstFormat1 format1;
+ ChainContextSubstFormat2 format2;
+ ChainContextSubstFormat3 format3;
+ } u;
+};
+DEFINE_NULL (ChainContextSubst, 2);
+
struct ExtensionSubstFormat1 {
return false;
nesting_level_left--;
+ if (HB_UNLIKELY (context_length < 1))
+ return false;
+
for (unsigned int i = 0; i < get_subtable_count (); i++)
if (get_subtable (i).substitute (SUBTABLE_SUBSTITUTE_ARGS,
lookup_type))