termonad
termonad copied to clipboard
Ligature support
Thanks for this project! What would be necessary for us to add ligature support to termonad? e.g. for the font PragmataPro
@bts I'm not very familiar with ligature support, or how it is handled in the Gnome ecosystem.
Termonad is using the VTE library, which is a terminal emulator from the Gnome team exposed as a GTK widget.
The Terminal
from the VTE library exposes a method to set a FontDescription
for the terminal:
https://hackage.haskell.org/package/gi-vte-2.91.19/docs/GI-Vte-Objects-Terminal.html#g:87
This method is called by Termonad when creating a new Terminal
:
https://github.com/cdepillabout/termonad/blob/2588524cfb44ce0d1542decb022a40921ad55f63/src/Termonad/Term.hs#L303
The FontDescription
in question is created here:
https://github.com/cdepillabout/termonad/blob/2588524cfb44ce0d1542decb022a40921ad55f63/src/Termonad/App.hs#L152-L162
A FontDescription
itself is defined in the pango library. I think pango is the Gnome library dealing with fonts:
https://hackage.haskell.org/package/gi-pango-1.0.16/docs/GI-Pango-Structs-FontDescription.html#t:FontDescription
I'm not sure if adding ligature support would be an option to pass to the FontDescription
when creating it, or if it is an option that would have to be set on the Terminal
itself (or the underlying widget?). It is also possible that ligature support is a feature that is not supported in VTE. (In that case I would suggest creating an issue on the VTE issue tracker.)
If you wanted to spend some time to look into this, I would suggest the following:
- Read through the documentation for gi-vte, gi-gtk, and gi-pango trying to figure out if there are any functions / datatypes dealing with ligature support.
- Do a google search for something like "vte ligature support" or "gtk font ligature" and see if anything good comes up.
If you find some pango or gtk functions that looks promising, but aren't sure how to implement them in Termonad, feel free to post here.
@cdepillabout Thanks for your response! Unfortunately it seems like VTE does not currently support ligatures: https://bugzilla.gnome.org/show_bug.cgi?id=781597#c10
@bts Ah, that's unfortunate :-\
I guess I would still suggest opening an issue on the VTE issue tracker (and then posting a link here). At the very least it would let the VTE team know that some people are interested in ligature support in VTE.
There does appear to be an issue on the VTE issue tracker about ligature support, but it doesn't appear to have any progress: https://gitlab.gnome.org/GNOME/vte/-/issues/192