diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/librebaskerville/librebaskerville.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/librebaskerville/librebaskerville.sty | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/librebaskerville/librebaskerville.sty b/Master/texmf-dist/tex/latex/librebaskerville/librebaskerville.sty new file mode 100644 index 00000000000..220ff31d2b6 --- /dev/null +++ b/Master/texmf-dist/tex/latex/librebaskerville/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 + |