%D \module
%D   [       file=font-lbr,
%D        version=1995.1.1,
%D          title=\CONTEXT\ Font Macros,
%D       subtitle=Lucida Bright,
%D         author=Hans Hagen,
%D           date=\currentdate,
%D      copyright={PRAGMA / Hans Hagen \& Ton Otten}]

%D The Lucida Bright fonts are both good looking and and
%D complete. These fonts have prebuilt accented characters,
%D which means that we use another encoding vector: \YandY\
%D texnansi. These fonts are a good illustration that a 12 
%D point bodyfont is indeed never that size. The Lucida Bright 
%D fonts come in one design size. 

\definefontsynonym [Serif]              [LucidaBright]
\definefontsynonym [SerifBold]          [LucidaBright-Demi]
\definefontsynonym [SerifItalic]        [LucidaBright-Italic]
\definefontsynonym [SerifSlanted]       [LucidaBright-Oblique]
\definefontsynonym [SerifBoldItalic]    [LucidaBright-DemiItalic]
\definefontsynonym [SerifBoldSlanted]   [LucidaBright-DemiItalic]
\definefontsynonym [SerifCaps]          [LucidaBrightSmallcaps]

\definefontsynonym [Sans]               [LucidaSans]
\definefontsynonym [SansBold]           [LucidaSans-Demi]
\definefontsynonym [SansItalic]         [LucidaSans-Italic]
\definefontsynonym [SansSlanted]        [LucidaSans-Italic]
\definefontsynonym [SansBoldItalic]     [LucidaSans-DemiItalic]
\definefontsynonym [SansBoldSlanted]    [LucidaSans-DemiItalic]
\definefontsynonym [SansCaps]           [LucidaSans]

\definefontsynonym [Mono]               [LucidaSans-Typewriter]
\definefontsynonym [MonoBold]           [LucidaSans-TypewriterBold]
\definefontsynonym [MonoItalic]         [LucidaSans-TypewriterOblique]
\definefontsynonym [MonoSlanted]        [LucidaSans-TypewriterOblique]
\definefontsynonym [MonoBoldItalic]     [LucidaSans-TypewriterBoldOblique]
\definefontsynonym [MonoBoldSlanted]    [LucidaSans-TypewriterBoldOblique]
\definefontsynonym [MonoCaps]           [LucidaSans-Typewriter]

\definefontsynonym [MathRoman]          [LucidaBright]
\definefontsynonym [MathExtension]      [LucidaNewMath-Extension]
\definefontsynonym [MathItalic]         [LucidaNewMath-AltItalic]
\definefontsynonym [MathSymbol]         [LucidaNewMath-Symbol]
\definefontsynonym [MathAlpha]          [LucidaNewMath-Arrows]

\definefontsynonym [Handwriting]        [LucidaHandwriting-Italic]
\definefontsynonym [Calligraphy]        [LucidaCalligraphy-Italic]

\definefontsynonym [OldStyle]           [MathItalic]

\definebodyfont 
  [14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt,4pt] 
  [rm,ss,tt,mm] 
  [default]

%D Some nice aditional ones.

\definebodyfont 
  [14.4pt,12pt,11pt,10pt,9pt,8pt] 
  [hw,cg]
  [default]

%D Defining the larger alternatives takes only a few 
%D commands, thanks to \type{sa}. 

%D The Lucida Bright TeleType font does not contain \TEX's 
%D visual space. The next definition offers an alternative.

\def\controlspace% slow slow slow
  {\hbox to .5em
     {\font\next=cmtt10 at \bodyfontsize\next
      \hss\char32\hss}}

% \def\controlspace% 
%   {\hbox to .5em
%      {\hss
%       \vrule\!!width .1\dp\strutbox \!!height\!!zeropoint \!!depth .7\dp\strutbox 
%       \vrule\!!width .4em\!!height -.6\dp\strutbox\!!depth .7\dp\strutbox
%       \vrule\!!width .1\dp\strutbox \!!height\!!zeropoint \!!depth .7\dp\strutbox
%       \hss}}

%D Next we implement some alternatives for \AMS\ symbols. 
%D These can be overrules by loading the \AMS\ font module 
%D afterwards. 

