Skip forming clusters if text is all ASCII

This commit is contained in:
Behdad Esfahbod 2015-11-04 22:24:19 -08:00
parent 28de104f15
commit 497a6c2071
1 changed files with 2 additions and 1 deletions

View File

@ -263,7 +263,8 @@ hb_insert_dotted_circle (hb_buffer_t *buffer, hb_font_t *font)
static void static void
hb_form_clusters (hb_buffer_t *buffer) hb_form_clusters (hb_buffer_t *buffer)
{ {
if (buffer->cluster_level != HB_BUFFER_CLUSTER_LEVEL_MONOTONE_GRAPHEMES) if (!(buffer->scratch_flags & HB_BUFFER_SCRATCH_FLAG_HAS_NON_ASCII) ||
buffer->cluster_level != HB_BUFFER_CLUSTER_LEVEL_MONOTONE_GRAPHEMES)
return; return;
/* Loop duplicated in hb_ensure_native_direction(). */ /* Loop duplicated in hb_ensure_native_direction(). */