On 4/28/2020 1:59 PM, Joey McCollum wrote:
\definefontfeature[f:pointedhebrew][default][
     ccmp=yes,
     mark=yes,
     script=hebr
]
\definefontfamily[hebrew] [rm] [SBL Hebrew] [features=f:pointedhebrew]
%Set the body font:
\setupbodyfont[hebrew]
%Set up right-to-left alignment:
\setupalign[r2l]
\starttext
    %Characters after normalization, in Unicode canonical order (bet + segol + dagesh + final nun):
     בֶּן

    %A word with characters in typographically recommended order (bet + dagesh + segol + final nun):
     בֶּן
\stoptext

\startluacode
    fonts.handlers.otf.addfeature {
        name    = "normalizehebrew",
        type    = "chainsubstitution",
        prepend = 1,
        lookups = {
            {
                type = "multiple",
                data = {
                    [0x5B6] = { 0x5BC, 0x5B6 },
                },
            },
        },
        data = {
            rules = {
                {
                    current = { { 0x5B6 }, { 0x5BC } },
                    lookups = { 1, 0 },
                },
            },
        },
    }
\stopluacode

\definefontfeature
  [f:pointedhebrew]
  [hebrew]
  [normalizehebrew=yes]

\definefontfamily[hebrew] [rm] [SBL Hebrew] [features=f:pointedhebrew]

\setupbodyfont[hebrew]

\setupalign[r2l]

\starttext
    בֶּן \quad בֶּן \par
\stoptext

How many such reorderings are there? (I saw some document about that font and it sounds like a bit messy wrt all these input variants.)

(there are several mechanisms in context to deal with such issues, it's all about getting specs from users i.e. tex is all about control so in principle it should be doable)

Hans

-----------------------------------------------------------------
                                          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