Open jordwalke opened 9 years ago
+1
Me and @rogual are currently looking into rendering text more efficiently with CoreText. This would essentially support ligatures as well, I suppose. But we should keep in mind that the current rendering is very similar to iTerm's, which also doesn't support ligatures (?).
@philplckthun, Correct - I'm suggesting a way that neovim-dot-app could distinguish itself by offering features that other implementations don't support.
The commit I referenced modifies my PR to render characters together, thus allowing ligatures.
Check out PR #109 for more info.
@rogual Can be closed?
Agreed. I have been using FiraCode + Neovim.app since #109 was merged and it seems to work nicely.
@philplckthun No, I still need to test this. Just want to make sure ligatures work reliably, and not the sort-of-working that RTL text used to have.
I'm not exactly using the latest version, but often, when I type characters the ligatures don't draw. I have to highlight them with visual selection for them to rerender properly.
@jordwalke When Neovim/Vim draws new characters it draws them separately - naturally. Thus they are also rendered separately and the ligatures aren't drawn immediately. They only show up when the line is drawn as a whole.
This can't be fixed easily. We'd need a highly complex rendering system to circumvent these problems.
Then this is a bug, and does not constitute support for ligatures. They need to be rendered correctly or not at all.
My suggestion in another neovim frontend was to keep track of drawn line content and always redraw individual lines as one unit using CoreText (or whatever). That would ensure that ligatures are always rendered correctly.
Yeah, sounds like the way to go.
Ligatures seem to be turned on for me (I'm using Menlo). It's causing some scroll position issues. Is there a way to turn this off?
No, it's a bug. OSX is being clever and sometimes rendering ligatures when we happen to draw several chars at the same time.
Some fonts, such as https://github.com/tonsky/FiraCode have ligatures and it would be great to support them.