On 12/23/19 3:33 PM, Henri Menke wrote:
On 12/23/19 2:30 PM, Rik Kabel wrote:

On 12/22/2019 17:40, mf wrote:
Il 22/12/19 22:19, Rik Kabel ha scritto:
List,

Is there a way in ConTeXt to adjust the left-side kern for one
character? The cap J in the font I am using is being set too close to
the preceding characters and I would rather not insert a thinspace
before each. (Inserting a thinspace is sufficient, but finer control
is welcome.)

\definecharacterspacing[distantJ]
\setupcharacterspacing[distantJ]["004A][left=.15,alternative=1] % 004A
is the unicode hex index of letter J
\starttext
    normal: AJB\par
    \setcharacterspacing[distantJ] more space on the left: AJB\par
    \resetcharacterspacing normal again: AJB\par
\stoptext

Thank you for that, Massi.

Unfortunately, that is too blunt an instrument in this case -- in
addition to the body font where the problem exists, it works on the
heading and titling font, which does not share the problem.

As Henri's answer hints, I was a bit unclear in my request. It is a kern
between a word space and the cap J that is the issue. Perhaps a font
feature file is the place to do such a thing.

\startluacode
fonts.handlers.otf.addfeature {
      name = "kern",
      type = "kern",
      data = {
          [" "] = {
              ["J"] = 1000 % exaggerated value

Should of course be a Lua comment

            ["J"] = 1000 -- exaggerated value

          }
      }
}
\stopluacode

\setupbodyfont[modern] % have to reload the font

\starttext

No Jokes!

\stoptext

___________________________________________________________________________________
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
___________________________________________________________________________________

Reply via email to