[Indic] Unbreak Khmer

For Khmer, all consonants are subjoining.  No need to look in the font.
We were looking in the wrong order anyway.
This commit is contained in:
Behdad Esfahbod 2012-07-19 20:30:22 -04:00
parent e0475345d5
commit 5249f3aee1
1 changed files with 3 additions and 1 deletions

View File

@ -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]);