提交 1b8196c9 编写于 作者: B Behdad Esfahbod

Add fallback shaper

上级 13a601fe
......@@ -37,7 +37,26 @@ hb_fallback_shape (hb_font_t *font,
{
buffer->guess_properties ();
return TRUE;
}
unsigned int count = buffer->len;
for (unsigned int i = 0; i < count; i++)
hb_font_get_glyph (font, buffer->info[i].codepoint, 0, &buffer->info[i].codepoint);
buffer->clear_positions ();
for (unsigned int i = 0; i < count; i++) {
hb_font_get_glyph_advance_for_direction (font, buffer->info[i].codepoint,
buffer->props.direction,
&buffer->pos[i].x_advance,
&buffer->pos[i].y_advance);
hb_font_subtract_glyph_origin_for_direction (font, buffer->info[i].codepoint,
buffer->props.direction,
&buffer->pos[i].x_offset,
&buffer->pos[i].y_offset);
}
if (HB_DIRECTION_IS_BACKWARD (buffer->props.direction))
hb_buffer_reverse (buffer);
return TRUE;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册