emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Ligatures


From: Stefan Monnier
Subject: Re: Ligatures
Date: Mon, 18 May 2020 13:05:53 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

[ I know nothing about the underlying APIs and such, so speaking here
  only as a random user.  ]

> On second thought, I think I misunderstood you.  If the font that is
> used shows "ffi" as a _single_ glyph ffi, and LibreOffice indeed
> highlights parts of this glyph, then I'd like to know how it does
> that, and how far does this capability extend.  I mean, what does it
> do with ligatures like ae, displayed as æ -- does it highlight the
> common vertical stroke for both parts?  And what about "st", displayed
> as st -- this has a curved "hand" connecting s and t -- to which of the
> 2 does it belong for the purposes of highlighting?

As a mere user I wouldn't care very much about this detail: I'd just
want the cursor to have 2 different positions depending on whether I'm
on the "s" or on the "t", and hopefully those two positions are
sufficiently self-evident that I don't have to read a manual to
understand which is which.

So, maybe we don't need very much info: all we need is a boolean which
tells us whether the glyph should be treated atomically or not.
When not treating it atomically, we would (somewhat arbitrarily) divide
the glyph horizontally into N equal sized "subglyphs" and draw the
cursor on the corresponding subglyph.

If Harfbuzz could tell us more precisely how to divide the glyph into
subglyphs, we could do a better job, of course.


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]