ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \definefallbackfamily for math fonts, again
@ 2016-10-26 17:36 Csikos Bela
  2016-10-27 17:58 ` Wolfgang Schuster
  0 siblings, 1 reply; 3+ messages in thread
From: Csikos Bela @ 2016-10-26 17:36 UTC (permalink / raw)
  To: ntg-context

Dear list members:

I have the following context code:

\definefontfamily     [doc] [rm] [TeX Gyre Bonum]
\definefontfamily     [doc] [ss] [Tex Gyre Adventor]
\definefallbackfamily [doc] [mm] [Tex Gyre Adventor] [range=0x00000-0x2FA1F,force=yes]
\definefontfamily     [doc] [mm] [TeX Gyre Pagella Math]
\setupbodyfont[doc,10pt]
\starttext
Text font: <SERIF C H O N P>, {\ss <SANS SERIF C H O N P>} \\
Math font: \m{<DEFAULT~C~H~O~N~P>}, \m{\rm <SERIF~C~H~O~N~P>}, \m{\ss <SANS~SERIF~C~H~O~N~P>}
\stoptext

1. In the pdf result \rm math font is Tex Gyre Adventor and \ss math is Tex Gyre Pagella.
How can I have context to print math \rm with Tex Gyre Pagella serif, and math \ss
with Tex Gyre Adventor font? Why a roman/serif font is replaced with a sans serif font?

2. What range would be the most correct to include all characters for replacement?

Thank you in advance,

bcsikos

___________________________________________________________________________________
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] 3+ messages in thread

* Re: \definefallbackfamily for math fonts, again
  2016-10-26 17:36 \definefallbackfamily for math fonts, again Csikos Bela
@ 2016-10-27 17:58 ` Wolfgang Schuster
  2016-11-02 15:48   ` Csikos Bela
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Schuster @ 2016-10-27 17:58 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

> Csikos Bela <mailto:bcsikos425@freemail.hu>
> 26. Oktober 2016 um 19:36
> Dear list members:
>
> I have the following context code:
>
> \definefontfamily [doc] [rm] [TeX Gyre Bonum]
> \definefontfamily [doc] [ss] [Tex Gyre Adventor]
> \definefallbackfamily [doc] [mm] [Tex Gyre Adventor] 
> [range=0x00000-0x2FA1F,force=yes]
> \definefontfamily [doc] [mm] [TeX Gyre Pagella Math]
> \setupbodyfont[doc,10pt]
> \starttext
> Text font: <SERIF C H O N P>, {\ss <SANS SERIF C H O N P>} \\
> Math font: \m{<DEFAULT~C~H~O~N~P>}, \m{\rm <SERIF~C~H~O~N~P>}, \m{\ss 
> <SANS~SERIF~C~H~O~N~P>}
> \stoptext
>
> 1. In the pdf result \rm math font is Tex Gyre Adventor and \ss math 
> is Tex Gyre Pagella.
> How can I have context to print math \rm with Tex Gyre Pagella serif, 
> and math \ss
> with Tex Gyre Adventor font? Why a roman/serif font is replaced with a 
> sans serif font?
The \rm and \ss commands behave different in math mode and change only 
the math alphabet,
this means you’re always in the same font and the result of A changes 
from a serif italic uppercase A
to a sans serif italic uppercase A to a blackletter uppercase etc.
> 2. What range would be the most correct to include all characters for 
> replacement?
\definefontfamily     [doc] [rm] [TeX Gyre Bonum]
\definefontfamily     [doc] [ss] [Tex Gyre Adventor]

\definefallbackfamily [doc] [mm] [Tex Gyre Adventor] 
[range=lowercasenormal,offset=lowercasesansserifnormal]
\definefallbackfamily [doc] [mm] [Tex Gyre Adventor] 
[range=lowercasenormal,offset=lowercasesansserifnormal,tf=style:italic]

\definefallbackfamily [doc] [mm] [Tex Gyre Adventor] 
[range=uppercasenormal,offset=uppercasesansserifnormal]
\definefallbackfamily [doc] [mm] [Tex Gyre Adventor] 
[range=uppercasenormal,offset=uppercasesansserifnormal,tf=style:italic]

\definefontfamily     [doc] [mm] [TeX Gyre Pagella Math]

\setupbodyfont[doc,10pt]

\starttext
Text font: <SERIF C H O N P>, {\ss <SANS SERIF C H O N P>} \par
Math font: \m{<DEFAULT~C~H~O~N~P>}, \m{\rm <SERIF~C~H~O~N~P>}, \m{\ss 
<SANS~SERIF~C~H~O~N~P>}
\stoptext

Wolfgang

[-- Attachment #1.2: Type: text/html, Size: 3528 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] 3+ messages in thread

* Re: \definefallbackfamily for math fonts, again
  2016-10-27 17:58 ` Wolfgang Schuster
