On 26 May 2016 at 18:17, Hans Hagen wrote:
On 5/26/2016 2:48 PM, Mojca Miklavec wrote:
Nevertheless this doesn't entirely solve the problem. I now have a problem with the following:
\catcode`č=\active \defč{\buildtextaccent\textcaron c}
doesn't the compose=yes feature work?
I'm sorry, compose=yes works as expected (I was copy pasting some old code and forgot about the later improvements in ConTeXt: shame on me).
so let's give you another piece
\startluacode fonts.handlers.otf.addfeature { name = "mojca", type = "multiple", prepend = true, data = { ["č"] = { 0x30C, "c" }, } } fonts.handlers.otf.addfeature { name = "kern", type = "pair", data = { [0x30C] = { c = { { 500, 0, 0, 0 }, false } }, } } \stopluacode
\definefontfeature[default][default][mojca=yes]
\showframe
\starttext
mojča miklave\utfchar{"30C}c
\stoptext
(actually it uncovered a buglet but i suppose the č never is the first char so ...)
But the code above doesn't seem to work (I don't get the letter "č" printed out at all). I would prefer the approach with more fine-tuning though because "č" is always misaligned. And I seem to remember that this functionality has been in the core for a long time already, I just again forgot about it because most fonts include the full charset nowadays. Mojca