From 3eb6a4dbf25b11fce5e0e426e89f7457887aeca0 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 12 Aug 2014 19:10:33 -0400 Subject: [PATCH] [coretext] Minor --- src/hb-coretext.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/hb-coretext.cc b/src/hb-coretext.cc index f08aec573..53adc815e 100644 --- a/src/hb-coretext.cc +++ b/src/hb-coretext.cc @@ -693,10 +693,11 @@ retry: if (unlikely (!attr_string)) FAIL ("CFAttributedStringCreateMutable failed"); CFAttributedStringReplaceString (attr_string, CFRangeMake (0, 0), string_ref); - CFAttributedStringSetAttribute (attr_string, CFRangeMake (0, chars_len), - kCTVerticalFormsAttributeName, - HB_DIRECTION_IS_VERTICAL (buffer->props.direction) ? - kCFBooleanTrue : kCFBooleanFalse); + if (HB_DIRECTION_IS_VERTICAL (buffer->props.direction)) + { + CFAttributedStringSetAttribute (attr_string, CFRangeMake (0, chars_len), + kCTVerticalFormsAttributeName, kCFBooleanTrue); + } CFAttributedStringSetAttribute (attr_string, CFRangeMake (0, chars_len), kCTFontAttributeName, font_data->ct_font);