diff options
author | Karl Berry <karl@freefriends.org> | 2014-06-25 15:20:57 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-06-25 15:20:57 +0000 |
commit | 0347d335d6025289c0c74ad0f11046c87ceb6410 (patch) | |
tree | b320c9c868f96bcd079fbdcc82020466ee536eaa /Master/texmf-dist/tex/latex/overlock/overlock.sty | |
parent | 17ba85a8d8cd6bf84604708cffe98e8437259ab5 (diff) |
overlock (24may14)
git-svn-id: svn://tug.org/texlive/trunk@34409 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/overlock/overlock.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/overlock/overlock.sty | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/overlock/overlock.sty b/Master/texmf-dist/tex/latex/overlock/overlock.sty new file mode 100644 index 00000000000..ca74de2005b --- /dev/null +++ b/Master/texmf-dist/tex/latex/overlock/overlock.sty @@ -0,0 +1,98 @@ +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{overlock} + [2014/05/25 (Bob Tennent) Supports Overlock fonts for all LaTeX engines.] + +\RequirePackage{ifxetex,ifluatex,xkeyval,textcomp} + +\newif\ifoverlock@ttf +\ifxetex + \overlock@ttftrue +\else\ifluatex + \overlock@ttftrue +\else % [pdf]LaTeX + \overlock@ttffalse +\fi\fi + +\newif\ifoverlock@default \overlock@defaultfalse +\newif\ifoverlock@black \overlock@blackfalse + +\newcommand*{\Overlock@scale}{1} +\DeclareOptionX{scaled}{\renewcommand*{\Overlock@scale}{#1}} +\DeclareOptionX{scale}{\renewcommand*{\Overlock@scale}{#1}} + +\DeclareOptionX{default}{\overlock@defaulttrue} +\DeclareOptionX{sfdefault}{\overlock@defaulttrue} +\DeclareOptionX{type1}{\overlock@ttffalse} +\DeclareOptionX{black}{\overlock@blacktrue} + +\ProcessOptionsX\relax + +\ifoverlock@ttf + \def\overlock@boldstyle{Bold} + \ifoverlock@black\def\overlock@boldstyle{Black}\fi + +\else % type1 + + \def\bfseries@sf{b} + \ifoverlock@black\def\bfseries@sf{k}\fi +\fi + +\ifoverlock@ttf + \RequirePackage{fontspec} +\else + \RequirePackage{fontenc,fontaxes,mweights} +\fi + +\ifoverlock@ttf + \ifxetex\XeTeXtracingfonts=1\fi + \defaultfontfeatures{ + Ligatures = TeX , + Scale = \Overlock@scale , + Extension = .ttf } + \setsansfont + [ UprightFont = *-Regular , + ItalicFont = *-Italic , + BoldFont = *-\overlock@boldstyle , + BoldItalicFont = *-\overlock@boldstyle Italic ] + {Overlock} + % grab current family in case of subsequent change: + \let\overlockfamily\sfdefault + \newfontfamily\overlock + [ UprightFont = *-Regular , + ItalicFont = *-Italic , + BoldFont = *-\overlock@boldstyle , + BoldItalicFont = *-\overlock@boldstyle Italic ] + {Overlock} + \newfontfamily\overlockBlack + [ UprightFont = *-Black , + ItalicFont = *-BlackItalic , + BoldFont = *-Black , + BoldItalicFont = *-BlackItalic ] + {Overlock} + \newfontface\overlocksc{OverlockSC-Regular} + \def\sffamily{\overlock\def\scshape{\overlocksc}} + \ifoverlock@default + \edef\familydefault{\overlockfamily} + \def\scshape{\overlocksc} + \fi +\else % type1 + \def\overlockfamily{Overlock-LF} + \def\overlockscfamily{OverlockSC-LF} + \def\sfdefault{\overlockfamily} + \def\sffamily{\fontfamily{\overlockfamily}\selectfont\def\scshape{\fontfamily{\overlockscfamily}\selectfont}} + \def\overlock{\fontfamily{\overlockfamily}\selectfont\def\scshape{\fontfamily{\overlockscfamily}\selectfont}} + \def\overlockBlack{\fontfamily{\overlockfamily}\fontseries{k}\selectfont\def\scshape{\fontfamily{\overlockscfamily}\selectfont}} + \ifoverlock@default + \def\familydefault{\sfdefault} + \renewcommand\scshape{\fontfamily{\overlockscfamily}\selectfont} + \fi + +\fi + + +\ifoverlock@ttf +% turn off defaults in case other fonts are selected: + \defaultfontfeatures{} +\fi + +\endinput |