From e95eb23a4ee920eab1e2f4eec9cf490bb431452c Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 4 Nov 2015 22:55:11 -0800 Subject: [PATCH] Don't try zeroing marks by GDEF if there are no non-ASCII This one is a hack, but should be ok. --- src/hb-ot-shape.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/hb-ot-shape.cc b/src/hb-ot-shape.cc index 8d4b169..36b1297 100644 --- a/src/hb-ot-shape.cc +++ b/src/hb-ot-shape.cc @@ -638,6 +638,10 @@ zero_mark_widths_by_unicode (hb_buffer_t *buffer, bool adjust_offsets) static inline void zero_mark_widths_by_gdef (hb_buffer_t *buffer, bool adjust_offsets) { + /* This one is a hack; Technically GDEF can mark ASCII glyphs as marks, but we don't listen. */ + 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++) -- 2.7.4