提交 6da9dbff 编写于 作者: B Behdad Esfahbod

Remove zero-width chars in the fallback shaper too

上级 68b76121
......@@ -34,16 +34,24 @@ _hb_fallback_shape (hb_font_t *font,
const hb_feature_t *features HB_UNUSED,
unsigned int num_features HB_UNUSED)
{
/* TODO Save the space character in the font? */
hb_codepoint_t space;
hb_font_get_glyph (font, ' ', 0, &space);
buffer->guess_properties ();
buffer->clear_positions ();
unsigned int count = buffer->len;
for (unsigned int i = 0; i < count; i++)
{
if (_hb_unicode_is_zero_width (buffer->info[i].codepoint)) {
buffer->info[i].codepoint = space;
buffer->pos[i].x_advance = 0;
buffer->pos[i].y_advance = 0;
continue;
}
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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册