From 50ad7788eeb7160caef4ec78e65c7c630e601b06 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 18 Aug 2015 10:22:16 +0100 Subject: [PATCH] [coretext] Remove assert that kicks in on Mac OS 10.6 http://crbug.com/419769 --- src/hb-coretext.cc | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/hb-coretext.cc b/src/hb-coretext.cc index 0b710c2b7..2e8df5c0b 100644 --- a/src/hb-coretext.cc +++ b/src/hb-coretext.cc @@ -1034,10 +1034,20 @@ retry: buffer->len += num_glyphs; } - /* Make sure all runs had the expected direction. */ - bool backward = HB_DIRECTION_IS_BACKWARD (buffer->props.direction); - assert (bool (status_and & kCTRunStatusRightToLeft) == backward); - assert (bool (status_or & kCTRunStatusRightToLeft) == backward); + /* Mac OS 10.6 doesn't have kCTTypesetterOptionForcedEmbeddingLevel, + * or if it does, it doesn't resepct it. So we get runs with wrong + * directions. As such, disable the assert... It wouldn't crash, but + * cursoring will be off... + * + * http://crbug.com/419769 + */ + if (0) + { + /* Make sure all runs had the expected direction. */ + bool backward = HB_DIRECTION_IS_BACKWARD (buffer->props.direction); + assert (bool (status_and & kCTRunStatusRightToLeft) == backward); + assert (bool (status_or & kCTRunStatusRightToLeft) == backward); + } buffer->clear_positions ();