summaryrefslogtreecommitdiff
path: root/fonts/oldstandard/latex/OldStandard.sty
diff options
context:
space:
mode:
Diffstat (limited to 'fonts/oldstandard/latex/OldStandard.sty')
-rw-r--r--fonts/oldstandard/latex/OldStandard.sty76
1 files changed, 76 insertions, 0 deletions
diff --git a/fonts/oldstandard/latex/OldStandard.sty b/fonts/oldstandard/latex/OldStandard.sty
new file mode 100644
index 0000000000..dcbf2ab8da
--- /dev/null
+++ b/fonts/oldstandard/latex/OldStandard.sty
@@ -0,0 +1,76 @@
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{OldStandard}
+ [2019/07/25 (Bob Tennent and autoinst) Style file for Old Standard fonts.]
+
+\RequirePackage{ifxetex,ifluatex,xkeyval,textcomp}
+
+\newif\ifoldstandard@otf
+\ifxetex
+ \oldstandard@otftrue
+\else\ifluatex
+ \oldstandard@otftrue
+\else % [pdf]LaTeX
+ \oldstandard@otffalse
+ \fi\fi
+
+\RequirePackage{fontaxes}
+
+\newcommand*{\OldStandard@scale}{1}
+\RequirePackage{xkeyval}
+\DeclareOptionX{scaled}{\renewcommand*{\OldStandard@scale}{#1}}
+\DeclareOptionX{scale}{\renewcommand*{\OldStandard@scale}{#1}}
+\DeclareOptionX{type1}{\oldstandard@otffalse}
+
+\ProcessOptionsX\relax
+
+\ifoldstandard@otf
+ \RequirePackage{fontspec}
+\else
+ \RequirePackage{fontenc,fontaxes}
+\fi
+
+\ifoldstandard@otf
+ \ifxetex\XeTeXtracingfonts=1\fi
+ \defaultfontfeatures{
+ Ligatures = TeX ,
+ Scale = \OldStandard@scale ,
+ Extension = .otf }
+ \setmainfont
+ [ UprightFont = *-Regular ,
+ ItalicFont = *-Italic ,
+ BoldFont = *-Bold ,
+ BoldItalicFont = *-BoldItalic ,
+ ]
+ {OldStandard}
+ \newfontfamily\oldstandard
+ [ UprightFont = *-Regular ,
+ ItalicFont = *-Italic ,
+ BoldFont = *-Bold ,
+ BoldItalicFont = *-BoldItalic ,
+ ]
+ {OldStandard}
+
+ \providecommand\sufigures{\addfontfeatures{VerticalPosition=Superior}}
+
+
+\else % type1
+
+ \def\oldstandard@family{OldStandard-TLF}
+ \renewcommand*\rmdefault{\oldstandard@family}
+ \newcommand*\oldstandard{\fontfamily{\oldstandard@family}\selectfont}
+
+ \fa@naming@exception{figures}{{superior}{proportional}}{Sup}
+ \fa@naming@exception{figures}{{superior}{tabular}}{Sup}
+ \providecommand\sufigures{\@nomath\sufigures\fontfigurestyle{superior}\selectfont}
+
+\fi
+
+\DeclareTextFontCommand{\textsu}{\sufigures}
+
+\def\oldstandardlgr{\fontencoding{LGR}\fontfamily{OldStandard-TLF}\selectfont}
+
+\ifoldstandard@otf
+ \defaultfontfeatures{}
+\fi
+
+\endinput