From 19d50aa2620f1464da8e00185b746e46fb0d80c4 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 3 Oct 2018 20:05:28 +0200 Subject: [PATCH] [indic] Simplify dottedcircle --- src/hb-ot-shape-complex-indic.cc | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc index dfb3d54d5..e92c9ed06 100644 --- a/src/hb-ot-shape-complex-indic.cc +++ b/src/hb-ot-shape-complex-indic.cc @@ -331,6 +331,13 @@ data_destroy_indic (void *data) free (data); } +static void +_output_with_dotted_circle (hb_buffer_t *buffer) +{ + buffer->output_glyph (0x25CCu); + buffer->next_glyph (); +} + static void preprocess_text_indic (const hb_ot_shape_plan_t *plan, hb_buffer_t *buffer, @@ -401,7 +408,7 @@ preprocess_text_indic (const hb_ot_shape_plan_t *plan, break; } buffer->next_glyph (); - if (matched) { buffer->output_glyph (0x25CCu); buffer->next_glyph (); } + if (matched) _output_with_dotted_circle (buffer); } processed = true; break; @@ -423,7 +430,7 @@ preprocess_text_indic (const hb_ot_shape_plan_t *plan, break; } buffer->next_glyph (); - if (matched) { buffer->output_glyph (0x25CCu); buffer->next_glyph (); } + if (matched) _output_with_dotted_circle (buffer); } processed = true; break; @@ -460,7 +467,7 @@ preprocess_text_indic (const hb_ot_shape_plan_t *plan, break; } buffer->next_glyph (); - if (matched) { buffer->output_glyph (0x25CCu); buffer->next_glyph (); } + if (matched) _output_with_dotted_circle (buffer); } processed = true; break; @@ -485,7 +492,7 @@ preprocess_text_indic (const hb_ot_shape_plan_t *plan, break; } buffer->next_glyph (); - if (matched) { buffer->output_glyph (0x25CCu); buffer->next_glyph (); } + if (matched) _output_with_dotted_circle (buffer); } processed = true; break; @@ -504,7 +511,7 @@ preprocess_text_indic (const hb_ot_shape_plan_t *plan, break; } buffer->next_glyph (); - if (matched) { buffer->output_glyph (0x25CCu); buffer->next_glyph (); } + if (matched) _output_with_dotted_circle (buffer); } processed = true; break; @@ -528,7 +535,7 @@ preprocess_text_indic (const hb_ot_shape_plan_t *plan, break; } buffer->next_glyph (); - if (matched) { buffer->output_glyph (0x25CCu); buffer->next_glyph (); } + if (matched) _output_with_dotted_circle (buffer); } processed = true; break; @@ -547,7 +554,7 @@ preprocess_text_indic (const hb_ot_shape_plan_t *plan, break; } buffer->next_glyph (); - if (matched) { buffer->output_glyph (0x25CCu); buffer->next_glyph (); } + if (matched) _output_with_dotted_circle (buffer); } processed = true; break; @@ -574,7 +581,7 @@ preprocess_text_indic (const hb_ot_shape_plan_t *plan, break; } buffer->next_glyph (); - if (matched) { buffer->output_glyph (0x25CCu); buffer->next_glyph (); } + if (matched) _output_with_dotted_circle (buffer); } processed = true; break;