From: Hans Hagen <pragma@wxs.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Incorrect math kerning
Date: Mon, 30 May 2016 09:35:25 +0200 [thread overview]
Message-ID: <ab348181-5740-f907-cf89-5bde98b757fd@wxs.nl> (raw)
In-Reply-To: <alpine.OSX.2.02.1605292348070.14867@nqv-znpobbx>
On 5/30/2016 5:50 AM, Aditya Mahajan wrote:
> Hi,
>
> This is based on a question about latex on tex.stackexchange:
> http://tex.stackexchange.com/q/312098/323
>
> but context shows the same behaviour.
>
> The subscript "i" in the following example is kerned incorrectly (it is
> too far away from W). Is this a bug in the font, or with the fontloader?
>
> \setupbodyfont[cambria]
>
> \starttext
>
> \startTEXpage[offset=2mm]
> $W_i^i$
> \stopTEXpage
>
> \stoptext
In traditional TeX fonts italic correction is used as a kind of kerning.
This happens in combination with cheating with the width of glyphs. This
is somewhat reflected in the lm fonts (with some inconsistencies between
for instance V and W ... we're currently discussing this). So, a way to
force a subscript towards the shape is to use less width, and then use
italic correction to move the superscript the other way. Of course this
kind of kerning is a bit of a cheat and not related to italic shape
(some upright characters also have italic corrections).
In cambria staircase kerns are used for this but they are not defined
for all (base) characters. The gyre fonts don't cheat on the width.
\starttext
\startTEXpage[offset=2mm]
\startcombination[2*2]
{\hbox to 40pt{\hss\showboxes\switchtobodyfont
[modern]$W_i^i$\hss}} {\infofont modern}
{\hbox to 40pt{\hss\showboxes\switchtobodyfont
[cambria]$W_i^i$\hss}} {\infofont cambria}
{\hbox to
40pt{\hss\showboxes\switchtobodyfont[lucidaot]$W_i^i$\hss}} {\infofont
lucida}
{\hbox to 40pt{\hss\showboxes\switchtobodyfont
[pagella]$W_i^i$\hss}} {\infofont pagella}
\stopcombination
\stopTEXpage
\stoptext
Once the math fonts are stable and frozen I'll come up with a solution
(in ConTeXt) for this. Luatex < 0.85 had a mixed code path for dealing
with italics (adding them always and removing them selectively) but as
the standard is not more explicit about where to apply italic correction
these code paths have been separated.
In ConTeXt we had some italic correction juggling (basically i disabled
passing them to the engine and applied them selectively) but because lm
/ rest of ot is not consistent it never was satisfying.
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.com | 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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2016-05-30 7:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-30 3:50 Aditya Mahajan
2016-05-30 7:35 ` Hans Hagen [this message]
2016-05-30 14:56 ` Ulrike Fischer
2016-05-30 16:01 ` Hans Hagen
2016-05-30 17:08 ` 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=ab348181-5740-f907-cf89-5bde98b757fd@wxs.nl \
--to=pragma@wxs.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).