summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/cabin/cabin.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/cabin/cabin.sty')
-rw-r--r--Master/texmf-dist/tex/latex/cabin/cabin.sty72
1 files changed, 59 insertions, 13 deletions
diff --git a/Master/texmf-dist/tex/latex/cabin/cabin.sty b/Master/texmf-dist/tex/latex/cabin/cabin.sty
index 9d471851e6c..d410355e915 100644
--- a/Master/texmf-dist/tex/latex/cabin/cabin.sty
+++ b/Master/texmf-dist/tex/latex/cabin/cabin.sty
@@ -1,23 +1,69 @@
-%% Generated by autoinst on 2012/10/31
-%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{cabin}
- [2012/10/31 (autoinst) Style file for Cabin.]
+ [2012/11/09 (Bob Tennent and autoinst) Style file for Cabin.]
-\RequirePackage{ifxetex,ifluatex}
+\RequirePackage{ifxetex,ifluatex,textcomp}
+
+\newif\ifcabin@otf
\ifxetex
- \edef\Cabin@pack{otf}
+ \RequirePackage{fontspec}
+ \cabin@otftrue
\else\ifluatex
- \edef\Cabin@pack{otf}
+ \RequirePackage{fontspec}
+ \cabin@otftrue
\else % [pdf]LaTeX
- \edef\Cabin@pack{type1}
+ \RequirePackage{fontenc,fontaxes}
+ \cabin@otffalse
\fi\fi
-\DeclareOption*{
- \PassOptionsToPackage{\CurrentOption}{cabin-\Cabin@pack}%
-}
-\ProcessOptions\relax
-
-\RequirePackage{cabin-\Cabin@pack}
+\newcommand*{\Cabin@scale}{1}
+\RequirePackage{xkeyval}
+\DeclareOptionX{scaled}{\renewcommand*{\Cabin@scale}{#1}}
+\DeclareOptionX{scale}{\renewcommand*{\Cabin@scale}{#1}}
+
+\newif\ifcabin@default \cabin@defaultfalse
+\DeclareOptionX{sfdefault}{\cabin@defaulttrue}
+
+\ifcabin@otf
+ \DeclareOptionX{semibold}{\edef\cabin@boldstyle{SemiBold}}
+ \DeclareOptionX{bold}{\edef\cabin@boldstyle{Bold}}
+ \DeclareOptionX{medium}{\edef\cabin@regstyle{Medium}}
+ \DeclareOptionX{regular}{\edef\cabin@regstyle{Regular}}
+\else % type1
+ \DeclareOptionX{semibold}{\renewcommand*{\bfdefault}{sb}}
+ \DeclareOptionX{bold}{\renewcommand*{\bfdefault}{b}}
+ \DeclareOptionX{medium}{\renewcommand*{\mddefault}{mb}}
+ \DeclareOptionX{regular}{\renewcommand*{\mddefault}{m}}
+\fi
+\ExecuteOptionsX{bold,regular}
+\ProcessOptionsX\relax
+
+\ifcabin@otf
+ \ifxetex\XeTeXtracingfonts=1\fi
+ \defaultfontfeatures{
+ Ligatures = TeX ,
+ Scale = \Cabin@scale ,
+ Extension = .otf }
+ \setsansfont
+ [ UprightFont = *-\cabin@regstyle ,
+ ItalicFont = *-\cabin@regstyle Italic ,
+ BoldFont = *-\cabin@boldstyle ,
+ BoldItalicFont = *-\cabin@boldstyle Italic ]
+ {Cabin}
+ \ifcabin@default
+ \setmainfont
+ [ UprightFont = *-\cabin@regstyle ,
+ ItalicFont = *-\cabin@regstyle Italic ,
+ BoldFont = *-\cabin@boldstyle ,
+ BoldItalicFont = *-\cabin@boldstyle Italic ]
+ {Cabin}
+ \fi
+\else % type1
+ \renewcommand*\sfdefault{Cabin-TLF}
+ \ifcabin@default
+ \renewcommand*\familydefault{Cabin-TLF}
+ \fi
+\fi
+
\endinput