ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Magnus J <mjo.lists@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Font fallback scaling
Date: Fri, 13 Apr 2018 12:34:06 +0200	[thread overview]
Message-ID: <CADF+R-JaNGomjb8PaLareX=KbMfNP3PTJP7JEbQ7K15+EuzkFA@mail.gmail.com> (raw)

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

Thanks, I could have sworn I had tested that. With my new setup, I
still have trouble with some characters in math mode. Specifically, I
don't see the \prime and \doubleprime characters in math mode, and I
can't use \wedge as a footnote symbol.

Consider this commented example, pdf result attached.

/MJO


    % define the characters to use for Garamond in math mode
    \definefontfamilypreset
        [math:somesymbols]
        [range={0x0002A-0x0002E,0x000A7,0x000B6,0x000D7,0x000F7,0x02020-0x02021,0x02212,0x02219-0x02226,0x02228-0x02265,0x02012,0x0003C-0x0003E,0x0007C},
            tf=style:regular,
            offset=lowercasenormal,
        ]

    \definefallbackfamily[mainface][math][Adobe Garamond
Pro][rscale=1.05,range=digitsnormal]
    \definefallbackfamily[mainface][math][Adobe Garamond
Pro][rscale=1.05,range=lowercasenormal]
    \definefallbackfamily[mainface][math][Adobe Garamond
Pro][rscale=1.05,range=lowercaseitalic]
    \definefallbackfamily[mainface][math][Adobe Garamond
Pro][rscale=1.05,range=uppercasenormal]
    \definefallbackfamily[mainface][math][Adobe Garamond
Pro][rscale=1.05,range=uppercaseitalic]
    \definefallbackfamily[mainface][math][Adobe Garamond
Pro][rscale=1.05,range=math:somesymbols]

    \definefontfamily[mainface][serif][Adobe Garamond Pro]
    \definefontfamily[mainface][math][TeX Gyre Termes Math][scale=0.9]

    \setupbodyfont[mainface,11pt]

    % footnotes
    \defineconversion[avhset][\m{\wedge},\m{\prime}]
    \setupnotation[footnote][way=bypage,numberconversion=avhset]

    \enabletrackers[fonts.missing]

    \starttext

    $D\prime = 0.98$          % <-- no \prime in output

    $D\doubleprime = 0.98$    % <-- no \doubleprime in output

    wedge\wedge\footnote{wedge}   % <-- lua stats  > unknown math
characters: ∧ (U+02227) (n=2)

    prime\prime\footnote{prime}   % <--

    \stoptext

> On 4/12/2018 6:17 PM, Magnus J wrote:
> > I use Adobe Garamond Pro in combination with Termes Math for math (the
> > latter for missing glyphs, Garamond is not very complete). How can I
> > scale size of Termes Math without decreasing the size of the Garamond
> > glyphs in math mode?
> >
> > /MJO
> >
> >
> >      % define the characters to use for Garamond in math mode
> >      \definefontfamilypreset
> >          [math:somesymbols]
> >
> >
[range={0x0002A-0x0002E,0x000A7,0x000B6,0x000D7,0x000F7,0x02020-0x02021,0=
x02212,0x02219-0x02226,0x02228-0x02265,0x02012,0x0003C-0x0003E,0x0007C},
> >           tf=style:regular,
> >           offset=lowercasenormal,
> >          ]
> >
> >      \definefallbackfamily[mainface][mm][Adobe Garamond
> > Pro][math:digitsnormal]
> >      \definefallbackfamily[mainface][mm][Adobe Garamond
> > Pro][math:lowercasenormal]
> >      \definefallbackfamily[mainface][mm][Adobe Garamond
> > Pro][math:lowercaseitalic]
> >      \definefallbackfamily[mainface][mm][Adobe Garamond
> > Pro][math:uppercasenormal]
> >      \definefallbackfamily[mainface][mm][Adobe Garamond
> > Pro][math:uppercaseitalic]
> >      \definefallbackfamily[mainface][mm][Adobe Garamond
> > Pro][math:somesymbols]
> >
> >      \definefontfamily[mainface][rm][Adobe Garamond Pro]
> >      \definefontfamily[mainface][mm][TeX Gyre Termes Math][scale=0.9]
%
> > <-- scaling here...
> >
> >      \setupbodyfont[mainface,11pt]
> >
> >      \starttext
> >      100
> >
> >      $100$ % <-- leads to math mode that is smaller than text, even for
> > Garamond glyphs
> >      \stoptext
>      \definefallbackfamily[mainface][math][Adobe Garamond
> Pro][rscale=1.05,range=digitsnormal]
>      \definefallbackfamily[mainface][math][Adobe Garamond
> Pro][rscale=1.05,range=lowercasenormal]
>      \definefallbackfamily[mainface][math][Adobe Garamond
> Pro][rscale=1.05,range=lowercaseitalic]
>      \definefallbackfamily[mainface][math][Adobe Garamond
> Pro][rscale=1.05,range=uppercasenormal]
>      \definefallbackfamily[mainface][math][Adobe Garamond
> Pro][rscale=1.05,range=uppercaseitalic]
>      \definefallbackfamily[mainface][math][Adobe Garamond
> Pro][rscale=1.05,range=math:somesymbols]
>
>      \definefontfamily     [mainface] [serif] [Adobe Garamond Pro]
>      \definefontfamily     [mainface] [math]  [TeX Gyre Termes Math]
>
>      \setupbodyfont[mainface]
>
>
> -----------------------------------------------------------------
>                                            Hans Hagen | PRAGMA ADE
>                Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>         tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -----------------------------------------------------------------

[-- Attachment #2: bla.pdf --]
[-- Type: application/pdf, Size: 8200 bytes --]

[-- Attachment #3: Type: text/plain, Size: 492 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

             reply	other threads:[~2018-04-13 10:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-13 10:34 Magnus J [this message]
2018-04-13 11:11 ` Hans Hagen
  -- strict thread matches above, loose matches on Subject: below --
2018-04-13 12:23 Magnus J
2018-04-13 13:38 ` Magnus J
2018-04-13 13:44   ` Hans Hagen
2018-04-13 17:46     ` Magnus J
2018-04-12 16:17 Magnus J
2018-04-12 16:57 ` 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='CADF+R-JaNGomjb8PaLareX=KbMfNP3PTJP7JEbQ7K15+EuzkFA@mail.gmail.com' \
    --to=mjo.lists@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).