ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Rik Kabel <ConTeXt@rik.users.panix.com>
To: Hans Hagen <j.hagen@xs4all.nl>,
	mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Adjust kern for one character
Date: Thu, 26 Dec 2019 09:34:07 -0500	[thread overview]
Message-ID: <0fd62633-13d4-1769-5b9a-c9bf5c66c459@rik.users.panix.com> (raw)
In-Reply-To: <03030cf6-1aa6-56de-aded-6ad5c6b1b74f@xs4all.nl>


On 12/26/2019 08:40, Hans Hagen wrote:
> On 12/26/2019 1:41 PM, Rik Kabel wrote:
>
>> Okay, I have progressed further but have run into something (else) I 
>> cannot understand. Consider the following example:
>>
>>     \definefontfeature   [myserif] [mode=node,kern=yes,xkern=yes]
>>     \definefontfeature   [mysans]  [mode=node,kern=yes,xkern=no]
>>     \definefontfeature   [none]    [mode=node]
>>     \definefontfamily    [mykerns] [serif] [Baskervaldx] 
>> [features=myserif]
>>     \definefontfamily    [mykerns] [sans]  [Dejavusans] 
>> [features=mysans]
>>     \definefontfamily    [default] [serif] [Baskervaldx] 
>> [features=default]
>>     \definefontfamily    [default] [sans]  [Dejavusans] 
>> [features=default]
>>     \definefontfamily    [nokerns] [serif] [Baskervaldx] [features=none]
>>     \definefontfamily    [nokerns] [sans]  [Dejavusans] [features=none]
>>     \definefontfamily    [legends] [mono]  [Dejavusansmono] 
>> [features=default]
>>
>>     \startluacode
>>        fonts.handlers.otf.addfeature {
>>            name = "kern",
>>            type = "kern",
>>            data = {
>>                ["x"] = { ["x"] = -300 },
>>                [" "] = { ["A"] = 1000 }
>>            }
>>        }
>>        fonts.handlers.otf.addfeature {
>>            name = "xkern",
>>            type = "kern",
>>            data = {
>>                ["x"] = { ["x"] = 500 },
>>                [" "] = { ["J"] = 500 }
>>            }
>>        }
>>     \stopluacode
>>
>>     \startbuffer[Sample]
>>        g, Jaxxb AJon
>>     \stopbuffer
>>
>>     \define[2]\Test{
>>        {\switchtobodyfont[#1]#2\getbuffer[Sample]}}
>>
>>     \setupbodyfont[legends]
>>
>>     \starttext
>>     \starttabulate[|l|l|l|]
>>     \NC test     \NC  Serif                \NC Sans                 
>> \NC \NR
>>     \NC nokerns  \NC  \Test{nokerns}{\tf}  \NC \Test{nokerns}{\ss}  
>> \NC \NR
>>     \NC default  \NC  \Test{default}{\tf}  \NC \Test{default}{\ss}  
>> \NC \NR
>>     \NC mykerns  \NC  \Test{mykerns}{\tf}  \NC \Test{mykerns}{\ss}  
>> \NC \NR
>>     \stoptabulate
>>     \stoptext
>>
>> It shows, as far as I see, that the kern feature type supports " ", 
>> but only when it is named kern. When it is named xkern, as here, it 
>> does not support spaces, but does support other characters.
> Indeed it's currently bound to 'kern' (mostly for convenience and a 
> little for performance) but it's not that hard to make it a bit more 
> flexible (but not today).
>
> Hans
>
Thank you for the confirmation. I look forward to the update.

-- 
Rik

___________________________________________________________________________________
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	other threads:[~2019-12-26 14:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-22 21:19 Rik Kabel
2019-12-22 21:28 ` Henri Menke
2019-12-23  9:13   ` Mojca Miklavec
2019-12-23  9:31     ` Hans Hagen
2019-12-22 22:40 ` mf
2019-12-23  1:30   ` Rik Kabel
2019-12-23  2:33     ` Henri Menke
2019-12-23  2:34       ` Henri Menke
2019-12-23 23:45         ` Rik Kabel
2019-12-26 12:41           ` Rik Kabel
2019-12-26 13:40             ` Hans Hagen
2019-12-26 14:34               ` Rik Kabel [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=0fd62633-13d4-1769-5b9a-c9bf5c66c459@rik.users.panix.com \
    --to=context@rik.users.panix.com \
    --cc=j.hagen@xs4all.nl \
    --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).