summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/librebaskerville/librebaskerville.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-12-02 02:13:05 +0000
committerKarl Berry <karl@freefriends.org>2012-12-02 02:13:05 +0000
commit8f8ed7ea50eb3ff4b0fad6db48f6127f0d0261be (patch)
treead1084f02308542fd6b3f53d178a9abc17e92b32 /Master/texmf-dist/tex/latex/librebaskerville/librebaskerville.sty
parent23916347932fe1f7bae3f1f8c84b8f1cfcfcfa4c (diff)
new font librebaskerville (1dec12)
git-svn-id: svn://tug.org/texlive/trunk@28412 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/librebaskerville/librebaskerville.sty')
-rw-r--r--Master/texmf-dist/tex/latex/librebaskerville/librebaskerville.sty69
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
+