* [NTG-context] Remove umlauts etc. from input
@ 2024-11-24 12:53 Wolfgang Schuster
0 siblings, 0 replies; only message in thread
From: Wolfgang Schuster @ 2024-11-24 12:53 UTC (permalink / raw)
To: ConTeXt Mailing list
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-11-24 12:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-24 12:53 [NTG-context] Remove umlauts etc. from input Wolfgang Schuster
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).