\ProvidesPackage{librebaskerville}[%
   2020/07/24 (Bob Tennent)  Supports LibreBaskerville fonts for XeLaTeX and LuaLaTeX. ] 

\RequirePackage{iftex}

\ifpdftex
\PackageError{librebaskerville}{%
 *****************************************\MessageBreak
  Please process using XeLaTeX or luaLaTeX\MessageBreak
 *****************************************}
\fi  

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

\ProcessOptionsX\relax

\RequirePackage{fontspec}

\ifxetex\XeTeXtracingfonts=1\fi
\defaultfontfeatures{
   Ligatures = TeX ,
   Extension = .ttf ,
}
\setmainfont
    [ UprightFont    = *-Regular ,
      ItalicFont     = *-Italic ,
      BoldFont       = *-Bold , 
      ]
    {LibreBaskerville}
\newfontfamily\librebaskerville
    [ UprightFont    = *-Regular ,
      ItalicFont     = *-Italic ,
      BoldFont       = *-Bold , 
      ]
    {LibreBaskerville}

% turn off defaults in case other fonts are selected:
\defaultfontfeatures{}

\endinput

