On 24 Dec 2021, at 18:34, Thomas Savary via ntg-context
wrote: Hello, dear list !
In order to fix a few bugs in some OpenType features included in EB Garamond font provided by Google Fonts, I am trying to remove some ligatures (erroneous in some contexts) with fonts.handlers.otf.addfeature.
I must be missing something, because I can't get it to work.
Here is a minimal —non working—example :-) (The attempted removal (“f_i” → “fi” only before “o”) is of course irrelevant. I chose it just for the sole purpose of this test, to provide a simple example. What I am trying to achieve is more complex, with other ligatures.)
fonts.handlers.otf.addfeature{ name = "unfio", type = "chainsubstitution", lookups = { { type = "multiple", data = { [ "f_i" ] = { "f", "i" } } } } rules = { { after = { { "o" } }, current = { { "f_i" } }, lookups = { 1 } } } } }
Could someone please explain to me what I did wrong ?
Firstly, you have an extra } in the example above. Secondly, rules need to come inside a data section. Thus (untested): fonts.handlers.otf.addfeature{ name = "unfio", type = "chainsubstitution", lookups = { { type = "substitution", data = { [ "f_i" ] = { "f", "i" } } } }, data = { rules = { { after = { { "o" } }, current = { { "f_i" } }, lookups = { 1 } } } } } Regards, — Bruce Horrocks Hampshire, UK