From 17a8a7f3c0a382b379f55d33a2bbfb8cc048e3d8 Mon Sep 17 00:00:00 2001 From: ichizok Date: Wed, 4 Jul 2018 14:04:07 +0900 Subject: [PATCH] Fix a display of some non-composing glyphs e.g. ligatures, arabic --- src/MacVim/MMCoreTextView.m | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/MacVim/MMCoreTextView.m b/src/MacVim/MMCoreTextView.m index 0e4a19bfce..fa391d3ca7 100644 --- a/src/MacVim/MMCoreTextView.m +++ b/src/MacVim/MMCoreTextView.m @@ -1271,8 +1271,10 @@ - (void)batchDrawData:(NSData *)data { if (CTFontGetGlyphsForCharacters(fontRef, chars, glyphs, length)) { // All chars were mapped to glyphs, so draw all at once and return. - length = composeGlyphsForChars(chars, glyphs, positions, length, - fontRef, isComposing, useLigatures); + length = isComposing || useLigatures + ? composeGlyphsForChars(chars, glyphs, positions, length, + fontRef, isComposing, useLigatures) + : gatherGlyphs(glyphs, length); CTFontDrawGlyphs(fontRef, glyphs, positions, length, context); return; }