Giter Site home page Giter Site logo

No Ligatures support about eovim HOT 10 CLOSED

jeanguyomarch avatar jeanguyomarch commented on June 23, 2024
No Ligatures support

from eovim.

Comments (10)

jeanguyomarch avatar jeanguyomarch commented on June 23, 2024 1

Yes indeed, it seems that eovim is currently broken with < 0.4.

from eovim.

jeanguyomarch avatar jeanguyomarch commented on June 23, 2024

I'm afraid that the GUI widget I'm using (evas textgrid) does not support ligatures :/

from eovim.

jeanguyomarch avatar jeanguyomarch commented on June 23, 2024

From what I understand of ligatures support, the editor should detect by itself pattern such as -> and seamlessly replace it with another text glyph (such as →) for the user to see. Since this is monospaced, the width of the new glyph shall be equal to the sum of the widths of the original pattern (so here, a total width of 2).
This is where evas textgrid gets in the way... it should be able to render (at most) double width characters, but it does not seem to actually be implemented... so it seems that every glyph is always represented with a width of 1...
Unfortunately, evas textgrid is a key component of eovim's UI... so it either needs in-depth patching in core EFL, or be replaced.

from eovim.

kalkin avatar kalkin commented on June 23, 2024

Thank you for response. I'm surprised that EFL doesn't provide ligature support in a text widget, I thought it uses harfbuzz, or is my understanding of the problem to shallow and I missed something?

from eovim.

jeanguyomarch avatar jeanguyomarch commented on June 23, 2024

The textgrid can display ligatures (what I understand are just different glyphs, that should span on multiple columns). However, it seems there is no support in the textgrid widget for multiple-width characters.

The textgrid causes each glyph to be rendered on exactly one cell, which causes large glyphs not to be of the appropriate size, and to be tiny. FOr example, in the image attached, you can see that the arrow that should ideally take two columns to "match" the width -> will alway uses only one column.

Screenshot from 2020-04-22 08-09-11

from eovim.

kalkin avatar kalkin commented on June 23, 2024

@jeanguyomarch
I think you are testing it wrong. The unicode sign is correctly only 1 char wide. You need to install some NerdFont variant i.e. fira-code. When using a specific font it will replace a '->' with an arrow which is actually two characters wide.

from eovim.

kalkin avatar kalkin commented on June 23, 2024

https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts/FiraCode

from eovim.

jeanguyomarch avatar jeanguyomarch commented on June 23, 2024

Maybe I'm missing something, but I've tried this with FiraCode, but it yields the same result. I do not think it is the font that makes the substitution. From what I've seen in projects that implement support for automatic ligatures replacement, such as terminal emulators or code editors, it requires explicit support from the program. Here, I think eovim should detect specific patterns such as -> to replace it by a prettier glyph, that the font provides.

My problem with the textgrid is that I cannot use it to render glyphs that span on more than one column, because unfortunately, it does not seem to be implemented. This would not be the first limitation of the textgrid, as it lacks "undercurl" for example.

from eovim.

jeanguyomarch avatar jeanguyomarch commented on June 23, 2024

For details, there is also now a dedicated wiki page

from eovim.

kalkin avatar kalkin commented on June 23, 2024

@jeanguyomarch Awesome. Thank you for putting work in to it.

Do I need neovim >4 to use the current HEAD?

from eovim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.