% function.sty
%
% Copyright (c) 2002 Christian Kuhn
% Christian.Kuhn@QNo.de
%
% This file may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
% version 1.2 of this license or (at your option) any later
% version.
% The latest version of this license is in
%   http://www.latex-project.org/lppl.txt
% and version 1.2 or later is part of all distributions of
% LaTeX version 1999/12/01 or later.
%
% You are not allowed to change this file.
%
% This package implements some commands for easy access to the
% Function and FunctionCondensed PostScript-Type1-Fonts from the
% FontSite-500-CD. Necessary .tfm-, .vf-, .fd-, and .map-files come
% bundled with this style. .afm- and .pfb-files must be taken from the
% FontSite-500-CD and renamed according the Karl-Berry-Scheme.
%
\NeedsTeXFormat{LaTeX2e}[1998/06/01]
\ProvidesPackage{function}
   [2002/02/17 v0.9beta FontSite Function font package]

\newif\if@ffucomp
\DeclareOption{compressed}{\@ffucomptrue}
% If Option compressed is used, the FunctionCompressed will be used
% instead of Function.

\newif\if@ffudef
\DeclareOption{default}{\@ffudeftrue}
% If Option default is used, the choosen Function will be used as \familydefault

\newif\if@ffunot
\DeclareOption{nodefault}{\@ffunottrue}
% If Option nodefault is NOT used, the choosen Function will be used
% as \sfdefault, otherwise only the implemented commands will be
% available

\newif\if@ffuosf
\DeclareOption{osf}{\@ffuosftrue}
% If Option osf is used, oldstyle figures are available as normal text
% figures. Regular figures are available in the SC-font.

\ProcessOptions\relax

% Choice of the family
\if@ffunot
% If Option nodefault is used, nothing has to be done here
\else
% If Option nodefault is not used, either ffur or ffuc has to be used
% as \sfdefault, according to the use of option compressed
  \if@ffucomp
    \renewcommand{\sfdefault}{ffuc}
  \else
  % noexpert and osf are only available in the regular width
    \if@ffuosf % oldstyle figures?
      \renewcommand{\sfdefault}{ffurj}
    \else % regular figures?
      \renewcommand{\sfdefault}{ffur}
    \fi
  \fi
% If Option default is used (it makes only sense if nodefault is not
% used), \familydefault will be set to \sfdefault
  \if@ffudef
    \renewcommand{\familydefault}{\sfdefault}
  \fi
\fi

\if@ffucomp
  \newcommand{\Function}{\fontfamily{ffuc}\selectfont}
\else
% noexpert and osf are only available in the regular width
  \if@ffuosf % oldstyle figures?
    \newcommand{\Function}{\fontfamily{ffurj}\selectfont}
  \else % regular figures?
    \newcommand{\Function}{\fontfamily{ffurx}\selectfont}
  \fi
  \providecommand{\dishape}{\fontshape{di}\selectfont}
  \providecommand{\textdi}[1]{{\dishape #1}}
  \providecommand{\srshape}{\fontseries{sr}\selectfont}
  \providecommand{\textsr}[1]{{\srshape #1}}
\fi

\providecommand{\textffu}[1]{{\Function #1}}

\providecommand{\liseries}{\fontseries{l}\selectfont}
\providecommand{\textli}[1]{{\liseries #1}}
\providecommand{\ebseries}{\fontseries{eb}\selectfont}
\providecommand{\texteb}[1]{{\ebseries #1}}

\newcommand{\Ffu}{\fontfamily{ffu}\selectfont}
\newcommand{\Ffur}{\fontfamily{ffur}\selectfont}
\newcommand{\Ffuc}{\fontfamily{ffuc}\selectfont}
\newcommand{\Ffuj}{\fontfamily{ffuj}\selectfont}
\newcommand{\Ffurj}{\fontfamily{ffurj}\selectfont}


\PackageWarning{function}{This package provides SoftMaker/FontSite
  Function as a sansserif font. That font does not well mix with the
  Computer Modern Math, Roman, or Typewriter fonts. It is
  recommended to use the package eulervm for the math fonts. Choose
  the serif and typewriter fonts according to the fonts you have
  installed and your taste.}

\endinput

