From cdb9197b4137ccac7d775b0e10adf0e9ef485f0c Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 11 Feb 2021 11:32:49 -0700 Subject: [PATCH] [khmer] Remove more unused code Prodded by https://github.com/harfbuzz/harfbuzz/pull/2583 These are leftovers from when we forked Khmer shaper from the Indic shaper. --- src/hb-ot-shape-complex-khmer.cc | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/src/hb-ot-shape-complex-khmer.cc b/src/hb-ot-shape-complex-khmer.cc index 11c79b207..dddba142a 100644 --- a/src/hb-ot-shape-complex-khmer.cc +++ b/src/hb-ot-shape-complex-khmer.cc @@ -141,27 +141,6 @@ override_features_khmer (hb_ot_shape_planner_t *plan) struct khmer_shape_plan_t { - 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)) - { - if (!font->get_nominal_glyph (0x17D2u, &glyph)) - glyph = 0; - /* Technically speaking, the spec says we should apply 'locl' to virama too. - * Maybe one day... */ - - /* Our get_nominal_glyph() function needs a font, so we can't get the virama glyph - * during shape planning... Instead, overwrite it here. It's safe. Don't worry! */ - virama_glyph = glyph; - } - - *pglyph = glyph; - return glyph != 0; - } - - mutable hb_codepoint_t virama_glyph; - hb_mask_t mask_array[KHMER_NUM_FEATURES]; }; @@ -172,8 +151,6 @@ data_create_khmer (const hb_ot_shape_plan_t *plan) if (unlikely (!khmer_plan)) return nullptr; - khmer_plan->virama_glyph = (hb_codepoint_t) -1; - for (unsigned int i = 0; i < ARRAY_LENGTH (khmer_plan->mask_array); i++) khmer_plan->mask_array[i] = (khmer_features[i].flags & F_GLOBAL) ? 0 : plan->map.get_1_mask (khmer_features[i].tag);