Re: [NTG-context] font fallback hook (alphabet suspects)

2021-02-01 Thread Jano Kula
Hello Hans!

Thanks.

On Fri, 29 Jan 2021 at 21:58, Hans Hagen  wrote:

> > Not critical, just looking for ideas.
> Already there for ages ... testsuite goodies-002.tex + demo.lfg shows
> how to color your special characters ... one of the probably many
> unknown features -)
>

I was thinking goodies could be the answer even for the font fallbacks
hooks.
Unicode blocks are colored and wikified
 (simplified example) now,
which definitely helps.

I'm fine with logs and trackers, but the original idea was to search PDF by
the editor to make a visual check (made fast by searching), confirming the
glyphs are right, not only they do exist in the font. Just wanted to ask if
there is any existing machinery which could be used for that: switching
font fallback would issue, for example, a margin note command.

J.
___
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
___


Re: [NTG-context] font fallback hook (alphabet suspects)

2021-01-29 Thread Hans Hagen

On 1/29/2021 8:29 PM, Jano Kula wrote:

There are some Greek, Hebrew, etc. words used in the text. While 
proofreading, the editor would like to check these words separately 
(glyphs from different alphabets, unusual symbols, ...), so I'd like to 
typeset the warning (margin note), where these words are located. To 
avoid usual markup \greek{ὀρφανῖος} it could be useful to typeset a 
margin note whenever the defined fallback is called.


The unfamiliar symbols could be in the main font and no fallback would 
be called then (one can still define the fallback with the main font as 
in the MWE, bold used for the illustration), but you might have a better 
ideas how to point out these suspects.


The margin note is ment for searching PDF where one cannot search for 
color (basic viewer), which could be the other approach (also visible in 
print). I think, the color could be achieved with finalizers. One should 
also think of hyphenation and l2r/r2l direction, so in the end the usual 
approach might be the best way.


You might use other approaches, how to deal with suspects of this type. 
Below the MWE for font fallbacks with distribution fonts.


Not critical, just looking for ideas.
Already there for ages ... testsuite goodies-002.tex + demo.lfg shows 
how to color your special characters ... one of the probably many 
unknown features -)


There's also this:

\enabletrackers[fonts.missing=replace]

\startTEXpage
Jano uses \char 12345.
\stopTEXpage

and of course you then watch the log ... (at the meeting Ton showed 
other proofing tricks).



Hans

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


[NTG-context] font fallback hook (alphabet suspects)

2021-01-29 Thread Jano Kula
Hello to everybody!

Warning: 50 % of Greek glyphs in MWE, so they might be randomized :)

Is there any hook in the font fallback?

There are some Greek, Hebrew, etc. words used in the text. While
proofreading, the editor would like to check these words separately (glyphs
from different alphabets, unusual symbols, ...), so I'd like to typeset the
warning (margin note), where these words are located. To avoid usual markup
\greek{ὀρφανῖος} it could be useful to typeset a margin note whenever the
defined fallback is called.

The unfamiliar symbols could be in the main font and no fallback would be
called then (one can still define the fallback with the main font as in the
MWE, bold used for the illustration), but you might have a better ideas how
to point out these suspects.

The margin note is ment for searching PDF where one cannot search for color
(basic viewer), which could be the other approach (also visible in print).
I think, the color could be achieved with finalizers. One should also think
of hyphenation and l2r/r2l direction, so in the end the usual approach
might be the best way.

You might use other approaches, how to deal with suspects of this type.
Below the MWE for font fallbacks with distribution fonts.

Not critical, just looking for ideas.

Thank you,
Jano

\definefontfallback[Fallback]
[file:DejaVuSerif-Bold.ttf]
[0x0370-0x03FF]
[force=yes,rscale=1]
\definefontfallback[Fallback]
[file:DejaVuSerif-Bold.ttf]
[0x01F40,0x01FD6]
[force=yes,rscale=1]

\starttypescriptcollection[DejaVu]

\starttypescript[serif]
[DejaVu]
[name]
\definefontsynonym[Serif]
[file:DejaVuSerif.ttf]
[fallbacks=Fallback]
\stoptypescript

\starttypescript[DejaVu]
\definetypeface[DejaVu][rm][serif]
[DejaVu][default]
\stoptypescript

\stoptypescriptcollection

\setupbodyfont[DejaVu]

\starttext
from ὀρφανῖος, thus
\stoptext
___
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
___


Re: [NTG-context] Font fallback

2018-12-03 Thread Hans Åberg

> On 3 Dec 2018, at 19:35, Wolfgang Schuster 
>  wrote:
> 
> Hans Åberg schrieb am 03.12.18 um 19:22:
>> I can't get create a font fallback in the the example below, so some input 
>> is welcome. It works when using STIX2 only (the commented out part), but 
>> somehow the font name is not recognized in the fallback, not when using what 
>> is listed by 'mtxrun --script fonts --list --all'.
>> —
>> \definefontfamily[stix-two][mono][Stix Two Text]
>> \definefontfamily[stix-two][math][Stix Two Math]
>> %\setupbodyfont[stix-two,10pt]
>> \definefallbackfamily [mainface] [rm] [Stix Two Text] [range={02070,0208F}]
>> \definefallbackfamily [mainface] [serif] [Stix Two Text] 
>> [range={02070,0208F}]
> 
> 1. You’re creating the same fallback two times because rm=serif.

Thanks, I was sort of aware of that, but expected at least one to be valid. :-)

> 
> 2. To pass a range use “-” as separator.
> 
> \definefallbackfamily [mainface] [serif] [Stix Two Text] [range={02070-0208F}]

This was the issue. It works now.

>> \definefallbackfamily [mainface] [mono] [Stix Two Text] [range={02070,0208F}]
>> \definefallbackfamily [mainface] [math] [Stix Two Math] [range={02070,0208F}]
>> \definefontfamily [mainface] [rm] [stix]
>> \definefontfamily [mainface] [math] [stix]
>> \definefontfamily [mainface] [mono] [stix]
> 
> Do you have the Stix font on your system?

Yes, both are in TeX Live 2018, but I have them on the system as well, and the 
mtxrun command above lists them.

> On my system this isn’t the case but I can use the XITS fonts.
> 
> \definefontfamily [mainface] [serif] [XITS]
> \definefontfamily [mainface] [math]  [XITS Math]

Is XITS still needed? It had some adaptations I think for OTF, but STIX has 
been developed since.


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

Re: [NTG-context] Font fallback

2018-12-03 Thread Wolfgang Schuster

Hans Åberg schrieb am 03.12.18 um 19:22:

I can't get create a font fallback in the the example below, so some input is 
welcome. It works when using STIX2 only (the commented out part), but somehow 
the font name is not recognized in the fallback, not when using what is listed 
by 'mtxrun --script fonts --list --all'.

—
\definefontfamily[stix-two][mono][Stix Two Text]
\definefontfamily[stix-two][math][Stix Two Math]

%\setupbodyfont[stix-two,10pt]

\definefallbackfamily [mainface] [rm] [Stix Two Text] [range={02070,0208F}]
\definefallbackfamily [mainface] [serif] [Stix Two Text] [range={02070,0208F}]


1. You’re creating the same fallback two times because rm=serif.

2. To pass a range use “-” as separator.

\definefallbackfamily [mainface] [serif] [Stix Two Text] 
[range={02070-0208F}]



\definefallbackfamily [mainface] [mono] [Stix Two Text] [range={02070,0208F}]
\definefallbackfamily [mainface] [math] [Stix Two Math] [range={02070,0208F}]
\definefontfamily [mainface] [rm] [stix]
\definefontfamily [mainface] [math] [stix]
\definefontfamily [mainface] [mono] [stix]


Do you have the Stix font on your system?

