From ea6d4bea686850292393a94755801b76ef66ec22 Mon Sep 17 00:00:00 2001
From: Norbert Preining <norbert@preining.info>
Date: Tue, 28 Jul 2020 03:01:51 +0000
Subject: CTAN sync 202007280301

---
 fonts/librebaskerville/latex/librebaskerville.sty | 81 +++++++++++++++--------
 1 file changed, 53 insertions(+), 28 deletions(-)

(limited to 'fonts/librebaskerville/latex/librebaskerville.sty')

diff --git a/fonts/librebaskerville/latex/librebaskerville.sty b/fonts/librebaskerville/latex/librebaskerville.sty
index 4bd08fb21a..8700cdfa35 100644
--- a/fonts/librebaskerville/latex/librebaskerville.sty
+++ b/fonts/librebaskerville/latex/librebaskerville.sty
@@ -1,44 +1,69 @@
 \ProvidesPackage{librebaskerville}[%
-   2020/07/24 (Bob Tennent)  Supports LibreBaskerville fonts for XeLaTeX and LuaLaTeX. ] 
+   2020/07/28 (Bob Tennent)  Supports LibreBaskerville fonts for all LaTeX engines. ] 
 
-\RequirePackage{iftex}
+\RequirePackage{ifxetex,ifluatex,textcomp}
 
-\ifpdftex
-\PackageError{librebaskerville}{%
- *****************************************\MessageBreak
-  Please process using XeLaTeX or luaLaTeX\MessageBreak
- *****************************************}
-\fi  
+\newif\iflibrebaskerville@ttf
+\ifxetex
+  \librebaskerville@ttftrue
+\else\ifluatex
+  \librebaskerville@ttftrue
+\else  % [pdf]LaTeX
+  \librebaskerville@ttffalse
+\fi\fi
 
 \newcommand*{\LibreBaskerville@scale}{1}  
 \RequirePackage{xkeyval}
 \DeclareOptionX{scaled}{\renewcommand*{\LibreBaskerville@scale}{#1}}
 \DeclareOptionX{scale}{\renewcommand*{\LibreBaskerville@scale}{#1}}
 
+\DeclareOptionX{type1}{\librebaskerville@ttffalse}
+
 \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}
+\iflibrebaskerville@ttf
+  \RequirePackage{fontspec}
+\else
+  \RequirePackage{fontenc,fontaxes}
+\fi
+
+\iflibrebaskerville@ttf
+  \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}
+  \providecommand\sufigures{\addfontfeatures{VerticalPosition=Superior}}
+
+
+\else % type1
+
+  \fa@naming@exception{figures}{{superior}{proportional}}{Sup}
+  \fa@naming@exception{figures}{{superior}{tabular}}{Sup}
+  \providecommand\sufigures{\@nomath\sufigures\fontfigurestyle{superior}\selectfont}
+  \def\librebaskervillefamily{LibreBskvl-LF}
+  \renewcommand*\rmdefault{\librebaskervillefamily}
+  \newcommand*\librebaskerville{\fontfamily{\librebaskervillefamily}\selectfont}
+
+\fi
+\DeclareTextFontCommand{\textsu}{\sufigures}
 
 % turn off defaults in case other fonts are selected:
-\defaultfontfeatures{}
+\iflibrebaskerville@ttf
+  \defaultfontfeatures{}
+\fi
 
 \endinput
 
-- 
cgit v1.2.3

