* [NTG-context] Fwd: Kerning feature not working
[not found] <124e4572-c4ae-0272-2416-511a6b9329d0@xs4all.nl>
@ 2023-08-30 20:18 ` Hans Hagen
0 siblings, 0 replies; only message in thread
From: Hans Hagen @ 2023-08-30 20:18 UTC (permalink / raw)
To: mailing list for ConTeXt users
-------- Forwarded Message --------
Subject: Re: [NTG-context] Kerning feature not working
Date: Wed, 30 Aug 2023 22:17:43 +0200
From: Hans Hagen <j.hagen@xs4all.nl>
To: Marcus Vinicius Mesquita <marcusvinicius.mesquita@gmail.com>
On 8/30/2023 9:37 PM, Marcus Vinicius Mesquita wrote:
> Dear List
>
> In the MWE below, the kerning feature works OK for ebgaramonditalic
> but not for ebgaramondregular.
> How do I fix it?
>
> I'm using ConTeXt version: 2023.08.27 13:48
>
>
> \startluacode
> fonts.handlers.otf.addfeature {
> name = "kernit",
> type = "kern",
> nocheck = true,
> data = {
> [0x27E8] = { ["f"] = 300, ["fi"] = 300, ["fl"] = 300 }
> }
> }
> \stopluacode
you need to know the code points and eb garamond is not so predictable
(welcome to fonts ...)
\startluacode
fonts.handlers.otf.addfeature {
name = "kernit",
type = "kern",
nocheck = true,
data = {
[0x27E8] = {
["f"] = 300,
["f_l"] = 300,
["f_i"] = 300,
[0xFB01] = 300,
[0xFB02] = 300,
}
}
}
\stopluacode
> \definefontfeature[kernit][mode=node,kernit=yes]
>
> \starttext
> \definedfont[name:ebgaramondregular*default,kernit]
>
> ⟨f ile
>
> ⟨f lame
>
> ⟨file
>
> ⟨flame
>
> \definedfont[name:ebgaramonditalic*default,kernit]
>
> ⟨f ile
>
> ⟨f lame
>
> ⟨file
>
> ⟨flame
>
> \stoptext
but easier is this (an old mechanism, maybe time for an upgrade with
merged vectors)
\definecharacterspacing [myspacing]
\setupcharacterspacing [myspacing] ["27E8] [right=0.25,alternative=1]
\setupcharacterspacing [myspacing] ["27E9] [left=0.25,alternative=1]
and then
\setcharacterspacing[myspacing]
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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage : https://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-08-30 20:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <124e4572-c4ae-0272-2416-511a6b9329d0@xs4all.nl>
2023-08-30 20:18 ` [NTG-context] Fwd: Kerning feature not working Hans Hagen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox