\ProvidesPackage{accanthis}[%
   2022/10/22 (Bob Tennent)  Supports Accanthis No. 3 fonts for all LaTeX engines. ] 

\RequirePackage{ifxetex,ifluatex,textcomp}

\newif\ifaccanthis@otf
\ifxetex
  \accanthis@otftrue
\else\ifluatex
  \accanthis@otftrue
\else  % [pdf]LaTeX
  \accanthis@otffalse
\fi\fi

\newif\ifaccanthis@lining \accanthis@liningtrue

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

\DeclareOptionX{type1}{\accanthis@otffalse}

\ProcessOptionsX\relax

\ifaccanthis@otf
  \RequirePackage{fontspec}
\else
  \RequirePackage{fontenc,fontaxes}
\fi

\ifaccanthis@otf
  \defaultfontfeatures{
     Ligatures = TeX ,
     Extension = .otf ,
     Scale     = \AccanthisADFStdNoThree@scale ,
  }
  \setmainfont
      [ UprightFont    = *-Regular ,
        ItalicFont     = *-Italic ,
        BoldFont       = *-Bold , 
        BoldItalicFont = *-BoldItalic ]
      {AccanthisADFStdNo3}
  \newfontfamily\accanthis
      [ UprightFont    = *-Regular ,
        ItalicFont     = *-Italic ,
        BoldFont       = *-Bold , 
        BoldItalicFont = *-BoldItalic ]
      {AccanthisADFStdNo3}

\else % type1

  \def\accanthisfamily{AccanthisADFStdNoThree-LF}
  \providecommand*\accanthis{\fontfamily{\accanthisfamily}\selectfont}
  \renewcommand*\rmdefault{\accanthisfamily}

\fi

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

\endinput

