<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{bitter}
    [2022/09/28 (R.D. Tennent)  Supports Bitter fonts for all LaTeX engines.]

\RequirePackage{ifxetex,ifluatex,textcomp}

\newif\ifBitter@ttf
\ifxetex
  \Bitter@ttftrue
\else\ifluatex
  \Bitter@ttftrue
\else  % [pdf]LaTeX
  \Bitter@ttffalse
\fi\fi

\newcommand*{\Bttr@scale}{1}  
\RequirePackage{xkeyval}
\DeclareOptionX{scaled}{\renewcommand*{\Bttr@scale}{#1}}
\DeclareOptionX{scale}{\renewcommand*{\Bttr@scale}{#1}}

\DeclareOptionX{type1}{\Bitter@ttffalse}

\ProcessOptionsX\relax

\ifBitter@ttf
  \RequirePackage{fontspec}
\else
  \RequirePackage{fontenc,fontaxes,mweights}
\fi

\ifBitter@ttf
  \def\Bitter@regular{Regular}
  \defaultfontfeatures{
     Ligatures = TeX ,
     Extension = .ttf ,
     Scale     = \Bttr@scale ,
  }
  \setmainfont
      [ UprightFont    = *-Regular ,
        ItalicFont     = *-Italic ,
        BoldFont       = *-Bold , 
      ]
      {Bitter}
  % grab current family in case of subsequent change:
  \let\Bitterfamily\rmdefault 

  \newfontfamily\bitter
      [ UprightFont    = *-Regular ,
        ItalicFont     = *-Italic ,
        BoldFont       = *-Bold , 
      ]
      {Bitter}

\else % type1

  \def\bfseries@rm{b}
  \def\mdseries@rm{m}
  \def\seriesdefault{\mdseries@rm}
  \def\bitterfamily{Bttr-TLF}
  \def\bitter{\fontfamily{\bitterfamily}\selectfont}
  \def\rmdefault{\bitterfamily}

\fi

% turn off defaults in case other fonts are selected:
\ifBitter@ttf
  \defaultfontfeatures{}
\fi

\endinput

</pre></body></html>