From 7fa54ed75aa30ae1d6ee9136ccb83b630c24fb65 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 4 Nov 2015 22:54:49 -0800 Subject: [PATCH] Don't try zeroing mark attachments by Unicode if there's no non-ASCII --- src/hb-ot-shape.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/hb-ot-shape.cc b/src/hb-ot-shape.cc index 4b2732ba8..8d4b1698e 100644 --- a/src/hb-ot-shape.cc +++ b/src/hb-ot-shape.cc @@ -621,6 +621,9 @@ zero_mark_width (hb_glyph_position_t *pos) static inline void zero_mark_widths_by_unicode (hb_buffer_t *buffer, bool adjust_offsets) { + if (!(buffer->scratch_flags & HB_BUFFER_SCRATCH_FLAG_HAS_NON_ASCII)) + return; + unsigned int count = buffer->len; hb_glyph_info_t *info = buffer->info; for (unsigned int i = 0; i < count; i++)