I am using a specific static web app for my purposes, so I cannot switch environment and all functionality needs to be in the font.
I need to substitute many characters in certain contexts, so I am using contextual alternates.
It works fine until use a space character.
I can substitute the space, but no matter if it is replaced or not, it ruins the context; it does not understand that there are characters before the space character.
It works when I test it in other software, for example Photoshop.
Are there any workarounds for this, or just ideas on how I can make it work as expected?
I believe this is because the words are shaped individually so that the result can be reused across the webpage. Therefore, shaping cannot happen across word boundaries. This is a behavior of many web browsers and I don’t think it can be disabled.
I’m certain that you know more about shaping engines than I do, but shaping engines do give some level of control to the font, right? So might there be a way for the font to override this behaviour if there are some scenarios where the shaping engine doesn’t isolate words (maybe by tagging a certain script or language), or if the shaping engine allows some types of OpenType features to be applied before the words are isolated (maybe rvrn?).
If there are any possible hacks, it would be easier to find them after @mawns reveals which OS/web app/browser this is for.