*/
unsigned int count = buffer->len;
- for (buffer->idx = 0; buffer->idx < count && !buffer->in_error;)
+ for (buffer->idx = 0; buffer->idx < count;)
{
hb_codepoint_t u = buffer->cur().codepoint;
buffer->next_glyph ();
if (!is_zero_width_char (font, u))
{
- buffer->merge_out_clusters (start, end + 1);
hb_glyph_info_t *info = buffer->out_info;
hb_glyph_info_t tone = info[end];
memmove (&info[start + 1], &info[start], (end - start) * sizeof (hb_glyph_info_t));
info[start] = tone;
}
+ /* Merge clusters across the (possibly reordered) syllable+tone.
+ * We want to merge even in the zero-width tone mark case here,
+ * so that clustering behavior isn't dependent on how the tone mark
+ * is handled by the font.
+ */
+ buffer->merge_out_clusters (start, end + 1);
}
else
{
}
else
end = start + 2;
- if (buffer->cluster_level == HB_BUFFER_CLUSTER_LEVEL_MONOTONE_GRAPHEMES)
- buffer->merge_out_clusters (start, end);
+ buffer->merge_out_clusters (start, end);
continue;
}
}
info[i++].hangul_shaping_feature() = VJMO;
if (i < end)
info[i++].hangul_shaping_feature() = TJMO;
- if (buffer->cluster_level == HB_BUFFER_CLUSTER_LEVEL_MONOTONE_GRAPHEMES)
- buffer->merge_out_clusters (start, end);
+ buffer->merge_out_clusters (start, end);
continue;
}
}
"hangul",
collect_features_hangul,
override_features_hangul,
- data_create_hangul,
- data_destroy_hangul,
+ data_create_hangul, /* data_create */
+ data_destroy_hangul, /* data_destroy */
preprocess_text_hangul,
- NULL, /* postprocess_glyphs */
HB_OT_SHAPE_NORMALIZATION_MODE_NONE,
NULL, /* decompose */
NULL, /* compose */
- setup_masks_hangul,
+ setup_masks_hangul, /* setup_masks */
HB_OT_SHAPE_ZERO_WIDTH_MARKS_NONE,
false, /* fallback_position */
};