提交 dfca269f 编写于 作者: B Behdad Esfahbod

[OTLayout] Port ligate_input to skippy_iter

上级 7e53415c
...@@ -705,13 +705,16 @@ static inline void ligate_input (hb_apply_context_t *c, ...@@ -705,13 +705,16 @@ static inline void ligate_input (hb_apply_context_t *c,
unsigned int last_num_components = get_lig_num_comps (c->buffer->cur()); unsigned int last_num_components = get_lig_num_comps (c->buffer->cur());
unsigned int components_so_far = last_num_components; unsigned int components_so_far = last_num_components;
hb_apply_context_t::skipping_forward_iterator_t skippy_iter (c, c->buffer->idx, count - 1);
if (!is_mark_ligature) if (!is_mark_ligature)
set_lig_props_for_ligature (c->buffer->cur(), lig_id, total_component_count); set_lig_props_for_ligature (c->buffer->cur(), lig_id, total_component_count);
c->replace_glyph (lig_glyph, klass); c->replace_glyph (lig_glyph, klass);
for (unsigned int i = 1; i < count; i++) for (unsigned int i = 1; i < count; i++)
{ {
while (c->should_skip_current_glyph ()) if (!skippy_iter.next ()) return;
while (c->buffer->idx < skippy_iter.idx)
{ {
if (!is_mark_ligature) { if (!is_mark_ligature) {
unsigned int new_lig_comp = components_so_far - last_num_components + unsigned int new_lig_comp = components_so_far - last_num_components +
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册