ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Henri Menke <henrimenke@gmail.com>
To: ntg-context@ntg.nl
Subject: Re: Adjust kerning with superscript
Date: Mon, 15 Apr 2019 21:23:51 +1200	[thread overview]
Message-ID: <6713e9cb-df63-8533-5000-ee3d0b032d75@gmail.com> (raw)
In-Reply-To: <d1375534-d8a0-f399-cddd-56ae3bb123c8@xs4all.nl>



On 15/04/19 9:06 PM, Hans Hagen wrote:
> On 4/15/2019 9:50 AM, Henri Menke wrote:
>> Dear list,
>>
>> I am unhappy with how some fonts kern particular subscripts.  For example in
>> the default Latin Modern, subscripts to the Greek capital gamma could use some
>> negative kerning.  Because I can't (and don't want to) fix the font, I thought
>> that I could patch the font on-the-fly in ConTeXt.
>>
>> The usual approach with fonts.handlers.otf.addfeature works well in math mode,
>> but does not extend into subscripts (MWE below).  Is there a method to adjust
>> subscript kernings?  Could this be done using mathkerns?  Latin Modern doesn't
>> have any but maybe they can be added on the fly.
>>
>> Cheers, Henri
>>
>> ---
>>
>> \startluacode
>> fonts.handlers.otf.addfeature {
>>      type = "kern",
>>      name = "kern",
>>      data = { [0x0393] = { [0x0030] = -200 } }
>> }
>> \stopluacode
>>
>> \setupbodyfont[modern]
>>
>> \starttext
>> $\Gamma0$ % works fine :)
>>
>> $\Gamma_0$ % doesn't work :(
>> \stoptext
> see pagella-math.lfg

Thanks for the hint.  Is there a possibility to do this without goodies?  They
are not available in generic.

Cheers, Henri

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

___________________________________________________________________________________
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-04-15  9:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-15  7:50 Henri Menke
2019-04-15  9:06 ` Hans Hagen
2019-04-15  9:23   ` Henri Menke [this message]
2019-04-15  9:48     ` Hans Hagen

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=6713e9cb-df63-8533-5000-ee3d0b032d75@gmail.com \
    --to=henrimenke@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).