From 101d07efd9a11b1f215b913205d2560ee0df9135 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 3 Jan 2022 11:24:07 -0700 Subject: [PATCH] [util] Move copy_buffer_properties() out of loop Now that hb_buffer_append() overlays properties, we can do this. Part of https://github.com/harfbuzz/harfbuzz/issues/1555 --- util/shape-options.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/shape-options.hh b/util/shape-options.hh index 8d3318420..a1491429e 100644 --- a/util/shape-options.hh +++ b/util/shape-options.hh @@ -184,6 +184,7 @@ struct shape_options_t /* Check that breaking up shaping at safe-to-break is indeed safe. */ hb_buffer_t *fragment = hb_buffer_create (); + copy_buffer_properties (fragment, buffer); hb_buffer_t *reconstruction = hb_buffer_create (); copy_buffer_properties (reconstruction, buffer); @@ -234,7 +235,6 @@ struct shape_options_t printf("start %d end %d text start %d end %d\n", start, end, text_start, text_end); hb_buffer_clear_contents (fragment); - copy_buffer_properties (fragment, buffer); hb_buffer_flags_t flags = hb_buffer_get_flags (fragment); if (0 < text_start)