ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Mikael Sundqvist <mickep@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: [NTG-context] Re: Fira Math: goodies needed?
Date: Sat, 22 Jul 2023 15:47:41 +0200	[thread overview]
Message-ID: <CAHy-LL-szapr5eK0k+7TS=B39aKeGKm1gU+eb+ee_A6TpRbQbw@mail.gmail.com> (raw)
In-Reply-To: <87o7k429kz.fsf@vuxu.org>

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

Hi Leah,

On Sat, Jul 22, 2023 at 12:19 AM Leah Neukirchen <leah@vuxu.org> wrote:
>
> Hi,
>
> I'm trying to use Fira Math (https://github.com/firamath/firamath).
>
> But this small example yields both limits on the same horizontal axis,
> i.e. the 0 is far away from the integral sign:
>
>
> \definefontfamily [mainface] [mm] [Fira Math]
> \setupbodyfont    [mainface]
>
> \starttext
> \startformula
>   \int_0^1 e^x
> \stopformula
> \stoptext
>
>
> Meanwhile, when I use LaTeX, the 0 is moved to the left and close to
> the integral sign:
>
>
> \documentclass{article}
> \usepackage{amsmath}
> \usepackage[mathrm=sym]{unicode-math}
> \setmathfont{Fira Math}
>
> \begin{document}
> \[
>   \int_0^1 e^x
> \]
> \end{document}
>
>
> In both cases
> /opt/texlive/2023/texmf-dist/fonts/opentype/public/firamath/FiraMath-Regular.otf
> is used...
>

As far as I remember, we did not consider firamath usable last time we
tested. Is it OK?

Attached you find a very basic goodie file that 1) set the
primeshiftup parameter and 2) enables presets.moveintegrals. Also add

\definefontfeature[default][default][goodies=fira-math.lfg]

to use it.

/Mikael

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

local common  = fonts.goodies.load("common-math.lfg")
local presets = common.mathematics.tweaks.presets

return {
    name = "fira-math",
    version = "0.10",
    comment = "Goodies that complement fira.",
    author = "Hans Hagen & Mikael Sundqvist",
    copyright = "ConTeXt development team",
    mathematics = {
        parameters = {
            PrimeShiftUp                    =  "0.7*SuperscriptShiftUp",
        },
        tweaks = {
            aftercopying = {
                presets.moveintegrals        { },
                presets.moveitalics          { correct = true },
                presets.wipeanchors          { },
                presets.wipeitalics          { },
            },
        },
    },
}

[-- Attachment #3: Type: text/plain, Size: 495 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2023-07-22 13:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-21 22:17 [NTG-context] " Leah Neukirchen
2023-07-22 13:47 ` Mikael Sundqvist [this message]
2023-07-23 21:42   ` [NTG-context] " Leah Neukirchen

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='CAHy-LL-szapr5eK0k+7TS=B39aKeGKm1gU+eb+ee_A6TpRbQbw@mail.gmail.com' \
    --to=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).