@ 2016-11-02 15:48   ` Csikos Bela
  0 siblings, 0 replies; 3+ messages in thread
From: Csikos Bela @ 2016-11-02 15:48 UTC (permalink / raw)
  To: ntg-context

Wolfgang Schuster írta:
>\definefontfamily     [doc] [rm] [TeX Gyre Bonum]
>\definefontfamily     [doc] [ss] [Tex Gyre Adventor]
>
>\definefallbackfamily [doc] [mm] [Tex Gyre Adventor] 
>[range=lowercasenormal,offset=lowercasesansserifnormal]
>\definefallbackfamily [doc] [mm] [Tex Gyre Adventor] 
>[range=lowercasenormal,offset=lowercasesansserifnormal,tf=style:italic]
>
>\definefallbackfamily [doc] [mm] [Tex Gyre Adventor] 
>[range=uppercasenormal,offset=uppercasesansserifnormal]
>\definefallbackfamily [doc] [mm] [Tex Gyre Adventor] 
>[range=uppercasenormal,offset=uppercasesansserifnormal,tf=style:italic]
>
>\definefontfamily     [doc] [mm] [TeX Gyre Pagella Math]
>
>\setupbodyfont[doc,10pt]
>
>\starttext
>Text font: , {\ss } 
>\par
>Math font: \m{}, \m{\rm 
>}, \m{\ss }
>\stoptext

Thank you again, Wolfgang.

Unfortunately I don't understand the syntax of \definefallbackfamily command
and therefore I only copy/paste examples I found in the list and context wiki.

I found the first mention of built-in simplefonts in this thread but it doesn't discuss
\definefallbackfamily in detail:
https://mailman.ntg.nl/pipermail/ntg-context/2013/075481.html

I also looked at context wiki pages for Command/definefontfamily
and Command/definefontfallback.

All in all I am very confused how to use the command.
It is not clear for me how to know if an option in \definefallbackfamily applies
to the font to be replaced or to  the replacement font.

--For example I guess range= option applies to the font to be replaced: if the
font/character lies within this range then it should be replaced by the font
defined in \definfallbackfamily. Is this correct?

--The preset= option is a predefined range; it is equal to some range= option.
Is this correct?

--What is offset=? Is this a range that should be used in the replacement?
Does [range=lowercasenormal,offset=lowercasesansserifnormal] mean that
lower case normal font should be replaced by lower case sans serif normal font?

--Does the above imply that offset= option is only valid for math fonts and it
can't be used for rm, ss and tt fonts?
(E.g. \definefallbackfamily [doc] [rm] [TeX Gyre Bonum] explicitly defines a serif font,
it would be nonsense to add offset=lowercasesansserifnormal option to the command.)

--tf=style:italic: what does this exactly mean? If the replacement font drawing
command is \tf then draw italic font? If yes, how it is different from
offset=lowercasesansserifitalic? Is this command used in the same manner
in \definefontfamily and \definefallbackfamily commands?

Thank you in advance,

bcsikos

___________________________________________________________________________________
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] 3+ messages in thread

end of thread, other threads:[~2016-11-02 15:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-26 17:36 \definefallbackfamily for math fonts, again Csikos Bela
2016-10-27 17:58 ` Wolfgang Schuster
2016-11-02 15:48   ` Csikos Bela

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