From: Hans Hagen <pragma@wxs.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>,
"Mikael P. Sundqvist" <mickep@gmail.com>
Subject: Re: Kerning between primes and left parenthesis (again)
Date: Mon, 31 Jul 2017 21:15:51 +0200 [thread overview]
Message-ID: <ae45eb65-6ca3-7dc2-a1cf-9d92875a6965@wxs.nl> (raw)
In-Reply-To: <CAHy-LL_RBOAFPJ5cAC6shyrYwr+JqgLiwQZt31VOeyTfV1EpJQ@mail.gmail.com>
On 7/31/2017 8:02 PM, Mikael P. Sundqvist wrote:
> On Mon, Jul 31, 2017 at 5:37 PM, Hans Hagen <pragma@wxs.nl> wrote:
>> On 7/31/2017 11:21 AM, Mikael P. Sundqvist wrote:
>>>
>>> On Thu, Jul 20, 2017 at 2:53 PM, Hans Hagen <pragma@wxs.nl> wrote:
>>>>
>>>> On 7/20/2017 7:18 AM, Mikael P. Sundqvist wrote:
>>>>
>>>>> Den 12 juli 2017 10:17 fm skrev "Mikael P. Sundqvist" <mickep@gmail.com
>>>>> <mailto:mickep@gmail.com>>:
>>>>>
>>>>> Dear Hans,
>>>>>
>>>>> now, in luatex 1.05, that the primes are "constructed" in new
>>>>> manner,
>>>>> I wonder if there is a way to specify in a goodie file the kerning
>>>>> between characters, in particular primes and the left parenthesis?
>>>>>
>>>>> I tried
>>>>>
>>>>> kernpairs = {
>>>>> [0x2032] = {[0x0028] = -1000, }, -- prime and (
>>>>> },
>>>>>
>>>>> but that does not seem to have any effect.
>>>>>
>>>>> The pre-1.05 modification
>>>>>
>>>>> dimensions = {
>>>>> default = {
>>>>> [0x2044] = { xoffset = 275, width = 600 },
>>>>> [0x2032] = { xoffset = 50, width = 290 }, -- prime
>>>>> [0x2033] = { xoffset = 50, width = 690 }, --
>>>>> double
>>>>> prime
>>>>> [0x2034] = { xoffset = 50, width = 1090}, --
>>>>> triple
>>>>> prime
>>>>> [0x2057] = { xoffset = 50, width = 1490}, --
>>>>> quadruple prime
>>>>> },
>>>>> },
>>>>>
>>>>> (which is a non-optimal way of solving this issue since it has side
>>>>> effects) does not change anything anymore.
>>>>>
>>>>> So, is there now a way to do this cleanly now that the mechanism is
>>>>> changed?
>>>>>
>>>>> /Mikael
>>>>>
>>>>>
>>>>> Hi,
>>>>>
>>>>> should I interpret the silence that this is currently not possible, or
>>>>> that you, Hans, is completely fed up with this subject? :-)
>>>>
>>>>
>>>> you rule out the possibility that i have other things to do
>>>>
>>>> anyway, use
>>>>
>>>> 0xFE932
>>>>
>>>> etc instead as primes get remapped
>>>>
>>>> -----------------------------------------------------------------
>>>> 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
>>>>
>>>> ___________________________________________________________________________________
>>>
>>>
>>> I'm sorry but I cannot get it to work.
>>>
>>> %%% my local lucida-opentype-math.lfg, located in the same directory
>>> as the tex file (and loaded)
>>> ----- kern_250 = { bottomright = { { kern = -250 } }, force = true }
>>>
>>> local function FixRadicalDisplayStyleVerticalGap(value,target,original)
>>> local o = original.mathparameters.RadicalVerticalGap -- 50
>>> return 2 * o * target.parameters.factor
>>> end
>>>
>>> return {
>>> name = "lucida-opentype-math",
>>> version = "1.00",
>>> comment = "Goodies that complement lucida opentype.",
>>> author = "Hans Hagen",
>>> copyright = "ConTeXt development team",
>>> mathematics = {
>>> parameters = {
>>> RadicalDisplayStyleVerticalGap =
>>> FixRadicalDisplayStyleVerticalGap,
>>> },
>>> kernpairs = {
>>> [0x1D44E] = {[0x1D44F] = 1000,}, -- 𝑎𝑏 demo
>>> [0xFE932] = {[0x0028] = 1000,} -- remapped prime and (
>>> },
>>> }
>>> }
>>> %%%
>>>
>>> %%% the tex file
>>> \setupbodyfont[lucidaot]
>>> \setupmathematics[kernpairs=yes]
>>>
>>> \starttext
>>> $f'(x)ab$
>>> \stoptext
>>> %%%
>>>
>>> The result is attached. It works ok for the pair ab, but not for prime
>>> and (. Is the ( also remapped (while greping for it in the source, I
>>> could not find any clue).
>>>
>>> Maybe it is better to ping the maintainers of the font?
>>
>> just change the dimensions
>>
>> dimensions = {
>> default = { -- experimental values
>> [0x2044] = { xoffset = 275, width = 600 },
>> -- [0x2032] = { yoffset = -10 },
>> [0xFE932] = { width = 200 },
>> [0xFE933] = { width = 500 },
>> [0xFE934] = { width = 800 },
>> },
>> },
>>
>>
>>
>> -----------------------------------------------------------------
>> 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
>> ___________________________________________________________________________________
>
> Dear Hans,
>
> thank you, that solution worked well! May I suggest to add something like
>
> dimensions = {
> default = {
> [0xFE932] = { width = 150 }, -- prime
> [0xFE933] = { width = 435 }, -- double prime
> [0xFE934] = { width = 720 }, -- triple prime
> [0xFE957] = { width = 1005 }, -- quadruple prime
> },
> },
>
> (or the values 200, 500, 800, 1100 if you prefer) to the font goodie
> file for lucida in the distribution?
too narrow might clash with superscripts .. did you do more tests than
the ( ?
there are also reverse primes
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 / 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
___________________________________________________________________________________
next prev parent reply other threads:[~2017-07-31 19:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-12 8:17 Mikael P. Sundqvist
2017-07-20 5:18 ` Mikael P. Sundqvist
2017-07-20 12:53 ` Hans Hagen
2017-07-31 9:21 ` Mikael P. Sundqvist
2017-07-31 15:37 ` Hans Hagen
2017-07-31 18:02 ` Mikael P. Sundqvist
2017-07-31 19:15 ` Hans Hagen [this message]
2017-07-31 19:27 ` Mikael P. Sundqvist
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=ae45eb65-6ca3-7dc2-a1cf-9d92875a6965@wxs.nl \
--to=pragma@wxs.nl \
--cc=mickep@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).