提交 4a1e02ef 编写于 作者: B Behdad Esfahbod

Fix shape to presentation forms font check

As reported by Jonathan Kew on the list.
上级 6062f5f0
...@@ -211,9 +211,12 @@ arabic_fallback_shape (hb_font_t *font, hb_buffer_t *buffer) ...@@ -211,9 +211,12 @@ arabic_fallback_shape (hb_font_t *font, hb_buffer_t *buffer)
hb_codepoint_t glyph; hb_codepoint_t glyph;
/* Shape to presentation forms */ /* Shape to presentation forms */
for (unsigned int i = 0; i < count; i++) for (unsigned int i = 0; i < count; i++) {
if (hb_font_get_glyph (font, buffer->info[i].codepoint, 0, &glyph)) hb_codepoint_t u = buffer->info[i].codepoint;
buffer->info[i].codepoint = get_arabic_shape (buffer->info[i].codepoint, buffer->info[i].arabic_shaping_action()); hb_codepoint_t shaped = get_arabic_shape (u, buffer->info[i].arabic_shaping_action());
if (shaped != u && hb_font_get_glyph (font, shaped, 0, &glyph))
buffer->info[i].codepoint = shaped;
}
/* Mandatory ligatures */ /* Mandatory ligatures */
buffer->clear_output (); buffer->clear_output ();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册