ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Andreas Harder <andreas.harder@rz-online.de>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: $n\choose k$-issue with OpenType math fonts
Date: Sun, 13 Mar 2011 15:01:42 +0100	[thread overview]
Message-ID: <41F8B081-EC7A-42C0-9BA6-FCA126BFB887@rz-online.de> (raw)
In-Reply-To: <4D739B34.4050206@wxs.nl>

[-- Attachment #1: Type: text/plain, Size: 778 bytes --]

Am 06.03.2011 um 15:33 schrieb Hans Hagen:

> On 6-3-2011 1:22, Andreas Harder wrote:
> 
>> I don't know the best value either, but et least one could manipulate it.
> 
> the next beta will support parameter overload in the goodies
> 
>        parameters = { -- test values
>            FactorA = 123.456,
>            FactorB = false,
>            FactorC = function(value,target,original) return 7.89 * target.factor end,
>            FactorD = "Hi There!",
>        },

I'm afraid, I don't get it. Here is what I tried:
I copied all stack-relevant values from asana-math.tma and put them in the return section of the goodies file (like showed in lm-math.lfg). But even if I set all values to zero, the output remains the same. Im I doing something wrong? 


[-- Attachment #2: asana-math.lfg --]
[-- Type: application/octet-stream, Size: 1240 bytes --]

-- This patch code is moved from font-pat.lua to this goodies
-- files as it does not belomg in the core code.

local patches = fonts.otf.enhancers.patches

local function patch(data,filename,threshold)
    local m = data.metadata.math
    if m then
        local d = m.DisplayOperatorMinHeight or 0
        if d < threshold then
            patches.report("DisplayOperatorMinHeight(%s -> %s)",d,threshold)
            m.DisplayOperatorMinHeight = threshold
        end
    end
end

patches.register("after","check math parameters","asana",function(data,filename) patch(data,filename,1350) end)

return {
   name = "lm-asana",
   version = "1.00",
   comment = "Goodies that complement asana.",
   author = "Hans Hagen",
   copyright = "ConTeXt development team",
   parameters = { -- test values
      -- data = {
	 metadata = {
	    math = {
	       StackBottomDisplayStyleShiftDown = 0,
	       StackBottomShiftDown = 0,
	       StackDisplayStyleGapMin = 0,
	       StackGapMin = 0,
	       StackTopDisplayStyleShiftUp = 0,
	       StackTopShiftUp = 0,
	       StretchStackBottomShiftDown = 0,
	       StretchStackGapAboveMin = 0,
	       StretchStackGapBelowMin = 0,
	       StretchStackTopShiftUp = 0,
	    },
	 },
      -- },
   },
}

[-- Attachment #3: test-goodies.tex --]
[-- Type: application/octet-stream, Size: 254 bytes --]


\usetypescript[palatino,asana]
\startTEXpage[offset=1pt]
  \ruledhbox
    {% \switchtobodyfont[palatino]  $\binom{n}{k}$
     \switchtobodyfont[asana]     $\binom{n}{k}$}
\stopTEXpage

%%% Local Variables: 
%%% mode: context
%%% TeX-master: t
%%% End: 

[-- Attachment #4: Type: text/plain, Size: 19 bytes --]



Greeting
	Andreas

[-- Attachment #5: Type: text/plain, Size: 486 bytes --]

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

  parent reply	other threads:[~2011-03-13 14:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-04 13:09 Andreas Harder
2011-03-04 14:28 ` Hans Hagen
2011-03-04 20:47   ` Andreas Harder
2011-03-06  0:25   ` Andreas Harder
2011-03-06 11:54     ` Hans Hagen
2011-03-06 12:22       ` Andreas Harder
2011-03-06 14:33         ` Hans Hagen
2011-03-06 14:49           ` Andreas Harder
2011-03-13 14:01           ` Andreas Harder [this message]
2011-03-13 15:51             ` Aditya Mahajan
2011-03-13 16:01               ` Andreas Harder
2011-03-06 17:03       ` Aditya Mahajan
2011-03-06 17:56         ` 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=41F8B081-EC7A-42C0-9BA6-FCA126BFB887@rz-online.de \
    --to=andreas.harder@rz-online.de \
    --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).