You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I took a look at ui.coffee and it seems like supporting ligatures would be within reach. Ligatures are great because modern programming fonts are beginning to include support for awesome symbols for functional languages etc.:
It looks like the canvas drawText API that you're using supports ligatures but it merely requires that you draw the two/three characters in one call to drawText. I saw that neovim-e draws one character at a time, however.
Should there be some intermediate representation that neovim-e keeps track of instead of just executing raw single character draw/put commands? Could neovim-e maintain an up to date representation of the entire screen so that when anything changes, something like a "mini react" can find the characters that are likely dirty and draw only those lines (and the entire lines so that ligatures will render correctly)?
The text was updated successfully, but these errors were encountered:
The current implementation with canvas was partially from Vim.js, another project of mine, and partially for performance concerns. And of course it'd be easier to support ligatures with html tags.
I think your "redrawing dirty lines" idea should work, but we need to keep track of the content on screen that way.
Each line may have multiple colors/weight. Does that complicate things? I think we'd want to redraw dirty "ranges" of contiguous color/weight. Either way, having an intermediate representation seems very useful. I'd urge you to avoid using the DOM at all and I commend your choice of canvas (GL is a great option too).
I took a look at
ui.coffee
and it seems like supporting ligatures would be within reach. Ligatures are great because modern programming fonts are beginning to include support for awesome symbols for functional languages etc.:For example, see https://github.com/tonsky/FiraCode
It looks like the canvas drawText API that you're using supports ligatures but it merely requires that you draw the two/three characters in one call to
drawText
. I saw thatneovim-e
draws one character at a time, however.Should there be some intermediate representation that
neovim-e
keeps track of instead of just executing raw single character draw/put commands? Couldneovim-e
maintain an up to date representation of the entire screen so that when anything changes, something like a "mini react" can find the characters that are likely dirty and draw only those lines (and the entire lines so that ligatures will render correctly)?The text was updated successfully, but these errors were encountered: