Do not mark the first glyph as unsafe to break

Fixes #791.
This commit is contained in:
David Corbett 2018-02-16 12:08:55 -05:00 committed by Behdad Esfahbod
parent 04dedec96b
commit 21646cc4a6
5 changed files with 1 additions and 11 deletions

View File

@ -344,8 +344,7 @@ struct hb_buffer_t {
inline void
unsafe_to_break_all (void)
{
for (unsigned int i = 0; i < len; i++)
info[i].mask |= HB_GLYPH_FLAG_UNSAFE_TO_BREAK;
unsafe_to_break_impl (0, len);
}
inline void
safe_to_break_all (void)

View File

@ -1244,8 +1244,6 @@ resize_and_retry:
pos->x_offset = info->var1.i32;
pos->y_offset = info->var2.i32;
info->mask = HB_GLYPH_FLAG_UNSAFE_TO_BREAK;
info++, pos++;
}
else
@ -1255,8 +1253,6 @@ resize_and_retry:
pos->x_offset = info->var1.i32;
pos->y_offset = info->var2.i32;
info->mask = HB_GLYPH_FLAG_UNSAFE_TO_BREAK;
info++, pos++;
}

View File

@ -878,8 +878,6 @@ retry_getglyphs:
pos->x_offset =
x_mult * (isRightToLeft ? -info->var1.i32 : info->var1.i32);
pos->y_offset = y_mult * info->var2.i32;
info->mask = HB_GLYPH_FLAG_UNSAFE_TO_BREAK;
}
if (isRightToLeft)

View File

@ -360,7 +360,6 @@ _hb_graphite2_shape (hb_shape_plan_t *shape_plan,
hb_glyph_info_t *info = &buffer->info[clusters[i].base_glyph + j];
info->codepoint = gids[clusters[i].base_glyph + j];
info->cluster = clusters[i].cluster;
info->mask = HB_GLYPH_FLAG_UNSAFE_TO_BREAK;
info->var1.i32 = clusters[i].advance; // all glyphs in the cluster get the same advance
}
}

View File

@ -1025,8 +1025,6 @@ retry:
pos->x_advance = x_mult * (int32_t) info->mask;
pos->x_offset = x_mult * (backward ? -info->var1.i32 : info->var1.i32);
pos->y_offset = y_mult * info->var2.i32;
info->mask = HB_GLYPH_FLAG_UNSAFE_TO_BREAK;
}
if (backward)