ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Font fallback scaling
@ 2018-04-12 16:17 Magnus J
  2018-04-12 16:57 ` Hans Hagen
  0 siblings, 1 reply; 8+ messages in thread
From: Magnus J @ 2018-04-12 16:17 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

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,0x02212,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

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

[-- Attachment #2: 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Font fallback scaling
  2018-04-12 16:17 Font fallback scaling Magnus J
@ 2018-04-12 16:57 ` Hans Hagen
  0 siblings, 0 replies; 8+ messages in thread
From: Hans Hagen @ 2018-04-12 16:57 UTC (permalink / raw)
  To: ntg-context

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,0x02212,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
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Font fallback scaling
  2018-04-13 13:44   ` Hans Hagen
@ 2018-04-13 17:46     ` Magnus J
  0 siblings, 0 replies; 8+ messages in thread
From: Magnus J @ 2018-04-13 17:46 UTC (permalink / raw)
  To: mailing list for ConTeXt users

That solved it. For reference, I previously used the Texlive versions
bundled with Cygwin and Arch Linux.

/MJO

On Fri, Apr 13, 2018 at 3:44 PM, Hans Hagen <j.hagen@xs4all.nl> wrote:
> On 4/13/2018 3:38 PM, Magnus J wrote:
>>
>> This is even more weird (same setup as before)
>
> i uploaded a beta .. maybe that one works better (at least we run the same
> then)
>
> -----------------------------------------------------------------
>                                           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
> ___________________________________________________________________________________
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Font fallback scaling
  2018-04-13 13:38 ` Magnus J
@ 2018-04-13 13:44   ` Hans Hagen
  2018-04-13 17:46     ` Magnus J
  0 siblings, 1 reply; 8+ messages in thread
From: Hans Hagen @ 2018-04-13 13:44 UTC (permalink / raw)
  To: ntg-context

On 4/13/2018 3:38 PM, Magnus J wrote:
> This is even more weird (same setup as before)
i uploaded a beta .. maybe that one works better (at least we run the 
same then)

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Font fallback scaling
  2018-04-13 12:23 Magnus J
@ 2018-04-13 13:38 ` Magnus J
  2018-04-13 13:44   ` Hans Hagen
  0 siblings, 1 reply; 8+ messages in thread
From: Magnus J @ 2018-04-13 13:38 UTC (permalink / raw)
  To: mailing list for ConTeXt users

This is even more weird (same setup as before)

    \starttext

    wedge\wedge\footnote{wedge} prime\prime\footnote{prime}   % <-- no
\wedge (question mark) in footnote, but \prime

    \page
    wedge\wedge\footnote{wedge} prime\prime\footnote{prime}   % <--
\wedge and \prime

    \page
    wedge\wedge\footnote{wedge} prime\prime\footnote{prime}   % <--
wedge and \prime

    \stoptext

On Fri, Apr 13, 2018 at 2:23 PM, Magnus J <mjo.lists@gmail.com> wrote:
> Well that's even more odd. Is it visible in the attachment? Tested
> with updated Acrobat Reader and Sumatra pdf viewer without any visible
> \prime or \doubleprime, except in the footnote (where there is no
> \wedge on the other hand)... Note that \prime is visible as a footnote
> symbol, which is also in math mode. If I comment *all* of the
> \definefallbackfamily rows, it shows in the math example (but then
> it's Termes of course). With any of the \definefallbackfamily
> uncommented, it won't show.
>
> Should I disable the fallback for a specific character, i.e., remove
> the characters from one of the fallback ranges? And how is that done?
> I don't care if Termes is used for most of the symbols, but I want to
> keep as much Garamond as possible in math mode, especially for letters
> and number.
>
> /MJO
>
>> On 4/13/2018 12:34 PM, Magnus J wrote:
>>
>> >      $D\prime = 0.98$          % <-- no \prime in output
>> >
>> >      $D\doubleprime = 0.98$    % <-- no \doubleprime in output
>> hm, i see primes here
>>
>>
>> -----------------------------------------------------------------
>>                                            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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Font fallback scaling
@ 2018-04-13 12:23 Magnus J
  2018-04-13 13:38 ` Magnus J
  0 siblings, 1 reply; 8+ messages in thread
From: Magnus J @ 2018-04-13 12:23 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Well that's even more odd. Is it visible in the attachment? Tested
with updated Acrobat Reader and Sumatra pdf viewer without any visible
\prime or \doubleprime, except in the footnote (where there is no
\wedge on the other hand)... Note that \prime is visible as a footnote
symbol, which is also in math mode. If I comment *all* of the
\definefallbackfamily rows, it shows in the math example (but then
it's Termes of course). With any of the \definefallbackfamily
uncommented, it won't show.

Should I disable the fallback for a specific character, i.e., remove
the characters from one of the fallback ranges? And how is that done?
I don't care if Termes is used for most of the symbols, but I want to
keep as much Garamond as possible in math mode, especially for letters
and number.

/MJO

> On 4/13/2018 12:34 PM, Magnus J wrote:
>
> >      $D\prime = 0.98$          % <-- no \prime in output
> >
> >      $D\doubleprime = 0.98$    % <-- no \doubleprime in output
> hm, i see primes here
>
>
> -----------------------------------------------------------------
>                                            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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Font fallback scaling
  2018-04-13 10:34 Magnus J
@ 2018-04-13 11:11 ` Hans Hagen
  0 siblings, 0 replies; 8+ messages in thread
From: Hans Hagen @ 2018-04-13 11:11 UTC (permalink / raw)
  To: ntg-context

On 4/13/2018 12:34 PM, Magnus J wrote:

>      $D\prime = 0.98$          % <-- no \prime in output
> 
>      $D\doubleprime = 0.98$    % <-- no \doubleprime in output
hm, i see primes here


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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Font fallback scaling
@ 2018-04-13 10:34 Magnus J
  2018-04-13 11:11 ` Hans Hagen
  0 siblings, 1 reply; 8+ messages in thread
From: Magnus J @ 2018-04-13 10:34 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-04-13 17:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-12 16:17 Font fallback scaling Magnus J
2018-04-12 16:57 ` Hans Hagen
2018-04-13 10:34 Magnus J
2018-04-13 11:11 ` Hans Hagen
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

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).