[NTG-context] Mkiv, fonts in text and math mode, with \definebodyfont

Hans Hagen j.hagen at xs4all.nl
Tue Oct 1 11:28:03 CEST 2019


On 9/30/2019 7:32 PM, Stefano Sanguinetti wrote:
> Hello,
> 
> I am trying to understand something more about fonts in text and math 
> mode, in Mkiv Context. I would like to be able to change things at the 
> "define body fonts" level.
> 
> I tried the following, in order to have rsfs fonts :
> \setupbodyfont[12pt]
> \definebodyfont[12pt][rm][tf=rsfs10 sa *]
> \starttext
> \tf ABCD
> \tfa ABCD
> \stoptext
> 
> The \tfa ABCD is displayed as rsfs as I wanted, but the \tf ABCD is 
> displayed as default fonts. Why ? What could I change in order to have 
> \tf ABCD in rsfs ?
> 
> In math mode, I am not able to have rsfs fonts :
> \setupbodyfont[12pt]
> \definebodyfont[12pt][mm][mr=rsfs10 sa *,ex=rsfs10 sa *,mi=rsfs10 sa 
> *,sy=rsfs10 sa *,ma=rsfs10 sa *,mb=rsfs10 sa *]
> \starttext
> $ABCD$
> \stoptext
> 
> That gives ABCD in default math mode fonts.
> Is there a simple way to do it with the \definebodyfont command ?
> 
> Thank you in advance for your comments.
In mkiv we use a different model. If you want to use traditional type 1 
fonts you need to define a virtual (unicode) math font. You can look 
into px-math.lfg to see how that is done.

(Maybe I should remove these old family models from  mkiv/lmtx. probably 
no one would object.)

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


More information about the ntg-context mailing list