2 * Copyright © 2011,2012 Google, 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 * Google Author(s): Behdad Esfahbod
27 #include "hb-ot-shape-complex-khmer-private.hh"
28 #include "hb-ot-layout-private.hh"
35 struct feature_list_t {
37 hb_ot_map_feature_flags_t flags;
40 static const feature_list_t
45 * These features are applied in order, one at a time, after initial_reordering.
47 {HB_TAG('p','r','e','f'), F_NONE},
48 {HB_TAG('b','l','w','f'), F_NONE},
49 {HB_TAG('a','b','v','f'), F_NONE},
50 {HB_TAG('p','s','t','f'), F_NONE},
51 {HB_TAG('c','f','a','r'), F_NONE},
54 * These features are applied all at once, after final_reordering.
55 * Default Bengali font in Windows for example has intermixed
56 * lookups for init,pres,abvs,blws features.
58 {HB_TAG('p','r','e','s'), F_GLOBAL},
59 {HB_TAG('a','b','v','s'), F_GLOBAL},
60 {HB_TAG('b','l','w','s'), F_GLOBAL},
61 {HB_TAG('p','s','t','s'), F_GLOBAL},
62 /* Positioning features, though we don't care about the types. */
63 {HB_TAG('d','i','s','t'), F_GLOBAL},
64 {HB_TAG('a','b','v','m'), F_GLOBAL},
65 {HB_TAG('b','l','w','m'), F_GLOBAL},
69 * Must be in the same order as the khmer_features array.
87 KHMER_BASIC_FEATURES = _PRES /* Don't forget to update this! */
91 setup_syllables (const hb_ot_shape_plan_t *plan,
95 initial_reordering (const hb_ot_shape_plan_t *plan,
99 final_reordering (const hb_ot_shape_plan_t *plan,
101 hb_buffer_t *buffer);
103 clear_syllables (const hb_ot_shape_plan_t *plan,
105 hb_buffer_t *buffer);
108 collect_features_khmer (hb_ot_shape_planner_t *plan)
110 hb_ot_map_builder_t *map = &plan->map;
112 /* Do this before any lookups have been applied. */
113 map->add_gsub_pause (setup_syllables);
115 map->add_global_bool_feature (HB_TAG('l','o','c','l'));
116 /* The Indic specs do not require ccmp, but we apply it here since if
117 * there is a use of it, it's typically at the beginning. */
118 map->add_global_bool_feature (HB_TAG('c','c','m','p'));
122 map->add_gsub_pause (initial_reordering);
123 for (; i < KHMER_BASIC_FEATURES; i++) {
124 map->add_feature (khmer_features[i].tag, 1, khmer_features[i].flags | F_MANUAL_ZWJ | F_MANUAL_ZWNJ);
125 map->add_gsub_pause (nullptr);
127 map->add_gsub_pause (final_reordering);
128 for (; i < KHMER_NUM_FEATURES; i++) {
129 map->add_feature (khmer_features[i].tag, 1, khmer_features[i].flags | F_MANUAL_ZWJ | F_MANUAL_ZWNJ);
132 map->add_global_bool_feature (HB_TAG('c','a','l','t'));
133 map->add_global_bool_feature (HB_TAG('c','l','i','g'));
135 map->add_gsub_pause (clear_syllables);
139 override_features_khmer (hb_ot_shape_planner_t *plan)
141 /* Uniscribe does not apply 'kern' in Khmer. */
142 if (hb_options ().uniscribe_bug_compatible)
144 plan->map.add_feature (HB_TAG('k','e','r','n'), 0, F_GLOBAL);
147 plan->map.add_feature (HB_TAG('l','i','g','a'), 0, F_GLOBAL);
151 struct would_substitute_feature_t
153 inline void init (const hb_ot_map_t *map, hb_tag_t feature_tag, bool zero_context_)
155 zero_context = zero_context_;
156 map->get_stage_lookups (0/*GSUB*/,
157 map->get_feature_stage (0/*GSUB*/, feature_tag),
161 inline bool would_substitute (const hb_codepoint_t *glyphs,
162 unsigned int glyphs_count,
163 hb_face_t *face) const
165 for (unsigned int i = 0; i < count; i++)
166 if (hb_ot_layout_lookup_would_substitute_fast (face, lookups[i].index, glyphs, glyphs_count, zero_context))
172 const hb_ot_map_t::lookup_map_t *lookups;
177 struct khmer_shape_plan_t
181 inline bool get_virama_glyph (hb_font_t *font, hb_codepoint_t *pglyph) const
183 hb_codepoint_t glyph = virama_glyph;
184 if (unlikely (virama_glyph == (hb_codepoint_t) -1))
186 if (!font->get_nominal_glyph (0x17D2u, &glyph))
188 /* Technically speaking, the spec says we should apply 'locl' to virama too.
189 * Maybe one day... */
191 /* Our get_nominal_glyph() function needs a font, so we can't get the virama glyph
192 * during shape planning... Instead, overwrite it here. It's safe. Don't worry! */
193 virama_glyph = glyph;
200 mutable hb_codepoint_t virama_glyph;
202 would_substitute_feature_t pref;
204 hb_mask_t mask_array[KHMER_NUM_FEATURES];
208 data_create_khmer (const hb_ot_shape_plan_t *plan)
210 khmer_shape_plan_t *khmer_plan = (khmer_shape_plan_t *) calloc (1, sizeof (khmer_shape_plan_t));
211 if (unlikely (!khmer_plan))
214 khmer_plan->virama_glyph = (hb_codepoint_t) -1;
216 khmer_plan->pref.init (&plan->map, HB_TAG('p','r','e','f'), true);
218 for (unsigned int i = 0; i < ARRAY_LENGTH (khmer_plan->mask_array); i++)
219 khmer_plan->mask_array[i] = (khmer_features[i].flags & F_GLOBAL) ?
220 0 : plan->map.get_1_mask (khmer_features[i].tag);
226 data_destroy_khmer (void *data)
232 enum syllable_type_t {
238 #include "hb-ot-shape-complex-khmer-machine.hh"
241 setup_masks_khmer (const hb_ot_shape_plan_t *plan HB_UNUSED,
243 hb_font_t *font HB_UNUSED)
245 HB_BUFFER_ALLOCATE_VAR (buffer, khmer_category);
246 HB_BUFFER_ALLOCATE_VAR (buffer, khmer_position);
248 /* We cannot setup masks here. We save information about characters
249 * and setup masks later on in a pause-callback. */
251 unsigned int count = buffer->len;
252 hb_glyph_info_t *info = buffer->info;
253 for (unsigned int i = 0; i < count; i++)
254 set_khmer_properties (info[i]);
258 setup_syllables (const hb_ot_shape_plan_t *plan HB_UNUSED,
259 hb_font_t *font HB_UNUSED,
262 find_syllables (buffer);
263 foreach_syllable (buffer, start, end)
264 buffer->unsafe_to_break (start, end);
268 compare_khmer_order (const hb_glyph_info_t *pa, const hb_glyph_info_t *pb)
270 int a = pa->khmer_position();
271 int b = pb->khmer_position();
273 return a < b ? -1 : a == b ? 0 : +1;
278 * https://docs.microsoft.com/en-us/typography/script-development/devanagari */
281 initial_reordering_consonant_syllable (const hb_ot_shape_plan_t *plan,
284 unsigned int start, unsigned int end)
286 const khmer_shape_plan_t *khmer_plan = (const khmer_shape_plan_t *) plan->data;
287 hb_glyph_info_t *info = buffer->info;
289 /* 1. Khmer shaping assumes that a syllable will begin with a Cons, IndV, or Number. */
291 /* The first consonant is always the base. */
292 unsigned int base = start;
293 info[base].khmer_position() = POS_BASE_C;
295 /* Mark all subsequent consonants as below. */
296 for (unsigned int i = base + 1; i < end; i++)
297 if (is_consonant_or_vowel (info[i]))
298 info[i].khmer_position() = POS_BELOW_C;
300 /* Mark final consonants. A final consonant is one appearing after a matra,
302 for (unsigned int i = base + 1; i < end; i++)
303 if (info[i].khmer_category() == OT_M) {
304 for (unsigned int j = i + 1; j < end; j++)
305 if (is_consonant_or_vowel (info[j])) {
306 info[j].khmer_position() = POS_FINAL_C;
312 /* Attach misc marks to previous char to move with them. */
314 khmer_position_t last_pos = POS_START;
315 for (unsigned int i = start; i < end; i++)
317 if ((FLAG_UNSAFE (info[i].khmer_category()) & (JOINER_FLAGS | FLAG (OT_N) | FLAG (OT_RS) | MEDIAL_FLAGS | FLAG (OT_Coeng))))
319 info[i].khmer_position() = last_pos;
320 if (unlikely (info[i].khmer_category() == OT_Coeng &&
321 info[i].khmer_position() == POS_PRE_M))
324 * Uniscribe doesn't move the Halant with Left Matra.
325 * TEST: U+092B,U+093F,U+094DE
326 * We follow. This is important for the Sinhala
327 * U+0DDA split matra since it decomposes to U+0DD9,U+0DCA
328 * where U+0DD9 is a left matra and U+0DCA is the virama.
329 * We don't want to move the virama with the left matra.
330 * TEST: U+0D9A,U+0DDA
332 for (unsigned int j = i; j > start; j--)
333 if (info[j - 1].khmer_position() != POS_PRE_M) {
334 info[i].khmer_position() = info[j - 1].khmer_position();
338 } else if (info[i].khmer_position() != POS_SMVD) {
339 last_pos = (khmer_position_t) info[i].khmer_position();
343 /* For post-base consonants let them own anything before them
344 * since the last consonant or matra. */
346 unsigned int last = base;
347 for (unsigned int i = base + 1; i < end; i++)
348 if (is_consonant_or_vowel (info[i]))
350 for (unsigned int j = last + 1; j < i; j++)
351 if (info[j].khmer_position() < POS_SMVD)
352 info[j].khmer_position() = info[i].khmer_position();
354 } else if (info[i].khmer_category() == OT_M)
359 /* Use syllable() for sort accounting temporarily. */
360 unsigned int syllable = info[start].syllable();
361 for (unsigned int i = start; i < end; i++)
362 info[i].syllable() = i - start;
364 /* Sit tight, rock 'n roll! */
365 hb_stable_sort (info + start, end - start, compare_khmer_order);
366 /* Find base again */
368 for (unsigned int i = start; i < end; i++)
369 if (info[i].khmer_position() == POS_BASE_C)
375 /* Note! syllable() is a one-byte field. */
376 for (unsigned int i = base; i < end; i++)
377 if (info[i].syllable() != 255)
379 unsigned int max = i;
380 unsigned int j = start + info[i].syllable();
384 unsigned int next = start + info[j].syllable();
385 info[j].syllable() = 255; /* So we don't process j later again. */
389 buffer->merge_clusters (i, max + 1);
392 /* Put syllable back in. */
393 for (unsigned int i = start; i < end; i++)
394 info[i].syllable() = syllable;
397 /* Setup masks now */
403 mask = khmer_plan->mask_array[BLWF] | khmer_plan->mask_array[ABVF] | khmer_plan->mask_array[PSTF];
404 for (unsigned int i = base + 1; i < end; i++)
405 info[i].mask |= mask;
408 unsigned int pref_len = 2;
409 if (khmer_plan->mask_array[PREF] && base + pref_len < end)
411 /* Find a Halant,Ra sequence and mark it for pre-base-reordering processing. */
412 for (unsigned int i = base + 1; i + pref_len - 1 < end; i++) {
413 hb_codepoint_t glyphs[2];
414 for (unsigned int j = 0; j < pref_len; j++)
415 glyphs[j] = info[i + j].codepoint;
416 if (khmer_plan->pref.would_substitute (glyphs, pref_len, face))
418 for (unsigned int j = 0; j < pref_len; j++)
419 info[i++].mask |= khmer_plan->mask_array[PREF];
421 /* Mark the subsequent stuff with 'cfar'. Used in Khmer.
422 * Read the feature spec.
423 * This allows distinguishing the following cases with MS Khmer fonts:
424 * U+1784,U+17D2,U+179A,U+17D2,U+1782
425 * U+1784,U+17D2,U+1782,U+17D2,U+179A
427 if (khmer_plan->mask_array[CFAR])
429 info[i].mask |= khmer_plan->mask_array[CFAR];
438 initial_reordering_syllable (const hb_ot_shape_plan_t *plan,
441 unsigned int start, unsigned int end)
443 syllable_type_t syllable_type = (syllable_type_t) (buffer->info[start].syllable() & 0x0F);
444 switch (syllable_type)
446 case broken_cluster: /* We already inserted dotted-circles, so just call the consonant_syllable. */
447 case consonant_syllable:
448 initial_reordering_consonant_syllable (plan, face, buffer, start, end);
451 case non_khmer_cluster:
457 insert_dotted_circles (const hb_ot_shape_plan_t *plan HB_UNUSED,
461 /* Note: This loop is extra overhead, but should not be measurable. */
462 bool has_broken_syllables = false;
463 unsigned int count = buffer->len;
464 hb_glyph_info_t *info = buffer->info;
465 for (unsigned int i = 0; i < count; i++)
466 if ((info[i].syllable() & 0x0F) == broken_cluster)
468 has_broken_syllables = true;
471 if (likely (!has_broken_syllables))
475 hb_codepoint_t dottedcircle_glyph;
476 if (!font->get_nominal_glyph (0x25CCu, &dottedcircle_glyph))
479 hb_glyph_info_t dottedcircle = {0};
480 dottedcircle.codepoint = 0x25CCu;
481 set_khmer_properties (dottedcircle);
482 dottedcircle.codepoint = dottedcircle_glyph;
484 buffer->clear_output ();
487 unsigned int last_syllable = 0;
488 while (buffer->idx < buffer->len && buffer->successful)
490 unsigned int syllable = buffer->cur().syllable();
491 syllable_type_t syllable_type = (syllable_type_t) (syllable & 0x0F);
492 if (unlikely (last_syllable != syllable && syllable_type == broken_cluster))
494 last_syllable = syllable;
496 hb_glyph_info_t ginfo = dottedcircle;
497 ginfo.cluster = buffer->cur().cluster;
498 ginfo.mask = buffer->cur().mask;
499 ginfo.syllable() = buffer->cur().syllable();
500 /* TODO Set glyph_props? */
502 /* Insert dottedcircle after possible Repha. */
503 while (buffer->idx < buffer->len && buffer->successful &&
504 last_syllable == buffer->cur().syllable() &&
505 buffer->cur().khmer_category() == OT_Repha)
506 buffer->next_glyph ();
508 buffer->output_info (ginfo);
511 buffer->next_glyph ();
514 buffer->swap_buffers ();
518 initial_reordering (const hb_ot_shape_plan_t *plan,
522 insert_dotted_circles (plan, font, buffer);
524 foreach_syllable (buffer, start, end)
525 initial_reordering_syllable (plan, font->face, buffer, start, end);
529 final_reordering_syllable (const hb_ot_shape_plan_t *plan,
531 unsigned int start, unsigned int end)
533 const khmer_shape_plan_t *khmer_plan = (const khmer_shape_plan_t *) plan->data;
534 hb_glyph_info_t *info = buffer->info;
537 /* This function relies heavily on halant glyphs. Lots of ligation
538 * and possibly multiple substitutions happened prior to this
539 * phase, and that might have messed up our properties. Recover
540 * from a particular case of that where we're fairly sure that a
541 * class of OT_Coeng is desired but has been lost. */
542 if (khmer_plan->virama_glyph)
544 unsigned int virama_glyph = khmer_plan->virama_glyph;
545 for (unsigned int i = start; i < end; i++)
546 if (info[i].codepoint == virama_glyph &&
547 _hb_glyph_info_ligated (&info[i]) &&
548 _hb_glyph_info_multiplied (&info[i]))
550 /* This will make sure that this glyph passes is_coeng() test. */
551 info[i].khmer_category() = OT_Coeng;
552 _hb_glyph_info_clear_ligated_and_multiplied (&info[i]);
557 /* 4. Final reordering:
559 * After the localized forms and basic shaping forms GSUB features have been
560 * applied (see below), the shaping engine performs some final glyph
561 * reordering before applying all the remaining font features to the entire
565 bool try_pref = !!khmer_plan->mask_array[PREF];
567 /* Find base again */
569 for (base = start; base < end; base++)
570 if (info[base].khmer_position() >= POS_BASE_C)
572 if (try_pref && base + 1 < end)
574 for (unsigned int i = base + 1; i < end; i++)
575 if ((info[i].mask & khmer_plan->mask_array[PREF]) != 0)
577 if (!(_hb_glyph_info_substituted (&info[i]) &&
578 _hb_glyph_info_ligated_and_didnt_multiply (&info[i])))
580 /* Ok, this was a 'pref' candidate but didn't form any.
581 * Base is around here... */
583 while (base < end && is_coeng (info[base]))
585 info[base].khmer_position() = POS_BASE_C;
593 if (start < base && info[base].khmer_position() > POS_BASE_C)
597 if (base == end && start < base &&
598 is_one_of (info[base - 1], FLAG (OT_ZWJ)))
601 while (start < base &&
602 is_one_of (info[base], (FLAG (OT_N) | FLAG (OT_Coeng))))
608 * If a pre-base matra character had been reordered before applying basic
609 * features, the glyph can be moved closer to the main consonant based on
610 * whether half-forms had been formed. Actual position for the matra is
611 * defined as “after last standalone halant glyph, after initial matra
612 * position and before the main consonant”. If ZWJ or ZWNJ follow this
613 * halant, position is moved after it.
616 if (start + 1 < end && start < base) /* Otherwise there can't be any pre-base matra characters. */
618 /* If we lost track of base, alas, position before last thingy. */
619 unsigned int new_pos = base == end ? base - 2 : base - 1;
621 while (new_pos > start &&
622 !(is_one_of (info[new_pos], (FLAG (OT_M) | FLAG (OT_Coeng)))))
625 /* If we found no Halant we are done.
626 * Otherwise only proceed if the Halant does
627 * not belong to the Matra itself! */
628 if (is_coeng (info[new_pos]) &&
629 info[new_pos].khmer_position() != POS_PRE_M)
631 /* -> If ZWJ or ZWNJ follow this halant, position is moved after it. */
632 if (new_pos + 1 < end && is_joiner (info[new_pos + 1]))
636 new_pos = start; /* No move. */
638 if (start < new_pos && info[new_pos].khmer_position () != POS_PRE_M)
640 /* Now go see if there's actually any matras... */
641 for (unsigned int i = new_pos; i > start; i--)
642 if (info[i - 1].khmer_position () == POS_PRE_M)
644 unsigned int old_pos = i - 1;
645 if (old_pos < base && base <= new_pos) /* Shouldn't actually happen. */
648 hb_glyph_info_t tmp = info[old_pos];
649 memmove (&info[old_pos], &info[old_pos + 1], (new_pos - old_pos) * sizeof (info[0]));
652 /* Note: this merge_clusters() is intentionally *after* the reordering.
653 * Indic matra reordering is special and tricky... */
654 buffer->merge_clusters (new_pos, MIN (end, base + 1));
659 for (unsigned int i = start; i < base; i++)
660 if (info[i].khmer_position () == POS_PRE_M) {
661 buffer->merge_clusters (i, MIN (end, base + 1));
668 /* o Reorder pre-base-reordering consonants:
670 * If a pre-base-reordering consonant is found, reorder it according to
671 * the following rules:
674 if (try_pref && base + 1 < end) /* Otherwise there can't be any pre-base-reordering Ra. */
676 for (unsigned int i = base + 1; i < end; i++)
677 if ((info[i].mask & khmer_plan->mask_array[PREF]) != 0)
679 /* 1. Only reorder a glyph produced by substitution during application
680 * of the <pref> feature. (Note that a font may shape a Ra consonant with
681 * the feature generally but block it in certain contexts.)
683 /* Note: We just check that something got substituted. We don't check that
684 * the <pref> feature actually did it...
686 * Reorder pref only if it ligated. */
687 if (_hb_glyph_info_ligated_and_didnt_multiply (&info[i]))
690 * 2. Try to find a target position the same way as for pre-base matra.
691 * If it is found, reorder pre-base consonant glyph.
693 * 3. If position is not found, reorder immediately before main
697 unsigned int new_pos = base;
698 while (new_pos > start &&
699 !(is_one_of (info[new_pos - 1], FLAG(OT_M) | FLAG (OT_Coeng))))
702 /* In Khmer coeng model, a H,Ra can go *after* matras. If it goes after a
703 * split matra, it should be reordered to *before* the left part of such matra. */
704 if (new_pos > start && info[new_pos - 1].khmer_category() == OT_M)
706 unsigned int old_pos = i;
707 for (unsigned int j = base + 1; j < old_pos; j++)
708 if (info[j].khmer_category() == OT_M)
715 if (new_pos > start && is_coeng (info[new_pos - 1]))
717 /* -> If ZWJ or ZWNJ follow this halant, position is moved after it. */
718 if (new_pos < end && is_joiner (info[new_pos]))
723 unsigned int old_pos = i;
725 buffer->merge_clusters (new_pos, old_pos + 1);
726 hb_glyph_info_t tmp = info[old_pos];
727 memmove (&info[new_pos + 1], &info[new_pos], (old_pos - new_pos) * sizeof (info[0]));
730 if (new_pos <= base && base < old_pos)
741 * Finish off the clusters and go home!
743 if (hb_options ().uniscribe_bug_compatible)
745 /* Uniscribe merges the entire syllable into a single cluster... Except for Tamil & Sinhala.
746 * This means, half forms are submerged into the main consonant's cluster.
747 * This is unnecessary, and makes cursor positioning harder, but that's what
749 buffer->merge_clusters (start, end);
755 final_reordering (const hb_ot_shape_plan_t *plan,
756 hb_font_t *font HB_UNUSED,
759 unsigned int count = buffer->len;
760 if (unlikely (!count)) return;
762 foreach_syllable (buffer, start, end)
763 final_reordering_syllable (plan, buffer, start, end);
765 HB_BUFFER_DEALLOCATE_VAR (buffer, khmer_category);
766 HB_BUFFER_DEALLOCATE_VAR (buffer, khmer_position);
771 clear_syllables (const hb_ot_shape_plan_t *plan HB_UNUSED,
772 hb_font_t *font HB_UNUSED,
775 hb_glyph_info_t *info = buffer->info;
776 unsigned int count = buffer->len;
777 for (unsigned int i = 0; i < count; i++)
778 info[i].syllable() = 0;
783 decompose_khmer (const hb_ot_shape_normalize_context_t *c,
791 * Decompose split matras that don't have Unicode decompositions.
795 case 0x17BEu : *a = 0x17C1u; *b= 0x17BEu; return true;
796 case 0x17BFu : *a = 0x17C1u; *b= 0x17BFu; return true;
797 case 0x17C0u : *a = 0x17C1u; *b= 0x17C0u; return true;
798 case 0x17C4u : *a = 0x17C1u; *b= 0x17C4u; return true;
799 case 0x17C5u : *a = 0x17C1u; *b= 0x17C5u; return true;
802 return (bool) c->unicode->decompose (ab, a, b);
806 compose_khmer (const hb_ot_shape_normalize_context_t *c,
811 /* Avoid recomposing split matras. */
812 if (HB_UNICODE_GENERAL_CATEGORY_IS_MARK (c->unicode->general_category (a)))
815 return (bool) c->unicode->compose (a, b, ab);
819 const hb_ot_complex_shaper_t _hb_ot_complex_shaper_khmer =
821 collect_features_khmer,
822 override_features_khmer,
825 nullptr, /* preprocess_text */
826 nullptr, /* postprocess_glyphs */
827 HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_DIACRITICS_NO_SHORT_CIRCUIT,
831 nullptr, /* disable_otl */
832 nullptr, /* reorder_marks */
833 HB_OT_SHAPE_ZERO_WIDTH_MARKS_NONE,
834 false, /* fallback_position */