From 08acfe0d3a1d8223a9fa0696703fff63d6c2ea8b Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 12 Aug 2014 18:57:08 -0400 Subject: [PATCH] [hb-coretext] Fix cluster order of notdef runs in RTL text --- src/hb-coretext.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/hb-coretext.cc b/src/hb-coretext.cc index fe5f31bd9..f08aec573 100644 --- a/src/hb-coretext.cc +++ b/src/hb-coretext.cc @@ -843,6 +843,7 @@ retry: CGGlyph notdef = 0; double advance = CTFontGetAdvancesForGlyphs (font_data->ct_font, kCTFontHorizontalOrientation, ¬def, NULL, 1); + unsigned int old_len = buffer->len; for (CFIndex j = range.location; j < range.location + range.length; j++) { UniChar ch = CFStringGetCharacterAtIndex (string_ref, j); @@ -865,6 +866,8 @@ retry: info++; buffer->len++; } + if (HB_DIRECTION_IS_BACKWARD (buffer->props.direction)) + buffer->reverse_range (old_len, buffer->len); continue; } }