URxvt font ligatures support ?

Любен karavelov at gmail.com
Fri Aug 21 02:38:23 CEST 2015

Hi Marc,

I remember reading somewhere that you had plans for creating a pango
backend for rxvt-unicode. Is it still the case? I think it may solve also
Raito's problem because it will handle the ligatures automatically. Though
it will need some attention, e.g. gedit is perfect at rendering text with
ligatures as you write but pangoterm is not so great.

Regarding the cell fonts: monoid and other similar fonts create variable
width ligatures that fit the space of non-ligature-d text , i.e. if you
write "->" it will be drawn as an arrow of 2 cells width and as a result it
will keep the text alignment.

About the of making/copying text, I have seen 2 cases. Konsole breaks the
ligature if part of it is marked, gedit does not break it. Both work as
expected - they copy only a part of the ligature's underlying text.


On Thu, Aug 13, 2015 at 3:57 PM, Marc Lehmann <schmorp at schmorp.de> wrote:

> On Thu, Aug 13, 2015 at 12:12:18PM +0000, Raito Bezarius <
> masterancpp at gmail.com> wrote:
> > Why can't we draw those multiple characters as one glyph and when we
> select
> > this one glyph, URxvt automatically _depack_ the glyph into multiple
> > characters ?
> Possibly, if they fit?
> > Finally, how Apple Terminal is able to support ligatures ?
> The same way as urxvt probably, both just draw the text, and the font
> engine will do ligatures. I'm pretty confident urxvt does ligatures if
> your font is a cell font (i.e. has the right size), because ligatures are
> automatic when rendering and apps don't have to d anything. It's just that
> urxvt doesn't guarantee it on e.g. refreshes, i.e. it might draw the "i"
> in an "fi" ligature separately.
> > > Feel free, if you think it can be done.
> > >
> > Can you just tell me at which files I should take a look or if I should
> pay
> > attention to particular things ?
> Since I don't really know what needs to be done, it's hard to say. First
> you
> should find out why your font doesn't draw ligatures already - most likely,
> your font isn't a cellfont so one glyph != one screen cell, in which case
> it
> probably can't be done because the font is unsuitable.
> Then you need to find a way to identify ligatures, I don't think Xft has
> an interface to that. If you have that, you need a fast way of identifying
> ligatures in text.
> Then you need to look at all font drawing calls in screen.C and rxvtfont.C,
> and adjust them so that ligatures are always included when drawn, i.e. when
> you draw "i", you need to step back to see ifd the previous character will
> form a ligture wiht it (e.g. "f") and draw "fi" in one go. Maybe there is a
> way to draw half ligatures, but I doubt it, and I doubt it will make things
> any simpler.
> I don't think you can make an unsuitable font work in ay way, though, so
> the whole effort might not work in the end.
> --
>                 The choice of a       Deliantra, the free code+content
>       -----==-     _GNU_              http://www.deliantra.net
>       ----==-- _       generation
>       ---==---(_)__  __ ____  __      Marc Lehmann
>       --==---/ / _ \/ // /\ \/ /      schmorp at schmorp.de
>       -=====/_/_//_/\_,_/ /_/\_\
> _______________________________________________
> rxvt-unicode mailing list
> rxvt-unicode at lists.schmorp.de
> http://lists.schmorp.de/mailman/listinfo/rxvt-unicode
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.schmorp.de/pipermail/rxvt-unicode/attachments/20150821/e6a78dd1/attachment.html>

More information about the rxvt-unicode mailing list