On my system this isn’t the case but I can use the XITS fonts.

\definefontfamily [mainface] [serif] [XITS]
\definefontfamily [mainface] [math]  [XITS Math]

Wolfgang
___
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
___

[NTG-context] Font fallback

2018-12-03 Thread Hans Åberg
I can't get create a font fallback in the the example below, so some input is 
welcome. It works when using STIX2 only (the commented out part), but somehow 
the font name is not recognized in the fallback, not when using what is listed 
by 'mtxrun --script fonts --list --all'.

—
\definefontfamily[stix-two][mono][Stix Two Text]
\definefontfamily[stix-two][math][Stix Two Math]

%\setupbodyfont[stix-two,10pt]

\definefallbackfamily [mainface] [rm] [Stix Two Text] [range={02070,0208F}]
\definefallbackfamily [mainface] [serif] [Stix Two Text] [range={02070,0208F}]
\definefallbackfamily [mainface] [mono] [Stix Two Text] [range={02070,0208F}]
\definefallbackfamily [mainface] [math] [Stix Two Math] [range={02070,0208F}]
\definefontfamily [mainface] [rm] [stix]
\definefontfamily [mainface] [math] [stix]
\definefontfamily [mainface] [mono] [stix]

\setupbodyfont[mainface]

\starttext

\startformula
 \startalign
  \NC 푨₀ 0  ₁ 1  ₂ 2  ₃ 3  ₄ 4  ₅ 5  ₆ 6  ₇ 7  ₈ 8  ₉ 9  ₊ +  ₋ -  ₌ =  ₍ (  ₎ 
)\NR
  \NC 푩⁰ 0  ¹ 1  ² 2  ³ 3  ⁴ 4  ⁵ 5  ⁶ 6  ⁷ 7  ⁸ 8  ⁹ 9  ⁺ +  ⁻ -  ⁼ =  ⁽ (  ⁾ 
)\NR
 \stopalign
\stopformula


\starttyping
  푨₀ 0  ₁ 1  ₂ 2  ₃ 3  ₄ 4  ₅ 5  ₆ 6  ₇ 7  ₈ 8  ₉ 9  ₊ +  ₋ -  ₌ =  ₍ (  ₎ )
  푩⁰ 0  ¹ 1  ² 2  ³ 3  ⁴ 4  ⁵ 5  ⁶ 6  ⁷ 7  ⁸ 8  ⁹ 9  ⁺ +  ⁻ -  ⁼ =  ⁽ (  ⁾ )
\stoptyping

  푨₀ 0  ₁ 1  ₂ 2  ₃ 3  ₄ 4  ₅ 5  ₆ 6  ₇ 7  ₈ 8  ₉ 9  ₊ +  ₋ -  ₌ =  ₍ (  ₎ )

  푩⁰ 0  ¹ 1  ² 2  ³ 3  ⁴ 4  ⁵ 5  ⁶ 6  ⁷ 7  ⁸ 8  ⁹ 9  ⁺ +  ⁻ -  ⁼ =  ⁽ (  ⁾ )

\stoptext
—
___
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
___

Re: [NTG-context] Font fallback scaling

2018-04-13 Thread Magnus J
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  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
___

Re: [NTG-context] Font fallback scaling

2018-04-13 Thread Hans Hagen

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
___

Re: [NTG-context] Font fallback scaling

2018-04-13 Thread Magnus J
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  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
___

Re: [NTG-context] Font fallback scaling

2018-04-13 Thread Magnus J
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
___

Re: [NTG-context] Font fallback scaling

2018-04-13 Thread Hans Hagen

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
___

Re: [NTG-context] Font fallback scaling

2018-04-13 Thread Magnus J
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
> -


bla.pdf
Description: Adobe PDF document
___
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/

Re: [NTG-context] Font fallback scaling

2018-04-12 Thread Hans Hagen

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
___

[NTG-context] Font fallback scaling

2018-04-12 Thread Magnus J
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
___
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
___