% output=pdftex
%
% copyright=pragma-ade readme=readme.pdf licence=cc-by-nc-sa

\usemodule[mathml]

\usetypescript[map][all]

\setupcolors
  [state=start]

\setuppapersize
  [S6][S6]

\setuplayout
  [backspace=24pt,
   topspace=24pt,
   header=0pt,
   footer=26pt,
   width=middle,
   height=middle]

\setuptyping
  [before=,
   blank=medium,
   after=]

\setupbackgrounds
  [page]
  [background=color,
   backgroundcolor=PageColor]

\setupbackgrounds
  [text]
  [foregroundcolor=TextColor]

\definecolor[PageColor][r=1,g=1,b=.75]
\definecolor[TextColor][r=.2,g=.2,b=.6]
\definecolor[MathColor][r=.6,g=.2,b=.2]
\definecolor[SampColor][r=.2,g=.2,b=.2]
\definecolor[FootColor][TextColor]

\setupencoding[default=ec] \usetypescript[all][map][all] % [ec,texnansi,default]

\definetypeface [main] [tt] [mono] [modern]

\def\TextSample
  {\startcolor[TextColor]\input zapf.tex \par \stopcolor}

\def\MathSample
  {%$\sin(12) \log(345)$ \mm $\sin(12) \log(345)$
   \startcolor[MathColor]\mm\processXMLfilegrouped{pc-i-380.xml}\stopcolor}

\def\ShowSample
  {\bgroup \main \tt \typebuffer \egroup}

\definefontsynonym [KindOfMono] [cmvtt10]
\definefont [FootFont] [KindOfMono at 10pt]

\setupfooter
  [color=FootColor,
   style=FootFont]