\unprotect 

\mathchardef\blacktriangleleft ="01F0 
\mathchardef\blacktriangleright="01F1 
\mathchardef\boxtimes          ="02EC 

%D Here I copied the definition file that is part of the 
%D \YandY\ distribution.  

%D \framed[breedte=\hsize]
%D   {Copyright (C) 1991 - 1993 \YandY, Inc. All Rights Reserved} 

%D This part of the definition is adapted bij J. Hagen. There
%D is already an extra family: \type{\mafam} (Math A ). Also, 
%D the loading of fonts is done somewhere else. 

\let\arfam    = \mafam
\let\thearfam = \hexmafam

%D This part is adapted to the \CONTEXT\ font||naming method.
%D Also, we use \type{\setskewchar}, which activates the not 
%D yet loaded font.   

%D The next definitions are already taken care of.  

%D \starttypen
%D % \setskewchar{12ptmmmi}='177
%D % \setskewchar{11ptmmmi}='177 
%D % \setskewchar{10ptmmmi}='177 
%D % \setskewchar{9ptmmmi}='177
%D % \setskewchar{8ptmmmi}='177 
%D % \setskewchar{7ptmmmi}='177 
%D % \setskewchar{6ptmmmi}='177
%D % \setskewchar{5ptmmmi}='177
%D \stoptypen
 
%D \starttypen
%D % \setskewchar{12ptmmsy}='60
%D % \setskewchar{11ptmmsy}='60 
%D % \setskewchar{10ptmmsy}='60 
%D % \setskewchar{9ptmmsy}='60
%D % \setskewchar{8ptmmsy}='60 
%D % \setskewchar{7ptmmsy}='60 
%D % \setskewchar{6ptmmsy}='60
%D % \setskewchar{5ptmmsy}='60
%D \stoptypen

%D Adjusted for LucidaNewMath||Extension at 10pt and math axis
%D at 3.13pt Note: delimiter increments are 5.5pt (as opposed
%D to 6pt in \kap{CM}). 

%D Should these be adapted to \type {\bodyfontsize} ? 

\def\big    #1{{\hbox{$\left#1\vbox to8.20\p@{}\right.\n@space$}}}
\def\Big    #1{{\hbox{$\left#1\vbox to10.80\p@{}\right.\n@space$}}}
\def\bigg   #1{{\hbox{$\left#1\vbox to13.42\p@{}\right.\n@space$}}}
\def\Bigg   #1{{\hbox{$\left#1\vbox to16.03\p@{}\right.\n@space$}}}
\def\biggg  #1{{\hbox{$\left#1\vbox to17.72\p@{}\right.\n@space$}}}
\def\Biggg  #1{{\hbox{$\left#1\vbox to21.25\p@{}\right.\n@space$}}}
\def\n@space  {\nulldelimiterspace\z@ \m@th}

%D Define some extra large sizes. It's always done using 
%D extensible parts.

\def\bigggl{\mathopen \biggg}
\def\bigggr{\mathclose\biggg}
\def\Bigggl{\mathopen \Biggg}
\def\Bigggr{\mathclose\Biggg}

%D The following is needed if the roman text font is {\em 
%D not} just \kap{LBR}.

%D Draw the small sizes of $[$ and $]$ from \kap{LBMO} instead
%D of \kap{LBR}.

\mathcode`\[="4186 \delcode`\[="186302
\mathcode`\]="5187 \delcode`\]="187303

%D Draw the small sizes of $($ and $)$ from \kap{LBMO} instead 
%D of \kap{LBR}.

\mathcode`\(="4184 \delcode`\(="184300
\mathcode`\)="5185 \delcode`\)="185301

%D The small sizes of $\{$ and $\}$ are already drawn from 
%D \kap{LBMS}. 

%D Draw small $/$ from \kap{LBMO} instead of \kap{LBR}.

\mathcode`\/="013D \delcode`\/="13D30E

%D Draw $=$ and $+$ from \kap{LBMS} instead of \kap{LBR}.

% interferes with \mf settings 
%
% \mathcode`\=="3283 \mathcode`\+="2282

%D Make open face brackets accessible, i.e. [[ and ]].

