ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Mikael Sundqvist via ntg-context <ntg-context@ntg.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Mikael Sundqvist <mickep@gmail.com>
Subject: Re: How to use noto sans math font?
Date: Wed, 5 Apr 2023 12:25:50 +0200	[thread overview]
Message-ID: <CAHy-LL-3sL+0_vCbZ-St+sH23f8WFa--4xWtuk3m4qySoXVCUQ@mail.gmail.com> (raw)
In-Reply-To: <CAFLdaXr2K0c3dQm7KSUSjJ5XeSEdVJnHnCZdM9w+rqP5mCsuOg@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 1412 bytes --]

Hi,

No intend to be complete or so (not by computer either, so could not look
into it), it was just for a test a while back. But it could serve as a
start.

/Mikael

Den ons 5 apr. 2023 12:07Li Yanrui (李延瑞) via ntg-context <ntg-context@ntg.nl>
skrev:

> Hi,
>
> I try to use the Noto Sans Math fnt which can be downloaded from
> https://fonts.google.com/noto/specimen/Noto+Sans+Math
>
> But I use it like the following
>
> \definefontfamily[myfonts][rm][latin modern roman]
> \definefontfamily[myfonts][mm][noto sans math]
> \setupbodyfont[myfonts,rm,12pt]
> \starttext
> Test Noto Sasn Math Fonts
> \startformula
> a^2 \quad \sqrt{a}
> \stopformula
> \stoptext
>
> I get the errors `Math error: parameter 'supshiftup' with id 51 in style 0
> is not set'.
>
> Is there some method to solve it?
>
>
> --
> Best regards,
>
> Li Yanrui
>
> ___________________________________________________________________________________
> 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
>
> ___________________________________________________________________________________
>

[-- Attachment #1.2: Type: text/html, Size: 2651 bytes --]

[-- Attachment #2: type-imp-noto.mkiv --]
[-- Type: application/octet-stream, Size: 2235 bytes --]


\starttypescriptcollection[notosans]

    % \definefontfeature[default-slanted-xcharter][default][slant=.2]
    % \definefontfeature[none-slanted-xcharter]   [none]   [slant=.2]

    \doifunknownfontfeature {noto-math-bold} {\definefontfeature[noto-math-bold][boldened]}

    \starttypescript [\s!serif] [noto] [\s!name]
        \definefontsynonym [\s!Serif]           [\s!file:NotoSerif-Regular]    [\s!features=\s!default]
        \definefontsynonym [\s!SerifItalic]     [\s!file:NotoSerif-Italic]     [\s!features=\s!default]
        \definefontsynonym [\s!SerifBold]       [\s!file:NotoSerif-Bold]       [\s!features=\s!default]
        \definefontsynonym [\s!SerifBoldItalic] [\s!file:NotoSerif-BoldItalic] [\s!features=\s!default]
    \stoptypescript

    \starttypescript [\s!sans] [noto] [\s!name]
        \setups[\s!font:\s!fallback:\s!sans]
        \definefontsynonym [\s!Sans]          [\s!file:NotoSans-Regular]       [\s!features=\s!default]
        \definefontsynonym [\s!SansItalic]    [\s!file:NotoSans-Italic]        [\s!features=\s!default]
        \definefontsynonym [\s!SansBold]      [\s!file:NotoSans-SemiBold]      [\s!features=\s!default]
        \definefontsynonym [\s!SansBoldItalic][\s!file:NotoSans-SemiBoldItalic][\s!features=\s!default]
    \stoptypescript

    \starttypescript [\s!math] [noto][\s!name]
        \checkedmapfontsize[\typescripttwo][\s!script]      [.70]
        \checkedmapfontsize[\typescripttwo][\s!scriptscript][.55]
    \stoptypescript

    \starttypescript [\s!math] [noto][\s!name]
        \definefontsynonym [\s!MathRoman]    [\s!file:NotoSansMath-Regular.ttf][\s!features={\s!math\mathsizesuffix,noto:mathextra,mathextra}]
        \definefontsynonym [\s!MathRomanBold][\s!file:NotoSansMath-Regular.otf][\s!features={\s!math\mathsizesuffix,noto-math-bold,noto:mathextra,mathextra}]
    \stoptypescript

    \starttypescript [noto]
        \definetypeface [\typescriptone] [\s!rm] [\s!serif] [\typescriptone] [\s!default]
        \definetypeface [\typescriptone] [\s!ss] [\s!sans]  [\typescriptone] [\s!default]
        \definetypeface [\typescriptone] [\s!mm] [\s!math]  [\typescriptone] [\s!default]
        \quittypescriptscanning
    \stoptypescript

\stoptypescriptcollection

[-- Attachment #3: 230320-2.mkxl --]
[-- Type: application/octet-stream, Size: 350 bytes --]

\setupbodyfont[noto,ss]

\starttext

\samplefile{knuth}

% \showmakeup[mathglue]
% \showglyphs

\startformula
x = \frac{-b \pm \sqrt{b^2-4ac}}{2a} \breakhere

\int_0^n e^x \dd x \breakhere

\int_a^b f'(x) \dd x = f(b) - f(a) \breakhere

x+\mrightarrow{1+2}{a+b+c} + \wideoverrightharpoon{x+y+z+u+v+w} + \widetilde{x+y+z+u+v+w}
\stopformula

\stoptext

[-- Attachment #4: Type: text/plain, Size: 496 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-04-05 10:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-05 10:07 Li Yanrui (李延瑞) via ntg-context
2023-04-05 10:25 ` Mikael Sundqvist via ntg-context [this message]
2023-04-06  0:55   ` Li Yanrui (李延瑞) via ntg-context
2023-04-06  4:59     ` Mikael Sundqvist via ntg-context
2023-04-06  5:45       ` Li Yanrui (李延瑞) via ntg-context
2023-04-06  7:07       ` Hans Hagen via ntg-context
2023-04-06  7:44         ` Mikael Sundqvist via ntg-context
2023-04-06 12:29           ` Mikael Sundqvist via ntg-context

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-3sL+0_vCbZ-St+sH23f8WFa--4xWtuk3m4qySoXVCUQ@mail.gmail.com \
    --to=ntg-context@ntg.nl \
    --cc=mickep@gmail.com \
    /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).