diff options
Diffstat (limited to 'Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-khmer.cc')
-rw-r--r-- | Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-khmer.cc | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-khmer.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-khmer.cc index 497891ea045..4475ceb7c91 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-khmer.cc +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-khmer.cc @@ -127,28 +127,31 @@ collect_features_khmer (hb_ot_shape_planner_t *plan) for (; i < KHMER_NUM_FEATURES; i++) map->add_feature (khmer_features[i]); - - map->enable_feature (HB_TAG('c','a','l','t')); - map->enable_feature (HB_TAG('c','l','i','g')); - } static void override_features_khmer (hb_ot_shape_planner_t *plan) { + hb_ot_map_builder_t *map = &plan->map; + + /* Khmer spec has 'clig' as part of required shaping features: + * "Apply feature 'clig' to form ligatures that are desired for + * typographical correctness.", hence in overrides... */ + map->enable_feature (HB_TAG('c','l','i','g')); + /* Uniscribe does not apply 'kern' in Khmer. */ if (hb_options ().uniscribe_bug_compatible) { - plan->map.disable_feature (HB_TAG('k','e','r','n')); + map->disable_feature (HB_TAG('k','e','r','n')); } - plan->map.disable_feature (HB_TAG('l','i','g','a')); + map->disable_feature (HB_TAG('l','i','g','a')); } struct would_substitute_feature_t { - inline void init (const hb_ot_map_t *map, hb_tag_t feature_tag, bool zero_context_) + void init (const hb_ot_map_t *map, hb_tag_t feature_tag, bool zero_context_) { zero_context = zero_context_; map->get_stage_lookups (0/*GSUB*/, @@ -156,9 +159,9 @@ struct would_substitute_feature_t &lookups, &count); } - inline bool would_substitute (const hb_codepoint_t *glyphs, - unsigned int glyphs_count, - hb_face_t *face) const + bool would_substitute (const hb_codepoint_t *glyphs, + unsigned int glyphs_count, + hb_face_t *face) const { for (unsigned int i = 0; i < count; i++) if (hb_ot_layout_lookup_would_substitute_fast (face, lookups[i].index, glyphs, glyphs_count, zero_context)) @@ -174,7 +177,7 @@ struct would_substitute_feature_t struct khmer_shape_plan_t { - inline bool get_virama_glyph (hb_font_t *font, hb_codepoint_t *pglyph) const + bool get_virama_glyph (hb_font_t *font, hb_codepoint_t *pglyph) const { hb_codepoint_t glyph = virama_glyph; if (unlikely (virama_glyph == (hb_codepoint_t) -1)) |