2 * Copyright (C) 2007,2008,2009 Red Hat, Inc.
4 * This is part of HarfBuzz, a text shaping library.
6 * Permission is hereby granted, without written agreement and without
7 * license or royalty fees, to use, copy, modify, and distribute this
8 * software and its documentation for any purpose, provided that the
9 * above copyright notice and the following two paragraphs appear in
10 * all copies of this software.
12 * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
13 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
14 * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
15 * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
18 * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
19 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
20 * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
21 * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
22 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
24 * Red Hat Author(s): Behdad Esfahbod
27 #ifndef HB_OT_LAYOUT_GSUB_PRIVATE_HH
28 #define HB_OT_LAYOUT_GSUB_PRIVATE_HH
30 #include "hb-ot-layout-gsubgpos-private.hh"
33 struct SingleSubstFormat1
35 friend struct SingleSubst;
39 inline bool apply (APPLY_ARG_DEF) const
42 hb_codepoint_t glyph_id = IN_CURGLYPH ();
43 unsigned int index = (this+coverage) (glyph_id);
44 if (HB_LIKELY (index == NOT_COVERED))
47 glyph_id += deltaGlyphID;
48 _hb_buffer_replace_glyph (buffer, glyph_id);
50 /* We inherit the old glyph class to the substituted glyph */
51 if (_hb_ot_layout_has_new_glyph_classes (context->face))
52 _hb_ot_layout_set_glyph_property (context->face, glyph_id, property);
57 inline bool sanitize (SANITIZE_ARG_DEF) {
59 return SANITIZE_THIS (coverage) && SANITIZE (deltaGlyphID);
63 USHORT format; /* Format identifier--format = 1 */
65 coverage; /* Offset to Coverage table--from
66 * beginning of Substitution table */
67 SHORT deltaGlyphID; /* Add to original GlyphID to get
68 * substitute GlyphID */
70 ASSERT_SIZE (SingleSubstFormat1, 6);
72 struct SingleSubstFormat2
74 friend struct SingleSubst;
78 inline bool apply (APPLY_ARG_DEF) const
81 hb_codepoint_t glyph_id = IN_CURGLYPH ();
82 unsigned int index = (this+coverage) (glyph_id);
83 if (HB_LIKELY (index == NOT_COVERED))
86 if (HB_UNLIKELY (index >= substitute.len))
89 glyph_id = substitute[index];
90 _hb_buffer_replace_glyph (buffer, glyph_id);
92 /* We inherit the old glyph class to the substituted glyph */
93 if (_hb_ot_layout_has_new_glyph_classes (context->face))
94 _hb_ot_layout_set_glyph_property (context->face, glyph_id, property);
99 inline bool sanitize (SANITIZE_ARG_DEF) {
101 return SANITIZE_THIS (coverage) && SANITIZE (substitute);
105 USHORT format; /* Format identifier--format = 2 */
107 coverage; /* Offset to Coverage table--from
108 * beginning of Substitution table */
110 substitute; /* Array of substitute
111 * GlyphIDs--ordered by Coverage Index */
113 ASSERT_SIZE (SingleSubstFormat2, 6);
117 friend struct SubstLookupSubTable;
121 inline bool apply (APPLY_ARG_DEF) const
125 case 1: return u.format1->apply (APPLY_ARG);
126 case 2: return u.format2->apply (APPLY_ARG);
127 default:return false;
131 inline bool sanitize (SANITIZE_ARG_DEF) {
133 if (!SANITIZE (u.format)) return false;
135 case 1: return u.format1->sanitize (SANITIZE_ARG);
136 case 2: return u.format2->sanitize (SANITIZE_ARG);
143 USHORT format; /* Format identifier */
144 SingleSubstFormat1 format1[VAR];
145 SingleSubstFormat2 format2[VAR];
152 friend struct MultipleSubstFormat1;
155 inline bool apply (APPLY_ARG_DEF) const
158 if (HB_UNLIKELY (!substitute.len))
161 _hb_buffer_add_output_glyphs_be16 (buffer, 1,
162 substitute.len, (const uint16_t *) substitute.array(),
165 /* This is a guess only ... */
166 if (_hb_ot_layout_has_new_glyph_classes (context->face))
168 if (property == HB_OT_LAYOUT_GLYPH_CLASS_LIGATURE)
169 property = HB_OT_LAYOUT_GLYPH_CLASS_BASE_GLYPH;
171 unsigned int count = substitute.len;
172 for (unsigned int n = 0; n < count; n++)
173 _hb_ot_layout_set_glyph_property (context->face, substitute[n], property);
180 inline bool sanitize (SANITIZE_ARG_DEF) {
182 return SANITIZE (substitute);
187 substitute; /* String of GlyphIDs to substitute */
189 ASSERT_SIZE (Sequence, 2);
191 struct MultipleSubstFormat1
193 friend struct MultipleSubst;
197 inline bool apply (APPLY_ARG_DEF) const
201 unsigned int index = (this+coverage) (IN_CURGLYPH ());
202 if (HB_LIKELY (index == NOT_COVERED))
205 return (this+sequence[index]).apply (APPLY_ARG);
208 inline bool sanitize (SANITIZE_ARG_DEF) {
210 return SANITIZE_THIS2 (coverage, sequence);
214 USHORT format; /* Format identifier--format = 1 */
216 coverage; /* Offset to Coverage table--from
217 * beginning of Substitution table */
218 OffsetArrayOf<Sequence>
219 sequence; /* Array of Sequence tables
220 * ordered by Coverage Index */
222 ASSERT_SIZE (MultipleSubstFormat1, 6);
226 friend struct SubstLookupSubTable;
230 inline bool apply (APPLY_ARG_DEF) const
234 case 1: return u.format1->apply (APPLY_ARG);
235 default:return false;
239 inline bool sanitize (SANITIZE_ARG_DEF) {
241 if (!SANITIZE (u.format)) return false;
243 case 1: return u.format1->sanitize (SANITIZE_ARG);
250 USHORT format; /* Format identifier */
251 MultipleSubstFormat1 format1[VAR];
256 typedef ArrayOf<GlyphID> AlternateSet; /* Array of alternate GlyphIDs--in
258 ASSERT_SIZE (AlternateSet, 2);
260 struct AlternateSubstFormat1
262 friend struct AlternateSubst;
266 inline bool apply (APPLY_ARG_DEF) const
269 hb_codepoint_t glyph_id = IN_CURGLYPH ();
271 unsigned int index = (this+coverage) (glyph_id);
272 if (HB_LIKELY (index == NOT_COVERED))
275 const AlternateSet &alt_set = this+alternateSet[index];
277 if (HB_UNLIKELY (!alt_set.len))
280 unsigned int alt_index = 0;
282 /* XXX callback to user to choose alternate
283 if (context->face->altfunc)
284 alt_index = (context->face->altfunc)(context->layout, buffer,
285 buffer->out_pos, glyph_id,
286 alt_set.len, alt_set.array);
289 if (HB_UNLIKELY (alt_index >= alt_set.len))
292 glyph_id = alt_set[alt_index];
294 _hb_buffer_replace_glyph (buffer, glyph_id);
296 /* We inherit the old glyph class to the substituted glyph */
297 if (_hb_ot_layout_has_new_glyph_classes (context->face))
298 _hb_ot_layout_set_glyph_property (context->face, glyph_id, property);
303 inline bool sanitize (SANITIZE_ARG_DEF) {
305 return SANITIZE_THIS2 (coverage, alternateSet);
309 USHORT format; /* Format identifier--format = 1 */
311 coverage; /* Offset to Coverage table--from
312 * beginning of Substitution table */
313 OffsetArrayOf<AlternateSet>
314 alternateSet; /* Array of AlternateSet tables
315 * ordered by Coverage Index */
317 ASSERT_SIZE (AlternateSubstFormat1, 6);
319 struct AlternateSubst
321 friend struct SubstLookupSubTable;
325 inline bool apply (APPLY_ARG_DEF) const
329 case 1: return u.format1->apply (APPLY_ARG);
330 default:return false;
334 inline bool sanitize (SANITIZE_ARG_DEF) {
336 if (!SANITIZE (u.format)) return false;
338 case 1: return u.format1->sanitize (SANITIZE_ARG);
345 USHORT format; /* Format identifier */
346 AlternateSubstFormat1 format1[VAR];
353 friend struct LigatureSet;
356 inline bool apply (APPLY_ARG_DEF, bool is_mark) const
360 unsigned int count = component.len;
361 unsigned int end = MIN (buffer->in_length, buffer->in_pos + context_length);
362 if (HB_UNLIKELY (buffer->in_pos + count > end))
365 for (i = 1, j = buffer->in_pos + 1; i < count; i++, j++)
367 while (_hb_ot_layout_skip_mark (context->face, IN_INFO (j), lookup_flag, &property))
369 if (HB_UNLIKELY (j + count - i == end))
374 if (!(property & HB_OT_LAYOUT_GLYPH_CLASS_MARK))
377 if (HB_LIKELY (IN_GLYPH (j) != component[i]))
380 /* This is just a guess ... */
381 if (_hb_ot_layout_has_new_glyph_classes (context->face))
382 _hb_ot_layout_set_glyph_class (context->face, ligGlyph,
383 is_mark ? HB_OT_LAYOUT_GLYPH_CLASS_MARK
384 : HB_OT_LAYOUT_GLYPH_CLASS_LIGATURE);
386 if (j == buffer->in_pos + i) /* No input glyphs skipped */
387 /* We don't use a new ligature ID if there are no skipped
388 glyphs and the ligature already has an ID. */
389 _hb_buffer_add_output_glyphs_be16 (buffer, i,
390 1, (const uint16_t *) &ligGlyph,
392 IN_LIGID (buffer->in_pos) && !IN_COMPONENT (buffer->in_pos) ?
393 0xFFFF : _hb_buffer_allocate_lig_id (buffer));
396 unsigned int lig_id = _hb_buffer_allocate_lig_id (buffer);
397 _hb_buffer_add_output_glyph (buffer, ligGlyph, 0xFFFF, lig_id);
399 /* Now we must do a second loop to copy the skipped glyphs to
400 `out' and assign component values to it. We start with the
401 glyph after the first component. Glyphs between component
402 i and i+1 belong to component i. Together with the lig_id
403 value it is later possible to check whether a specific
404 component value really belongs to a given ligature. */
406 for ( i = 1; i < count; i++ )
408 while (_hb_ot_layout_skip_mark (context->face, IN_CURINFO (), lookup_flag, NULL))
409 _hb_buffer_add_output_glyph (buffer, IN_CURGLYPH (), i, lig_id);
419 inline bool sanitize (SANITIZE_ARG_DEF) {
421 return SANITIZE2 (ligGlyph, component);
425 GlyphID ligGlyph; /* GlyphID of ligature to substitute */
426 HeadlessArrayOf<GlyphID>
427 component; /* Array of component GlyphIDs--start
428 * with the second component--ordered
429 * in writing direction */
431 ASSERT_SIZE (Ligature, 4);
435 friend struct LigatureSubstFormat1;
438 inline bool apply (APPLY_ARG_DEF, bool is_mark) const
441 unsigned int num_ligs = ligature.len;
442 for (unsigned int i = 0; i < num_ligs; i++)
444 const Ligature &lig = this+ligature[i];
445 if (lig.apply (APPLY_ARG, is_mark))
453 inline bool sanitize (SANITIZE_ARG_DEF) {
455 return SANITIZE_THIS (ligature);
459 OffsetArrayOf<Ligature>
460 ligature; /* Array LigatureSet tables
461 * ordered by preference */
463 ASSERT_SIZE (LigatureSet, 2);
465 struct LigatureSubstFormat1
467 friend struct LigatureSubst;
470 inline bool apply (APPLY_ARG_DEF) const
473 hb_codepoint_t glyph_id = IN_CURGLYPH ();
475 bool first_is_mark = !!(property & HB_OT_LAYOUT_GLYPH_CLASS_MARK);
477 unsigned int index = (this+coverage) (glyph_id);
478 if (HB_LIKELY (index == NOT_COVERED))
481 const LigatureSet &lig_set = this+ligatureSet[index];
482 return lig_set.apply (APPLY_ARG, first_is_mark);
485 inline bool sanitize (SANITIZE_ARG_DEF) {
487 return SANITIZE_THIS2 (coverage, ligatureSet);
491 USHORT format; /* Format identifier--format = 1 */
493 coverage; /* Offset to Coverage table--from
494 * beginning of Substitution table */
495 OffsetArrayOf<LigatureSet>
496 ligatureSet; /* Array LigatureSet tables
497 * ordered by Coverage Index */
499 ASSERT_SIZE (LigatureSubstFormat1, 6);
503 friend struct SubstLookupSubTable;
506 inline bool apply (APPLY_ARG_DEF) const
510 case 1: return u.format1->apply (APPLY_ARG);
511 default:return false;
515 inline bool sanitize (SANITIZE_ARG_DEF) {
517 if (!SANITIZE (u.format)) return false;
519 case 1: return u.format1->sanitize (SANITIZE_ARG);
526 USHORT format; /* Format identifier */
527 LigatureSubstFormat1 format1[VAR];
533 static inline bool substitute_lookup (APPLY_ARG_DEF, unsigned int lookup_index);
535 struct ContextSubst : Context
537 friend struct SubstLookupSubTable;
540 inline bool apply (APPLY_ARG_DEF) const
543 return Context::apply (APPLY_ARG, substitute_lookup);
547 struct ChainContextSubst : ChainContext
549 friend struct SubstLookupSubTable;
552 inline bool apply (APPLY_ARG_DEF) const
555 return ChainContext::apply (APPLY_ARG, substitute_lookup);
560 struct ExtensionSubst : Extension
562 friend struct SubstLookupSubTable;
563 friend struct SubstLookup;
566 inline const struct SubstLookupSubTable& get_subtable (void) const
568 unsigned int offset = get_offset ();
569 if (HB_UNLIKELY (!offset)) return Null(SubstLookupSubTable);
570 return StructAtOffset<SubstLookupSubTable> (*this, offset);
573 inline bool apply (APPLY_ARG_DEF) const;
575 inline bool sanitize (SANITIZE_ARG_DEF);
577 inline bool is_reverse (void) const;
581 struct ReverseChainSingleSubstFormat1
583 friend struct ReverseChainSingleSubst;
586 inline bool apply (APPLY_ARG_DEF) const
589 if (HB_UNLIKELY (context_length != NO_CONTEXT))
590 return false; /* No chaining to this type */
592 unsigned int index = (this+coverage) (IN_CURGLYPH ());
593 if (HB_LIKELY (index == NOT_COVERED))
596 const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage> > (backtrack);
597 const ArrayOf<GlyphID> &substitute = StructAfter<ArrayOf<GlyphID> > (lookahead);
599 if (match_backtrack (APPLY_ARG,
600 backtrack.len, (USHORT *) backtrack.array(),
601 match_coverage, CharP(this)) &&
602 match_lookahead (APPLY_ARG,
603 lookahead.len, (USHORT *) lookahead.array(),
604 match_coverage, CharP(this),
607 IN_CURGLYPH () = substitute[index];
608 buffer->in_pos--; /* Reverse! */
615 inline bool sanitize (SANITIZE_ARG_DEF) {
617 if (!SANITIZE_THIS2 (coverage, backtrack))
619 OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage> > (backtrack);
620 if (!SANITIZE_THIS (lookahead))
622 ArrayOf<GlyphID> &substitute = StructAfter<ArrayOf<GlyphID> > (lookahead);
623 return SANITIZE (substitute);
627 USHORT format; /* Format identifier--format = 1 */
629 coverage; /* Offset to Coverage table--from
630 * beginning of table */
631 OffsetArrayOf<Coverage>
632 backtrack; /* Array of coverage tables
633 * in backtracking sequence, in glyph
635 OffsetArrayOf<Coverage>
636 lookaheadX; /* Array of coverage tables
637 * in lookahead sequence, in glyph
640 substituteX; /* Array of substitute
641 * GlyphIDs--ordered by Coverage Index */
643 ASSERT_SIZE (ReverseChainSingleSubstFormat1, 10);
645 struct ReverseChainSingleSubst
647 friend struct SubstLookupSubTable;
650 inline bool apply (APPLY_ARG_DEF) const
654 case 1: return u.format1->apply (APPLY_ARG);
655 default:return false;
659 inline bool sanitize (SANITIZE_ARG_DEF) {
661 if (!SANITIZE (u.format)) return false;
663 case 1: return u.format1->sanitize (SANITIZE_ARG);
670 USHORT format; /* Format identifier */
671 ReverseChainSingleSubstFormat1 format1[VAR];
681 struct SubstLookupSubTable
683 friend struct SubstLookup;
693 ReverseChainSingle = 8
696 inline bool apply (APPLY_ARG_DEF, unsigned int lookup_type) const
699 switch (lookup_type) {
700 case Single: return u.single->apply (APPLY_ARG);
701 case Multiple: return u.multiple->apply (APPLY_ARG);
702 case Alternate: return u.alternate->apply (APPLY_ARG);
703 case Ligature: return u.ligature->apply (APPLY_ARG);
704 case Context: return u.context->apply (APPLY_ARG);
705 case ChainContext: return u.chainContext->apply (APPLY_ARG);
706 case Extension: return u.extension->apply (APPLY_ARG);
707 case ReverseChainSingle: return u.reverseChainContextSingle->apply (APPLY_ARG);
708 default:return false;
712 inline bool sanitize (SANITIZE_ARG_DEF) {
714 if (!SANITIZE (u.format)) return false;
716 case Single: return u.single->sanitize (SANITIZE_ARG);
717 case Multiple: return u.multiple->sanitize (SANITIZE_ARG);
718 case Alternate: return u.alternate->sanitize (SANITIZE_ARG);
719 case Ligature: return u.ligature->sanitize (SANITIZE_ARG);
720 case Context: return u.context->sanitize (SANITIZE_ARG);
721 case ChainContext: return u.chainContext->sanitize (SANITIZE_ARG);
722 case Extension: return u.extension->sanitize (SANITIZE_ARG);
723 case ReverseChainSingle: return u.reverseChainContextSingle->sanitize (SANITIZE_ARG);
731 SingleSubst single[VAR];
732 MultipleSubst multiple[VAR];
733 AlternateSubst alternate[VAR];
734 LigatureSubst ligature[VAR];
735 ContextSubst context[VAR];
736 ChainContextSubst chainContext[VAR];
737 ExtensionSubst extension[VAR];
738 ReverseChainSingleSubst reverseChainContextSingle[VAR];
743 struct SubstLookup : Lookup
745 inline const SubstLookupSubTable& get_subtable (unsigned int i) const
746 { return this+CastR<OffsetArrayOf<SubstLookupSubTable> > (subTable)[i]; }
748 inline static bool lookup_type_is_reverse (unsigned int lookup_type)
749 { return lookup_type == SubstLookupSubTable::ReverseChainSingle; }
751 inline bool is_reverse (void) const
753 unsigned int type = get_type ();
754 if (HB_UNLIKELY (type == SubstLookupSubTable::Extension))
755 return CastR<ExtensionSubst> (get_subtable(0)).is_reverse ();
756 return lookup_type_is_reverse (type);
760 inline bool apply_once (hb_ot_layout_context_t *context,
762 unsigned int context_length,
763 unsigned int nesting_level_left) const
765 unsigned int lookup_type = get_type ();
766 unsigned int lookup_flag = get_flag ();
767 unsigned int property;
769 if (!_hb_ot_layout_check_glyph_property (context->face, IN_CURINFO (), lookup_flag, &property))
772 if (HB_UNLIKELY (lookup_type == SubstLookupSubTable::Extension))
774 /* The spec says all subtables should have the same type.
775 * This is specially important if one has a reverse type!
777 * This is rather slow to do this here for every glyph,
778 * but it's easiest, and who uses extension lookups anyway?!*/
779 unsigned int count = get_subtable_count ();
780 unsigned int type = get_subtable(0).u.extension->get_type ();
781 for (unsigned int i = 1; i < count; i++)
782 if (get_subtable(i).u.extension->get_type () != type)
786 unsigned int count = get_subtable_count ();
787 for (unsigned int i = 0; i < count; i++)
788 if (get_subtable (i).apply (APPLY_ARG_INIT, lookup_type))
794 inline bool apply_string (hb_ot_layout_context_t *context,
796 hb_mask_t mask) const
800 if (HB_UNLIKELY (!buffer->in_length))
803 if (HB_LIKELY (!is_reverse ()))
805 /* in/out forward substitution */
806 _hb_buffer_clear_output (buffer);
808 while (buffer->in_pos < buffer->in_length)
810 if ((~IN_MASK (buffer->in_pos) & mask) &&
811 apply_once (context, buffer, NO_CONTEXT, MAX_NESTING_LEVEL))
814 _hb_buffer_next_glyph (buffer);
818 _hb_buffer_swap (buffer);
822 /* in-place backward substitution */
823 buffer->in_pos = buffer->in_length - 1;
826 if ((~IN_MASK (buffer->in_pos) & mask) &&
827 apply_once (context, buffer, NO_CONTEXT, MAX_NESTING_LEVEL))
833 while ((int) buffer->in_pos >= 0);
839 inline bool sanitize (SANITIZE_ARG_DEF) {
841 if (HB_UNLIKELY (!Lookup::sanitize (SANITIZE_ARG))) return false;
842 OffsetArrayOf<SubstLookupSubTable> &list = CastR<OffsetArrayOf<SubstLookupSubTable> > (subTable);
843 return SANITIZE_THIS (list);
847 typedef OffsetListOf<SubstLookup> SubstLookupList;
848 ASSERT_SIZE (SubstLookupList, 2);
854 struct GSUB : GSUBGPOS
856 static const hb_tag_t Tag = HB_OT_TAG_GSUB;
858 inline const SubstLookup& get_lookup (unsigned int i) const
859 { return CastR<SubstLookup> (GSUBGPOS::get_lookup (i)); }
861 inline bool substitute_lookup (hb_ot_layout_context_t *context,
863 unsigned int lookup_index,
864 hb_mask_t mask) const
865 { return get_lookup (lookup_index).apply_string (context, buffer, mask); }
868 inline bool sanitize (SANITIZE_ARG_DEF) {
870 if (HB_UNLIKELY (!GSUBGPOS::sanitize (SANITIZE_ARG))) return false;
871 OffsetTo<SubstLookupList> &list = CastR<OffsetTo<SubstLookupList> > (lookupList);
872 return SANITIZE_THIS (list);
875 ASSERT_SIZE (GSUB, 10);
878 /* Out-of-class implementation for methods recursing */
880 inline bool ExtensionSubst::apply (APPLY_ARG_DEF) const
883 return get_subtable ().apply (APPLY_ARG, get_type ());
886 inline bool ExtensionSubst::sanitize (SANITIZE_ARG_DEF)
889 if (HB_UNLIKELY (!Extension::sanitize (SANITIZE_ARG))) return false;
890 unsigned int offset = get_offset ();
891 if (HB_UNLIKELY (!offset)) return true;
892 return SANITIZE (StructAtOffset<SubstLookupSubTable> (*this, offset));
895 inline bool ExtensionSubst::is_reverse (void) const
897 unsigned int type = get_type ();
898 if (HB_UNLIKELY (type == SubstLookupSubTable::Extension))
899 return CastR<ExtensionSubst> (get_subtable()).is_reverse ();
900 return SubstLookup::lookup_type_is_reverse (type);
903 static inline bool substitute_lookup (APPLY_ARG_DEF, unsigned int lookup_index)
905 const GSUB &gsub = *(context->face->ot_layout.gsub);
906 const SubstLookup &l = gsub.get_lookup (lookup_index);
908 if (HB_UNLIKELY (nesting_level_left == 0))
910 nesting_level_left--;
912 if (HB_UNLIKELY (context_length < 1))
915 return l.apply_once (context, buffer, context_length, nesting_level_left);
919 #endif /* HB_OT_LAYOUT_GSUB_PRIVATE_HH */