On 18/05/2020 19:31, Clément Pit-Claudel wrote: > On 18/05/2020 12.08, Eli Zaretskii wrote: >> 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? There's also "hv" >> displayed as ƕ, let alone "fs" displayed as ẞ and "fz" displayed as >> ß. > I've attached a screenshot with a few examples, though I couldn't find a font that displays ae as æ. > > Firefox does the same as LibreOffice (try it here, for example: https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-ligatures). Since Firefox uses Harbuzz, I think there's a good chance we can support that feature too :) For what it's worth, LibreOffice does it differently. I think what it does is place the cursor on the position it would be if any following text was missing. So moving after the second f in ffi would move the cursor to the same position as after ff if the i was missing. This is evident from fraction ligatures; in the screenshot I'm attaching, "63" is selected and the selection matches the 63 in the bottom line.