On 2/23/2017 4:12 PM, Ulrike Fischer wrote:
Am Thu, 23 Feb 2017 14:08:54 +0100 schrieb Hans Hagen:

Did you sent the second mail only for me for a reason or did you
only forget to add the list? Imho this is interesting for others
too.

well, it had an attachment that you can test which is not meant for
context (to which i'll add a similar collapse feature, off by default of
course as an escape) .. if that kind of stuff makes it into the latex
font code is up to others

I looked at the code and it actually uses an idea that I had already
tried. The problem I couldn't solve was do decompose a glyph.
Looking at an context example it seems that context can do it. The B
with dot below (U+1E04) ends as BU+0323 in the pdf. But how does
context does it? It doesn't happen with a similar latex example.
There the U+1E04 is simply missing.

And why is the dot of the first B better placed than the second?


\starttext
\directlua
{
  fonts.handlers.otf.addfeature
  {
    name = "compose",
    type = "ligature",
    data =
        {
          ["Ạ"]={ "A", "̣" },
          ["Ḅ"]={ "B", "̣" },
        },
  }
}

\font\test={file:lmroman10-regular.otf:+compose;}

\test

Ḅ Ạ Ḅ %why are both B in the pdf???

\stoptext

it's not a ligature but a multiple

fonts.handlers.otf.addfeature
  {
    name    = "decompose",
    type    = "multiple",
    nocheck = true, -- new trick
    data    =
        {
          ["Ḅ"] = { "Q", "̣" },
          ["Ạ"] = { "X", "̣" },
        },
  }

as with all features we check against the font so of the font has no Ḅ
nothing happens and you won't see one either (as the font has no)

i'll add the nocheck option (but of course one can expect side effects when a font has nothing relevant)


-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
       tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to