\def\Affiliation#1#2#3%
  {\setupfootertexts
     []
     [\doifsomething{#1}{\quad name:    #1}%
      \doifsomething{#2}{\quad author:  #2}%
      \doifsomething{#3}{\quad foundry: #3}]}

\def\Comment#1%
  {\setupfootertexts[][#1]}

\def\compoundhyphen{-} % Nowadays we can dusable ligatures

\setupmakeup[standard][footerstate=start]

\starttext

\startstandardmakeup[footerstate=high]

\leftaligned {\color[TextColor]{\definedfont[KindOfMono at 72pt]Fonts in}}
\vskip24pt
\rightaligned{\color[TextColor]{\definedfont[KindOfMono at 96pt]\ConTeXt}}
\vskip48pt
\leftaligned {\color[MathColor]{\definedfont[KindOfMono at 36pt]Examples Of Using Typescripts}}
\vfill
\rightaligned{\color[MathColor]{\definedfont[KindOfMono at 24pt]www.pragma-ade.com}}


\stopstandardmakeup

\startbuffer
\definetypeface [zapf] [cg] [calligraphy] [chancery]

\switchtotypeface [zapf] [12pt,cg]
\stopbuffer

\Affiliation{Chancery}{Hermann Zapf}{URW}

\startstandardmakeup
  \getbuffer \TextSample \vfill \ShowSample
\stopstandardmakeup

\startbuffer
\definetypeface [palatino] [rm] [serif] [palatino] [default] [encoding=ec]

\switchtotypeface [palatino] [12pt,rm]
\stopbuffer

\Affiliation{Palatino}{}{URW}

\startstandardmakeup
  \getbuffer \TextSample \vfill \ShowSample
\stopstandardmakeup

\startbuffer
\definetypeface [times] [rm] [serif] [times] [default] [encoding=ec]

\switchtotypeface [times] [12pt,rm]
\stopbuffer

\Affiliation{Times}{}{URW}

\startstandardmakeup
  \getbuffer \TextSample \vfill \ShowSample
\stopstandardmakeup

\startbuffer
\definetypeface [helvetica] [ss] [sans] [helvetica] [default] [encoding=ec]

\switchtotypeface [helvetica] [12pt,ss]
\stopbuffer

\Affiliation{Helvetica}{}{URW}

\startstandardmakeup
  \getbuffer \TextSample \vfill \ShowSample
\stopstandardmakeup

\startbuffer
\definetypeface [bookman] [rm] [serif] [bookman] [default] [encoding=ec]

\switchtotypeface [bookman] [12pt,rm]
\stopbuffer

\Affiliation{Bookman}{}{URW}

\startstandardmakeup
  \getbuffer \TextSample \vfill \ShowSample
\stopstandardmakeup

\startbuffer
\definetypeface [utopia] [rm] [serif] [utopia] [default] [encoding=ec]

\switchtotypeface [utopia] [12pt,rm]
\stopbuffer

\Affiliation{Utopia}{}{Adobe}

\startstandardmakeup
  \getbuffer \TextSample \vfill \ShowSample
\stopstandardmakeup

\startbuffer
\definetypeface [charter] [rm] [serif] [charter] [default] [encoding=ec]

\switchtotypeface [charter] [12pt,rm]
\stopbuffer

\Affiliation{Charter}{}{Bitstream}

\startstandardmakeup
  \getbuffer \TextSample \vfill \ShowSample
\stopstandardmakeup

\startmode[atpragma]

\startbuffer
\definetypeface [informal] [rm] [casual] [informal] [default] [encoding=default]
\definetypeface [informal] [mm] [math] [informal] [default] [encoding=default]

\switchtotypeface [informal] [12pt,rm]
\stopbuffer

\Affiliation{Informal}{Mike Vulis}{V\TeX}

\startstandardmakeup
  \getbuffer \TextSample \vfill \MathSample \vfill \ShowSample
\stopstandardmakeup

\stopmode

\startbuffer
\definetypeface [postscript] [rm] [serif] [times]     [default]
\definetypeface [postscript] [ss] [sans]  [helvetica] [default] [rscale=.9]
\definetypeface [postscript] [tt] [mono]  [courier]   [default] [rscale=1.1]

\switchtotypeface [postscript] [11pt]
\stopbuffer

\Comment{Weighted combination (available as typescript \quote{postscript})}

\startstandardmakeup
  \getbuffer
  \rm \TextSample \blank
  \ss \TextSample \blank
  \tt \setuptolerance[space] \TextSample \vfill
  \ShowSample
\stopstandardmakeup

\startbuffer
\usetypescript [modern] [ec]

\switchtotypeface [modern] [10pt]
\stopbuffer

\Affiliation{Computer \& Latin Modern}{D.E.\ Knuth \& B.\ Jackowski}{AMS/Blue Sky \& GUST}

\startstandardmakeup
  \getbuffer
  \rm \TextSample \blank
  \ss \TextSample \blank
  \tt \setuptolerance[space] \TextSample \vfill
  \mm \MathSample \vfill
  \ShowSample
\stopstandardmakeup

\startmode[atpragma]

\startbuffer
\usetypescript [lucida] [texnansi]

\switchtotypeface [lucida] [9pt]
\stopbuffer

\Affiliation{Lucida Bright}{B\&H}{}

\startstandardmakeup
  \getbuffer
  \rm \TextSample \blank
  \ss \TextSample \blank
  \tt \setuptolerance[space] \TextSample \vfill
  \mm \MathSample \vfill
  \ShowSample
\stopstandardmakeup

\stopmode

\startbuffer
\usetypescript [palatino] [ec]

\switchtotypeface [palatino] [10pt]
\stopbuffer

\Comment{Palatino (serif) combined with computer modern (mono)}

\startstandardmakeup
  \getbuffer
  \rm \TextSample \blank
  \tt \setuptolerance[space] \TextSample \vfill
  \mm \MathSample \vfill
  \ShowSample
\stopstandardmakeup

\startbuffer
\definetypeface [palatino] [rm] [serif] [palatino] [default] [encoding=ec]
\definetypeface [palatino] [mm] [math]  [palatino] [default] [encoding=ec]

\switchtotypeface [palatino] [12pt,rm]
\stopbuffer

\Affiliation{Palatino}{Young Ryu}{URW/PX}

\startstandardmakeup
  \getbuffer \TextSample \vfill \MathSample \vfill \ShowSample
\stopstandardmakeup

\startbuffer
\definetypeface [times] [rm] [serif] [times] [default] [encoding=ec]
\definetypeface [times] [mm] [math]  [times] [default] [encoding=ec]

\switchtotypeface [times] [12pt,rm]
\stopbuffer

\Affiliation{Times}{Young Ryu}{URW/TX}

\startstandardmakeup
  \getbuffer \TextSample \vfill \MathSample \vfill \ShowSample
\stopstandardmakeup

\startbuffer
\definetypeface [iwona] [ss] [sans] [iwona] [default] [encoding=ec]
\definetypeface [iwona] [mm] [math] [iwona] [default] [encoding=ec]

\switchtotypeface [iwona] [12pt,ss]
\stopbuffer

\Affiliation{Iwona}{Janusz Nowacki}{GUST}

\startstandardmakeup
  \getbuffer \TextSample \vfill \MathSample \vfill \ShowSample
\stopstandardmakeup

\startbuffer
\definetypeface [kurier] [ss] [sans] [kurier] [default] [encoding=ec]
\definetypeface [kurier] [mm] [math] [kurier] [default] [encoding=ec]

\switchtotypeface [kurier] [12pt,ss]
\stopbuffer

\Affiliation{Kurier}{Janusz Nowacki}{GUST}

\startstandardmakeup
  \getbuffer \TextSample \vfill \MathSample \vfill \ShowSample
\stopstandardmakeup

\startbuffer
\definetypeface [antykwa] [rm] [serif] [antykwa-torunska] [default] [encoding=ec]
\definetypeface [antykwa] [mm] [math]  [antykwa-torunska] [default] [encoding=ec]

\switchtotypeface [antykwa] [12pt,rm]
\stopbuffer

\Affiliation{Antykwa Torunska}{Janusz Nowacki}{GUST}

\startstandardmakeup
  \getbuffer \TextSample \vfill \MathSample \vfill \ShowSample
\stopstandardmakeup

\Comment{a couple of remarks}

\startstandardmakeup

\setupwhitespace[big]

\startcolor[SampColor] \FootFont

Lectori Salutem,

This file shows a couple of fonts and their invocation in
\ConTeXt. More information on typescripts can be found in
the manual {\MathColor Fonts in \ConTeXt}. Fonts can be
installed using the {\MathColor texfont.pl} Perl script
which can generate the font metrics needed. This script is
part of the \ConTeXt\ distribution.

% There will be predefined typescripts for the following math
% fonts. They are currently tested and will be available when
% the new math vectors and math module are released.

% \startitemize [packed,2]
% \item math times (extended) from Spivak
% \item helvetica (and more) math from Vulis
% \stopitemize

% There will also be a couple of more non-free math fonts set
% up. The availability of typescripts will depend on the
% availability of these fonts for testing.

\startlines
Hans Hagen
PRAGMA-ADE
Hasselt NL
\currentdate
\stoplines

\stopcolor

\vfill
\stopstandardmakeup

\stoptext

pc-d-007.xml
pc-d-043.xml
pc-i-022.xml
pc-i-061.xml
pc-i-380.xml
wh-g-016.xml
wh-s-001.xml
wh-s-002.xml
