提交 21646cc4 编写于 作者: D David Corbett 提交者: Behdad Esfahbod

Do not mark the first glyph as unsafe to break

Fixes #791.
上级 04dedec9
...@@ -344,8 +344,7 @@ struct hb_buffer_t { ...@@ -344,8 +344,7 @@ struct hb_buffer_t {
inline void inline void
unsafe_to_break_all (void) unsafe_to_break_all (void)
{ {
for (unsigned int i = 0; i < len; i++) unsafe_to_break_impl (0, len);
info[i].mask |= HB_GLYPH_FLAG_UNSAFE_TO_BREAK;
} }
inline void inline void
safe_to_break_all (void) safe_to_break_all (void)
......
...@@ -1244,8 +1244,6 @@ resize_and_retry: ...@@ -1244,8 +1244,6 @@ resize_and_retry:
pos->x_offset = info->var1.i32; pos->x_offset = info->var1.i32;
pos->y_offset = info->var2.i32; pos->y_offset = info->var2.i32;
info->mask = HB_GLYPH_FLAG_UNSAFE_TO_BREAK;
info++, pos++; info++, pos++;
} }
else else
...@@ -1255,8 +1253,6 @@ resize_and_retry: ...@@ -1255,8 +1253,6 @@ resize_and_retry:
pos->x_offset = info->var1.i32; pos->x_offset = info->var1.i32;
pos->y_offset = info->var2.i32; pos->y_offset = info->var2.i32;
info->mask = HB_GLYPH_FLAG_UNSAFE_TO_BREAK;
info++, pos++; info++, pos++;
} }
......
...@@ -878,8 +878,6 @@ retry_getglyphs: ...@@ -878,8 +878,6 @@ retry_getglyphs:
pos->x_offset = pos->x_offset =
x_mult * (isRightToLeft ? -info->var1.i32 : info->var1.i32); x_mult * (isRightToLeft ? -info->var1.i32 : info->var1.i32);
pos->y_offset = y_mult * info->var2.i32; pos->y_offset = y_mult * info->var2.i32;
info->mask = HB_GLYPH_FLAG_UNSAFE_TO_BREAK;
} }
if (isRightToLeft) if (isRightToLeft)
......
...@@ -360,7 +360,6 @@ _hb_graphite2_shape (hb_shape_plan_t *shape_plan, ...@@ -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]; hb_glyph_info_t *info = &buffer->info[clusters[i].base_glyph + j];
info->codepoint = gids[clusters[i].base_glyph + j]; info->codepoint = gids[clusters[i].base_glyph + j];
info->cluster = clusters[i].cluster; 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 info->var1.i32 = clusters[i].advance; // all glyphs in the cluster get the same advance
} }
} }
......
...@@ -1025,8 +1025,6 @@ retry: ...@@ -1025,8 +1025,6 @@ retry:
pos->x_advance = x_mult * (int32_t) info->mask; pos->x_advance = x_mult * (int32_t) info->mask;
pos->x_offset = x_mult * (backward ? -info->var1.i32 : info->var1.i32); pos->x_offset = x_mult * (backward ? -info->var1.i32 : info->var1.i32);
pos->y_offset = y_mult * info->var2.i32; pos->y_offset = y_mult * info->var2.i32;
info->mask = HB_GLYPH_FLAG_UNSAFE_TO_BREAK;
} }
if (backward) if (backward)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册