From: Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>
To: ConTeXt Mailing list <ntg-context@ntg.nl>
Subject: [NTG-context] Remove umlauts etc. from input
Date: Sun, 24 Nov 2024 13:53:25 +0100 [thread overview]
Message-ID: <7951afd3-530b-b693-3881-4b34aeee0449@gmail.com> (raw)
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 other threads:[~2024-11-24 12:57 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7951afd3-530b-b693-3881-4b34aeee0449@gmail.com \
--to=wolfgang.schuster.lists@gmail.com \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).