Ligature caret

JanekZ's picture

I have a text with some ligatures. When I try to delete a part of a ligature strange things happen (all samples in InDesign 5, font EB Garamond OTF/CFF by Georg Duffner):
1. Ligature longs_longs_t. I want to delete the "t" character; placed the cursor after "t" and hit 'backspace'. Unluckily ALL my ligature disappeared!
2. Ligature f_f. I did the same and magically ONLY second"f" disappeared. What a confusion.
Printscreen 1

Printscreen 2

I found some info: :
"Some word processors will allow the editing caret to be placed inside a ligature (with a caret position between each component of the ligature). This means that the user of that word processor does not need to know s/he is dealing with a ligature and sees behavior very similar to what s/he would see if the components were present. But if the word processor is to be able to do this it must have some information from the font designer giving the locations of appropriate caret positions."
Let's try to select a character in our ligatures:
Printscreen 3

Printscreen 4

It looks like "f_f" have "ligature caret' information, "longs_longs_t" have not.
Printscreen 5

So it is up to font designer. For example Luc[as] writes:
Some remarks?

ChristTrekker's picture

I recently contributed some ligature characters to EBG. I think I remembered to set the ligature caret in all of them. I'll probably be double checking as soon as I post this. ☺

Grzegorz Rolek's picture

But if the word processor is to be able to [place the editing caret inside a ligature] it must have some information from the font designer giving the locations of appropriate caret positions.

Not necessarily. In case any particular ligature is missing caret placement data, text shapers usually divide the ligature’s advance width between the number of its character components and use that as the caret positions. It’s not some heuristics but a mere equal division, so obviously this doesn’t always work well. Still, it’s better than nothing, especially when it’s so rare for a font to have any ligature caret data at all. HarfBuzz, as far as I know, does this, so does CoreText. Not sure about others.

John Hudson's picture

If a single backspace is deleting the entire 'longs_longs_t' ligature, that suggests to me that something other than the underlying three-letter character codes was stored in the text: either a PUA codepoint or possible a raw GID. This could depend on how the ligature was input in the first place.

JanekZ's picture

Thank you very much.
John, you are right - I put 'longs_longs_t' via Glyphs window.
EB Garamond edited: 'longs_longs_t' with ligature caret:
Printscreen 6

InD 5: longs + longs + t ligatured:
Printscreen 7

As you can see InD ignores ligature caret info, splits are (probably) based on advance widths of underlying letters. What a pity that Adobe does not support the specification.

Syndicate content Syndicate content