From 5249f3aee108b0f41770d137e63a625f594418e7 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 19 Jul 2012 20:30:22 -0400 Subject: [PATCH] [Indic] Unbreak Khmer For Khmer, all consonants are subjoining. No need to look in the font. We were looking in the wrong order anyway. --- src/hb-ot-shape-complex-indic.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc index 5b842b887..91481f348 100644 --- a/src/hb-ot-shape-complex-indic.cc +++ b/src/hb-ot-shape-complex-indic.cc @@ -116,9 +116,11 @@ would_substitute (hb_codepoint_t *glyphs, unsigned int glyphs_count, static indic_position_t consonant_position (hb_codepoint_t u, hb_ot_map_t *map, hb_font_t *font) { + if ((u & ~0x007F) == 0x1780) + return POS_BELOW_C; /* In Khmer coeng model, all are subjoining. */ + hb_codepoint_t virama = (u & ~0x007F) | 0x004D; if ((u & ~0x007F) == 0x0D80) virama = 0x0DCA; /* Sinahla */ - if ((u & ~0x007F) == 0x1780) virama = 0x17D2; /* Khmer */ hb_codepoint_t glyphs[2]; hb_font_get_glyph (font, virama, 0, &glyphs[0]);