From: mf via ntg-context <ntg-context@ntg.nl>
To: ntg-context@ntg.nl
Cc: mf <massifr@fastwebnet.it>
Subject: Re: modify kern between two glyphs
Date: Tue, 5 Apr 2022 15:29:07 +0200 [thread overview]
Message-ID: <a2f12fe9-aeb8-9c62-69c3-1f6d0d3d6459@fastwebnet.it> (raw)
In-Reply-To: <c2fc2ad2-e08b-0f1d-d016-91f7186c9d75@fastwebnet.it>
There's a problem with oldstyle glyphs, because they have different
codes inside a font.
I used fontforge to find the "four.oldstyle" glyph, whose code is 0xf734.
But then I discovered that the 'four.oldstyle' key works the same in the
lua table.
This is the updated MWE, suitable for oldstyle glyphs too.
--------------------------------------------------
\mainlanguage[it]
% modified from http://www.pragma-ade.com/context/latest/cont-tst.zip
% file: doc/context/tests/mkiv/fonts/extensions-001.tex
\startluacode
fonts.handlers.otf.addfeature {
name = "ktest",
type = "kern",
data = {
[ '’' ] = {
[ '4' ] = -100,
[ 0xf734 ] = -150, -- four.oldstyle code
-- [ 'four.oldstyle' ] = -150, -- this is the same as the
previous line
},
}
}
\stopluacode
\definefontfeature[ktest][ktest=yes]
\definefontfeature[onum][onum=yes]
\starttext
Default: «Questo è successo nel ’48».
Desired: «Questo è successo nel ’\kern-.1em 48».
Solved: \feature[+][ktest]«Questo è successo nel ’48».
Onum: \feature[+][onum]«Questo è successo nel ’48».
\stoptext
--------------------------------------------------
Massi
___________________________________________________________________________________
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
___________________________________________________________________________________
prev parent reply other threads:[~2022-04-05 13:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-05 11:02 mf via ntg-context
2022-04-05 11:15 ` Thomas A. Schmitz via ntg-context
2022-04-05 11:45 ` mf via ntg-context
2022-04-05 11:54 ` Hans Hagen via ntg-context
2022-04-05 12:34 ` mf via ntg-context
2022-04-05 13:29 ` mf via ntg-context [this message]
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=a2f12fe9-aeb8-9c62-69c3-1f6d0d3d6459@fastwebnet.it \
--to=ntg-context@ntg.nl \
--cc=massifr@fastwebnet.it \
/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).