diff options
author | Karl Berry <karl@freefriends.org> | 2014-05-02 21:13:03 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-05-02 21:13:03 +0000 |
commit | 3f5b8ea776e301185632be236f6ebe71d2aa5e74 (patch) | |
tree | 912a8298d4d6606665cc0e43bc5f8ca099e1a262 /Master/texmf-dist/tex/latex/universalis/universalis.sty | |
parent | 8c6fd6be2a7e73915d58db798ff61113132d7ec3 (diff) |
universalis (2may14)
git-svn-id: svn://tug.org/texlive/trunk@33798 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/universalis/universalis.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/universalis/universalis.sty | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/universalis/universalis.sty b/Master/texmf-dist/tex/latex/universalis/universalis.sty new file mode 100644 index 00000000000..bbcec86f3c3 --- /dev/null +++ b/Master/texmf-dist/tex/latex/universalis/universalis.sty @@ -0,0 +1,98 @@ +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{universalis} + [2014/05/02 (Bob Tennent) Supports Universalis fonts for all LaTeX engines.] + +\RequirePackage{ifxetex,ifluatex,xkeyval,textcomp} + +\newif\ifunivrs@otf +\ifxetex + \univrs@otftrue +\else\ifluatex + \univrs@otftrue +\else % [pdf]LaTeX + \univrs@otffalse +\fi\fi + +\newif\ifunivrs@default \univrs@defaultfalse +\newif\ifunivrs@condensed \univrs@condensedfalse + +\newcommand*{\UniversalisADFStd@scale}{1} +\DeclareOptionX{scaled}{\renewcommand*{\UniversalisADFStd@scale}{#1}} +\DeclareOptionX{scale}{\renewcommand*{\UniversalisADFStd@scale}{#1}} + +\DeclareOptionX{sfdefault}{\univrs@defaulttrue} +\DeclareOptionX{type1}{\univrs@otffalse} +\DeclareOptionX{condensed}{\univrs@condensedtrue} + +\ProcessOptionsX\relax + +\ifunivrs@otf + \RequirePackage{fontspec} +\else + \RequirePackage{fontenc,fontaxes,mweights} +\fi + + +\ifunivrs@otf + \ifxetex\XeTeXtracingfonts=1\fi + \defaultfontfeatures{ + Ligatures = TeX , + Scale = \UniversalisADFStd@scale , + Extension = .otf } + \ifunivrs@condensed + \setsansfont + [ UprightFont = *-Cond , + ItalicFont = *-CondItalic , + BoldFont = *-BoldCond , + BoldItalicFont = *-BoldCondIt ] + {UniversalisADFStd} + \else + \setsansfont + [ UprightFont = *-Regular , + ItalicFont = *-Italic , + BoldFont = *-Bold , + BoldItalicFont = *-BoldItalic ] + {UniversalisADFStd} + \fi + % grab current family in case of subsequent change: + \let\univrsfamily\sfdefault + \ifunivrs@default\renewcommand*\familydefault{\univrsfamily}\fi + \newfontfamily\univrs + [ UprightFont = *-Regular , + ItalicFont = *-Italic , + BoldFont = *-Bold , + BoldItalicFont = *-BoldItalic ] + {UniversalisADFStd} + \newfontfamily\univrscondensed + [ UprightFont = *-Cond , + ItalicFont = *-CondItalic , + BoldFont = *-BoldCond , + BoldItalicFont = *-BoldCondIt ] + {UniversalisADFStd} +\else % type1 + \ifunivrs@condensed + \def\mdseries@sf{c} + \def\bfseries@sf{bc} + \else + \def\mdseries@sf{m} + \def\bfseries@sf{b} + \fi + \def\univrsfamily{UniversalisADFStd-LF} + \newcommand*\univrs{% + \fontfamily{\univrsfamily}\fontseries{m}\selectfont + \def\mdseries@sf{m}\def\bfseries@sf{b} + } + \newcommand*\univrscondensed{% + \fontfamily{\univrsfamily}\fontseries{c}\selectfont + \def\mdseries@sf{c}\def\bfseries@sf{bc} + } + \def\sfdefault{\univrsfamily} + \ifunivrs@default\edef\familydefault{\sfdefault}\fi +\fi + +\ifunivrs@otf +% turn off defaults in case other fonts are selected: + \defaultfontfeatures{} +\fi + +\endinput |