提交 5249f3ae 编写于 作者: B Behdad Esfahbod

[Indic] Unbreak Khmer

For Khmer, all consonants are subjoining.  No need to look in the font.
We were looking in the wrong order anyway.
上级 e0475345
...@@ -116,9 +116,11 @@ would_substitute (hb_codepoint_t *glyphs, unsigned int glyphs_count, ...@@ -116,9 +116,11 @@ would_substitute (hb_codepoint_t *glyphs, unsigned int glyphs_count,
static indic_position_t static indic_position_t
consonant_position (hb_codepoint_t u, hb_ot_map_t *map, hb_font_t *font) 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; hb_codepoint_t virama = (u & ~0x007F) | 0x004D;
if ((u & ~0x007F) == 0x0D80) virama = 0x0DCA; /* Sinahla */ if ((u & ~0x007F) == 0x0D80) virama = 0x0DCA; /* Sinahla */
if ((u & ~0x007F) == 0x1780) virama = 0x17D2; /* Khmer */
hb_codepoint_t glyphs[2]; hb_codepoint_t glyphs[2];
hb_font_get_glyph (font, virama, 0, &glyphs[0]); hb_font_get_glyph (font, virama, 0, &glyphs[0]);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册