\def\ldbrack{\delimiter"4182382}
\def\rdbrack{\delimiter"5183383}

%D Provide access to surface integral signs (linked from text 
%D to display size).

\mathchardef\surfintop="1390 
\def\surfint{\surfintop\nolimits}

%D Make medium size integrals available ({\em not} linked to 
%D display size).

\mathchardef\midintop="1392 
\def\midint{\midintop\nolimits}

\mathchardef\midointop="1393 
\def\midoint{\midointop\nolimits}

\mathchardef\midsurfintop="1394 
\def\midsurfint{\midsurfintop\nolimits}

%D Extensible integral (use with \type{\bigg}, \type{\Bigg}, 
%D \type{\biggg}, \type{\Biggg} etc).

\def\largeint{\delimiter"135A395}

%D Various types of small integrals.

\mathchardef\dblint  ="0188
\mathchardef\trplint ="0189
\mathchardef\contint ="018A
\mathchardef\surfint ="018B
\mathchardef\volint  ="018C
\mathchardef\clwint  ="018D
\mathchardef\cclwcint="018E
\mathchardef\clwcint ="018F

%D To close up gaps in special math characters constructed 
%D from pieces.

\def\joinrel{\mathrel{\mkern-4mu}} 

%D Some characters that need construction in \kap{CM} exist 
%D complete in \kap{LBMO} or \kap{LBMS}.

\mathchardef\bowtie="31F6
\mathchardef\models="32EE
\mathchardef\doteq ="32C9
\mathchardef\cong  ="329B
\mathchardef\angle ="028B

%D Some more characters.

% \mathchardef\hbar           ="0\thearfam 1B

\mathchardef\hbar             ="019D
\mathchardef\neq              ="3\thearfam 94
\mathchardef\rightleftharpoons="3\thearfam 7A
\mathchardef\leftrightharpoons="3\thearfam 79
\mathchardef\hookleftarrow    ="3\thearfam 3C
\mathchardef\hookrightarrow   ="3\thearfam 3E
\mathchardef\mapsto           ="3\thearfam 2C

% \def\longmapsto{\mapstochar\longrightarrow}

%D The ( is not large enough for strut in \kap{LBMO}.

\def\mathstrut{\vphantom{f}}

%D In $n$\hoog{th} root, don't want the $n$ to come too close 
%D to the radical.

\def\r@@t#1#2%
  {\setbox\z@\hbox{$\m@th#1\sqrt{#2}$}
   \dimen@\ht\z@ \advance\dimen@-\dp\z@
   \mkern5mu\raise.6\dimen@\copy\rootbox \mkern-7.5mu \box\z@}

%D Draw upper case upright greek from LucidaNewMath||Extension.

\mathchardef\Gamma  ="03D0
\mathchardef\Delta  ="03D1
\mathchardef\Theta  ="03D2
\mathchardef\Lambda ="03D3
\mathchardef\Xi     ="03D4
\mathchardef\Pi     ="03D5
\mathchardef\Sigma  ="03D6
\mathchardef\Upsilon="03D7
\mathchardef\Phi    ="03D8
\mathchardef\Psi    ="03D9
\mathchardef\Omega  ="03DA

%D Draw upper case italic greek from LucidaNewMath||Italic. 

\mathchardef\varGamma  ="0100
\mathchardef\varDelta  ="0101
\mathchardef\varTheta  ="0102
\mathchardef\varLambda ="0103
\mathchardef\varXi     ="0104
\mathchardef\varPi     ="0105
\mathchardef\varSigma  ="0106
\mathchardef\varUpsilon="0107
\mathchardef\varPhi    ="0108
\mathchardef\varPsi    ="0109
\mathchardef\varOmega  ="010A

%D \type{\matrix} is changed because \kap{LBMO} is not at 10pt.

\def\matrix#1%
  {\null\,\vcenter{\normalbaselines\m@th
   \ialign{\hfil$##$\hfil&&\quad\hfil$##$\hfil\crcr
   \mathstrut\crcr\noalign{\kern-0.9\baselineskip}
   #1\crcr\mathstrut\crcr\noalign{\kern-0.9\baselineskip}}}\,}

\protect

\endinput
