[NTG-context] Mixing fonts ?

2006-05-03 Thread WN
I am trying to learn more about font switching (read the font manuals 
but to no avail).
The thing I am trying to do is :

* For normal text I want to use the Times-Roman font
* For math's I want to use a different font, i.e. Computer Modern

I think I have to work with typescripts and use combinations of 
\setupbodyfont but
I cannot work out the proper combination.

Thanks for any help
Regards
Wim

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Mixing fonts ?

2006-05-03 Thread Thomas A. Schmitz
On Wed, 2006-05-03 at 12:54 +0200, WN wrote:
 I am trying to learn more about font switching (read the font manuals 
 but to no avail).
 The thing I am trying to do is :
 
 * For normal text I want to use the Times-Roman font
 * For math's I want to use a different font, i.e. Computer Modern
 
 I think I have to work with typescripts and use combinations of 
 \setupbodyfont but
 I cannot work out the proper combination.
 
 Thanks for any help
 Regards
 Wim

This should work:

\usetypescript[modern]
\usetypescript[times][ec]

\definetypeface[MyFace][rm][serif][times][default][encoding=ec]
\definetypeface[MyFace][mm][math][modern][default][encoding=ec]

\setupbodyfont[MyFace,12pt]

There's some interesting stuff on the wiki:

http://wiki.contextgarden.net/Psnfss

HTH

Thomas

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Mixing fonts ?

2006-05-03 Thread Willi Egger
Hi Wim,

You can have a look into the files in the distribution beginning with 
type-. Most of the free fonts are already defined in those files

\usetypescript[times][texnansi] --- get times, this will result in 
tx-fonts for math.

Otherwise define your own typeface:

\starttypescript[myfont][texnansi]

\definetypeface[Times-CMR][rm][serif][times][default][encoding=\typescripttwo]
\definetypeface[Times-CMR][ss][sans] [helvetica] [default] 
[encoding=\typescripttwo,rscale=0.9]
\definetypeface [Times-CMR] [tt] [mono]  [modern][default] 
[encoding=\typescripttwo,rscale=1.05]
   \definetypeface [Times-CMR] [mm] [math]  [modern] [default] 
[encoding=\typescripttwo]
\stoptypescript

\usetypescript[myfont][texnansi]
\setupbodyfont[Times-CMR, rm, 12pt]

\starttext
This is Times, \fontname\font
\blank
$$a^2 + b^2 = c^2$$

{\switchtobodyfont[ss,16pt] it works}
\stoptext

Another source for getting into this is the context wiki: 
http://wiki.contextgarden.net/Main_Page

Kind regards

Willi

WN wrote:

I am trying to learn more about font switching (read the font manuals 
but to no avail).
The thing I am trying to do is :

* For normal text I want to use the Times-Roman font
* For math's I want to use a different font, i.e. Computer Modern

I think I have to work with typescripts and use combinations of 
\setupbodyfont but
I cannot work out the proper combination.

Thanks for any help
Regards
Wim

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context
  

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context