% bergamo.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
% Bergamo and BergamoCondensed 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{bergamo}
   [2002/02/16 v0.9beta FontSite Bergamo font package]

\newif\if@fbbdef
\DeclareOption{default}{\@fbbdeftrue}
% If Option default is used, the choosen Bergamo will be used as \familydefault

\newif\if@fbbnot
\DeclareOption{nodefault}{\@fbbnottrue}
% If Option nodefault is NOT used, the choosen Bergamo will be used
% as \rmdefault, otherwise only the implemented commands will be
% available

\newif\if@fbbnox
\DeclareOption{noexpert}{\@fbbnoxtrue}
% If Option noexpert is NOT used, the expertised Bergamo will be
% used. Otherwise the version without expert chars and SC will be
% used.

\newif\if@fbbosf
\DeclareOption{osf}{\@fbbosftrue}
% 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@fbbnot
% If Option nodefault is used, nothing has to be done here
\else
% If Option nodefault is not used, either fbbr or fbbc has to be used
% as \rmdefault, according to the use of option compressed
  % noexpert and osf are only available in the regular width
  \if@fbbnox % no expert fonts?
    \renewcommand{\rmdefault}{fbb}
  \else % expert fonts
    \if@fbbosf % oldstyle figures?
      \renewcommand{\rmdefault}{fbbj}
    \else % regular figures?
      \renewcommand{\rmdefault}{fbbx}
    \fi
  \fi
% If Option default is used (it makes only sense if nodefault is not
% used), \familydefault will be set to \rmdefault
  \if@fbbdef
    \renewcommand{\familydefault}{\rmdefault}
  \fi
\fi

% noexpert and osf are only available in the regular width
\if@fbbnox % no expert fonts?
  \newcommand{\Bergamo}{\fontfamily{fbb}\selectfont}
\else % expert fonts
  \if@fbbosf % oldstyle figures?
    \newcommand{\Bergamo}{\fontfamily{fbbj}\selectfont}
  \else % regular figures?
    \newcommand{\Bergamo}{\fontfamily{fbbx}\selectfont}
  \fi
\fi

\providecommand{\textfbb}[1]{{\Bergamo #1}}

\newcommand{\Fbb}{\fontfamily{fbb}\selectfont}
\newcommand{\Fbbx}{\fontfamily{fbbx}\selectfont}
\newcommand{\Fbbj}{\fontfamily{fbbj}\selectfont}


\PackageWarning{bergamo}{This package provides SoftMaker/FontSite
  Bergamo as a roman font. That font does not well mix with the
  Computer Modern Math, Sans Serif, or Typewriter fonts. It is
  recommended to use the package eulervm for the math fonts. Choose
  the sans serif and typewriter fonts according to the fonts you have
  installed and your taste.}

\endinput

