Arthur Reutenauer wrote:
Hello Thomas,
I was waiting for someone else to answer your questions because I had no clue how to address them even if I was interested; but now I do, thanks to Hans' reply:
For your general problem you need to define a new regime that will map each relevant character sequence to the corresponding Unicode character. That is, you inform ConTeXt that the character stream it sees is actually a way of coding another set of characters and that it can forget the original stream. This treatment should be done before any sort of font property intervenes, because it does not depend on the appearance of the typeset text. That's what regimes are for.
Yes, except that we need a more powerful version (almost like OTPs) if we want to handle transcriptions properly. The vital point is that it should operate on tokens, not on nodes. I am not sure if Hans already has a hook there that can be extended.
If you have a look at the attached greek-babel.tex (and the features definition file greek-babel.fea) you will see that (almost) everything is taken care of using Opentype substitutions. You need Bosporos and GFS Baskerville to compile the file; by the way, the line with GFS Baskerville is a further proof that you shouldn't handle the transformation at font level: can you explain why it doesn't work here?
Possibly because a single one of the glyphs has a different name in GFS Baskerville, or because a previous gsub rule has e.g. replaced F;i; => Fi; (your own gsub rules are always executed last, after everything defined by the font) As you say, .fea's are definately not the right way to handle this, even if they would work flawlessly.