Hi,

is there an already existing option to reduce umlauts etc. to ascii counterparts, e.g.

    \starttext
    Füße
    \stoptext

results in

    Fusse


The fonts manual gives an example for a font feature with the desired output but it's possible I missed something or there is a better solution.


\startluacode

local shapedcodes = { }

for k, v in next, characters.data do
    local s = v.shcode
    if s then
        if type(s) == "number" then
            shapedcodes[utf.char(k)] = { utf.char(s) }
        elseif #s == 2 then
            shapedcodes[utf.char(k)] = { utf.char(s[1]), utf.char(s[2]) }
        end
    end
end

fonts.handlers.otf.addfeature {
    name = "simplify",
    type = "multiple",
    data = shapedcodes,
}

\stopluacode

\definefontfeature [simplify] [simplify=yes]

\starttext
Füße \feature[+][simplify]Füße
\stoptext


Wolfgang

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

Reply via email to