From 221ba02b0816584a02471037edae7cec9c1b8acc Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 21 Jan 2015 16:42:09 -0800 Subject: [PATCH] [coretext] Use vertical advance for notdef in vertical direction --- src/hb-coretext.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/hb-coretext.cc b/src/hb-coretext.cc index 11629cc18..64ceb4467 100644 --- a/src/hb-coretext.cc +++ b/src/hb-coretext.cc @@ -861,7 +861,12 @@ retry: hb_glyph_info_t *info = buffer->info + buffer->len; CGGlyph notdef = 0; - double advance = CTFontGetAdvancesForGlyphs (font_data->ct_font, kCTFontHorizontalOrientation, ¬def, NULL, 1); + double advance = CTFontGetAdvancesForGlyphs (font_data->ct_font, + HB_DIRECTION_IS_HORIZONTAL (buffer->props.direction) ? + kCTFontHorizontalOrientation : + kCTFontVerticalOrientation, + ¬def, NULL, 1); + /* XXX adjust sign / scale of advance. */ unsigned int old_len = buffer->len; for (CFIndex j = range.location; j < range.location + range.length; j++)