diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /fonts/theanooldstyle/latex/TheanoOldStyle.sty |
Initial commit
Diffstat (limited to 'fonts/theanooldstyle/latex/TheanoOldStyle.sty')
-rw-r--r-- | fonts/theanooldstyle/latex/TheanoOldStyle.sty | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/fonts/theanooldstyle/latex/TheanoOldStyle.sty b/fonts/theanooldstyle/latex/TheanoOldStyle.sty new file mode 100644 index 0000000000..a00637772e --- /dev/null +++ b/fonts/theanooldstyle/latex/TheanoOldStyle.sty @@ -0,0 +1,93 @@ +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{TheanoOldStyle} + [2019/07/27 (Bob Tennent and autoinst) Style file for Theano OldStyle fonts.] + +\RequirePackage{ifxetex,ifluatex,xkeyval,textcomp} + +\newif\iftheanooldstyle@ttf +\ifxetex + \theanooldstyle@ttftrue +\else\ifluatex + \theanooldstyle@ttftrue +\else % [pdf]LaTeX + \theanooldstyle@ttffalse + \fi\fi + +\RequirePackage{fontaxes} + +\newcommand*{\TheanoOldStyle@scale}{1} +\RequirePackage{xkeyval} +\DeclareOptionX{scaled}{\renewcommand*{\TheanoOldStyle@scale}{#1}} +\DeclareOptionX{scale}{\renewcommand*{\TheanoOldStyle@scale}{#1}} +\DeclareOptionX{type1}{\theanooldstyle@ttffalse} + +\newif\iftheanooldstyle@lining \theanooldstyle@liningtrue +\DeclareOptionX{osf}{\theanooldstyle@liningfalse} +\DeclareOptionX{oldstyle}{\theanooldstyle@liningfalse} + +\ProcessOptionsX\relax + +\iftheanooldstyle@ttf + \RequirePackage{fontspec} + \iftheanooldstyle@lining + \def\theanooldstyle@figurealign{} + \else + \def\theanooldstyle@figurealign{OldStyle} + \fi +\else + \RequirePackage{fontenc,fontaxes} + \iftheanooldstyle@lining + \def\theanooldstyle@figurealign{LF} + \else + \def\theanooldstyle@figurealign{OsF} + \fi +\fi + +\iftheanooldstyle@ttf + \ifxetex\XeTeXtracingfonts=1\fi + \defaultfontfeatures{ + Ligatures = TeX , + Scale = \TheanoOldStyle@scale , + Extension = .ttf } + \setmainfont + [ Numbers={\theanooldstyle@figurealign}, + UprightFont = *-Regular , + BoldFont = *-Bold , + ] + {TheanoOldStyle} + \newfontfamily\theanooldstyle + [ Numbers={\theanooldstyle@figurealign}, + UprightFont = *-Regular , + BoldFont = *-Bold , + ] + {TheanoOldStyle} + \newfontfamily\theanooldstyleosf + [ Numbers={OldStyle}, + UprightFont = *-Regular , + BoldFont = *-Bold , + ] + {TheanoOldStyle} + \newfontfamily\theanooldstylelf + [ Numbers={}, + UprightFont = *-Regular , + BoldFont = *-Bold , + ] + {TheanoOldStyle} + +\else % type1 + + \def\theanooldstyle@family{TheanoOldStyle-T\theanooldstyle@figurealign} + \renewcommand*\rmdefault{\theanooldstyle@family} + \newcommand*\theanooldstyle{\fontfamily{\theanooldstyle@family}\selectfont} + \newcommand*\theanooldstyleosf{\fontfamily{TheanoOldStyle-TOsF}\selectfont} + \newcommand*\theanooldstylelf{\fontfamily{TheanoOldStyle-TLF}\selectfont} + +\fi + +\def\theanooldstylelgr{\fontencoding{LGR}\fontfamily{TheanoOldStyle-TLF}\selectfont} + +\iftheanooldstyle@ttf + \defaultfontfeatures{} +\fi + +\endinput |