From e0c6872cf40896c7be36b11dcc744620f10adf1d Mon Sep 17 00:00:00 2001
From: Norbert Preining <norbert@preining.info>
Date: Mon, 2 Sep 2019 13:46:59 +0900
Subject: Initial commit

---
 fonts/librebaskerville/latex/librebaskerville.sty | 69 +++++++++++++++++++++++
 1 file changed, 69 insertions(+)
 create mode 100644 fonts/librebaskerville/latex/librebaskerville.sty

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

diff --git a/fonts/librebaskerville/latex/librebaskerville.sty b/fonts/librebaskerville/latex/librebaskerville.sty
new file mode 100644
index 0000000000..220ff31d2b
--- /dev/null
+++ b/fonts/librebaskerville/latex/librebaskerville.sty
@@ -0,0 +1,69 @@
+\ProvidesPackage{librebaskerville}[%
+   2012/12/01 (Bob Tennent)  Supports LibreBaskerville fonts for all LaTeX engines. ] 
+
+\RequirePackage{ifxetex,ifluatex,textcomp}
+
+\newif\iflibrebaskerville@otf
+\ifxetex
+  \librebaskerville@otftrue
+\else\ifluatex
+  \librebaskerville@otftrue
+\else  % [pdf]LaTeX
+  \librebaskerville@otffalse
+\fi\fi
+
+\newcommand*{\LibreBaskerville@scale}{1}  
+\RequirePackage{xkeyval}
+\DeclareOptionX{scaled}{\renewcommand*{\LibreBaskerville@scale}{#1}}
+\DeclareOptionX{scale}{\renewcommand*{\LibreBaskerville@scale}{#1}}
+
+\DeclareOptionX{type1}{\librebaskerville@otffalse}
+
+\ProcessOptionsX\relax
+
+\iflibrebaskerville@otf
+  \RequirePackage{fontspec}
+\else
+  \RequirePackage{fontenc,fontaxes}
+\fi
+
+\iflibrebaskerville@otf
+  \ifxetex\XeTeXtracingfonts=1\fi
+  \defaultfontfeatures{
+     Ligatures = TeX ,
+     Extension = .otf ,
+  }
+  \setmainfont
+      [ UprightFont    = *-Regular ,
+        ItalicFont     = *-Italic ,
+        BoldFont       = *-Bold , 
+        BoldItalicFont = *-BoldItalic ]
+      {LibreBaskerville}
+  \newfontfamily\librebaskerville
+      [ UprightFont    = *-Regular ,
+        ItalicFont     = *-Italic ,
+        BoldFont       = *-Bold , 
+        BoldItalicFont = *-BoldItalic ]
+      {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{LibreBaskerville-TLF}
+  \renewcommand*\rmdefault{\librebaskervillefamily}
+  \newcommand*\librebaskerville{\fontfamily{\librebaskervillefamily}\selectfont}
+
+\fi
+\DeclareTextFontCommand{\textsu}{\sufigures}
+
+% turn off defaults in case other fonts are selected:
+\iflibrebaskerville@otf
+  \defaultfontfeatures{}
+\fi
+
+\endinput
+
-- 
cgit v1.2.3

