diff options
author | Karl Berry <karl@freefriends.org> | 2016-08-16 21:45:09 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-08-16 21:45:09 +0000 |
commit | ad46c8be317134050fd5f31b23c14c1feef164d0 (patch) | |
tree | bd5e12066e567a3dab539caa39e420b794241550 /Master/texmf-dist/tex/latex/cormorantgaramond/CormorantGaramond.sty | |
parent | 6351567b386c7a099226a10fa99f3472c3d14288 (diff) |
cormorantgaramond (16aug16)
git-svn-id: svn://tug.org/texlive/trunk@41865 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/cormorantgaramond/CormorantGaramond.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/cormorantgaramond/CormorantGaramond.sty | 178 |
1 files changed, 178 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/cormorantgaramond/CormorantGaramond.sty b/Master/texmf-dist/tex/latex/cormorantgaramond/CormorantGaramond.sty new file mode 100644 index 00000000000..8465db3f84d --- /dev/null +++ b/Master/texmf-dist/tex/latex/cormorantgaramond/CormorantGaramond.sty @@ -0,0 +1,178 @@ +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{CormorantGaramond} + [2016/08/15 (Bob Tennent and autoinst) Style file for Cormorant Garamond fonts.] + +\RequirePackage{ifxetex,ifluatex,xkeyval,textcomp} + +\newif\ifcormorantgaramond@otf +\ifxetex + \cormorantgaramond@otftrue +\else\ifluatex + \cormorantgaramond@otftrue +\else % [pdf]LaTeX + \cormorantgaramond@otffalse +\fi\fi + +\newif\ifcormorantgaramond@lining \cormorantgaramond@liningtrue +\newif\ifcormorantgaramond@tabular \cormorantgaramond@tabularfalse +\newif\ifcormorantgaramond@semibold \cormorantgaramond@semiboldfalse +\newif\ifcormorantgaramond@medium \cormorantgaramond@mediumfalse +\newif\ifcormorantgaramond@light \cormorantgaramond@lightfalse + +\newcommand*{\CormorantGaramond@scale}{1} +\RequirePackage{xkeyval} +\DeclareOptionX{scaled}{\renewcommand*{\CormorantGaramond@scale}{#1}} +\DeclareOptionX{scale}{\renewcommand*{\CormorantGaramond@scale}{#1}} +\DeclareOptionX{type1}{\cormorantgaramond@otffalse} +\DeclareOptionX{lining}{\cormorantgaramond@liningtrue} +\DeclareOptionX{nf}{\cormorantgaramond@liningtrue} +\DeclareOptionX{lf}{\cormorantgaramond@liningtrue} +\DeclareOptionX{oldstyle}{\cormorantgaramond@liningfalse} +\DeclareOptionX{osf}{\cormorantgaramond@liningfalse} +\DeclareOptionX{tabular}{\cormorantgaramond@tabulartrue} +\DeclareOptionX{t}{\cormorantgaramond@tabulartrue} +\DeclareOptionX{proportional}{\cormorantgaramond@tabularfalse} +\DeclareOptionX{p}{\cormorantgaramond@tabularfalse} +\DeclareOptionX{semibold}{\cormorantgaramond@semiboldtrue} +\DeclareOptionX{sb}{\cormorantgaramond@semiboldtrue} +\DeclareOptionX{medium}{\cormorantgaramond@mediumtrue} +\DeclareOptionX{light}{\cormorantgaramond@lighttrue} + + +\ProcessOptionsX\relax + +\ifcormorantgaramond@otf + \ifcormorantgaramond@lining + \def\cormorantgaramond@figurestyle{Lining} + \else + \def\cormorantgaramond@figurestyle{OldStyle} + \fi + \ifcormorantgaramond@tabular + \def\cormorantgaramond@figurealign{Monospaced} + \else + \def\cormorantgaramond@figurealign{} + \fi +\else % type1 + \ifcormorantgaramond@lining + \def\cormorantgaramond@figurestyle{LF} + \else + \def\cormorantgaramond@figurestyle{OsF} + \fi + \ifcormorantgaramond@tabular + \def\cormorantgaramond@figurealign{T} + \else + \def\cormorantgaramond@figurealign{} + \fi +\fi + +\ifcormorantgaramond@otf + \def\cormorantgaramond@boldstyle{Bold} + \ifcormorantgaramond@semibold\def\cormorantgaramond@boldstyle{SemiBold}\fi + \ifcormorantgaramond@medium\def\cormorantgaramond@boldstyle{Medium}\fi + \def\cormorantgaramond@regstyle{Regular} + \ifcormorantgaramond@light\def\cormorantgaramond@regstyle{Light}\fi +\else + \def\bfseries@rm{b} + \ifcormorantgaramond@semibold\def\bfseries@rm{sb}\fi + \ifcormorantgaramond@medium\def\bfseries@rm{mb}\fi + \def\mdseries@rm{m} + \ifcormorantgaramond@light\def\mdseries@rm{l}\fi +\fi + +\ifcormorantgaramond@otf + \RequirePackage{fontspec} +\else + \RequirePackage{fontenc,fontaxes,mweights} +\fi + +\ifcormorantgaramond@otf + \ifxetex\XeTeXtracingfonts=1\fi + \defaultfontfeatures{ + Ligatures = TeX , + Scale = \CormorantGaramond@scale , + Extension = .otf } + \setmainfont + [ Numbers = {\cormorantgaramond@figurealign,\cormorantgaramond@figurestyle}, + UprightFont = *-\cormorantgaramond@regstyle , + ItalicFont = *-\cormorantgaramond@regstyle Italic , + BoldFont = *-\cormorantgaramond@boldstyle , + BoldItalicFont = *-\cormorantgaramond@boldstyle Italic , + ] + {CormorantGaramond} + \newfontfamily\cormorantgaramond + [ Numbers = {\cormorantgaramond@figurealign,\cormorantgaramond@figurestyle}, + UprightFont = *-\cormorantgaramond@regstyle , + ItalicFont = *-\cormorantgaramond@regstyle Italic , + BoldFont = *-\cormorantgaramond@boldstyle , + BoldItalicFont = *-\cormorantgaramond@boldstyle Italic , + ] + {CormorantGaramond} + \providecommand\sufigures{\addfontfeatures{VerticalPosition=Superior}} + \providecommand\infigures{\addfontfeatures{VerticalPosition=ScientificInferior}} + \newfontfamily\cormorantgaramondOsF + [ Numbers = {\cormorantgaramond@figurealign,OldStyle}, + UprightFont = *-\cormorantgaramond@regstyle , + ItalicFont = *-\cormorantgaramond@regstyle Italic , + BoldFont = *-\cormorantgaramond@boldstyle , + BoldItalicFont = *-\cormorantgaramond@boldstyle Italic , + ] + {CormorantGaramond} + \newfontfamily\cormorantgaramondLF + [ Numbers = {\cormorantgaramond@figurealign,Lining}, + UprightFont = *-\cormorantgaramond@regstyle , + ItalicFont = *-\cormorantgaramond@regstyle Italic , + BoldFont = *-\cormorantgaramond@boldstyle , + BoldItalicFont = *-\cormorantgaramond@boldstyle Italic , + ] + {CormorantGaramond} + \newfontfamily\cormorantgaramondtabular + [ Numbers = {Monospaced,\cormorantgaramond@figurestyle}, + UprightFont = *-\cormorantgaramond@regstyle , + ItalicFont = *-\cormorantgaramond@regstyle Italic , + BoldFont = *-\cormorantgaramond@boldstyle , + BoldItalicFont = *-\cormorantgaramond@boldstyle Italic , + ] + {CormorantGaramond} + \newfontfamily\cormorantgaramondproportional + [ Numbers = {\cormorantgaramond@figurestyle}, + UprightFont = *-\cormorantgaramond@regstyle , + ItalicFont = *-\cormorantgaramond@regstyle Italic , + BoldFont = *-\cormorantgaramond@boldstyle , + BoldItalicFont = *-\cormorantgaramond@boldstyle Italic , + ] + {CormorantGaramond} + \DeclareTextFontCommand{\oldstylenums}{\cormorantgaramondOsF} + \DeclareTextFontCommand{\liningnums}{\cormorantgaramondLF} + \DeclareTextFontCommand{\tabularnums}{\cormorantgaramondtabular} + \DeclareTextFontCommand{\proportionalnums}{\cormorantgaramondproportional} + +\else % type1 + + \def\cormorantgaramond@family{CormorantGaramond-\cormorantgaramond@figurealign\cormorantgaramond@figurestyle} + \renewcommand*\rmdefault{\cormorantgaramond@family} + \newcommand*\cormorantgaramond{\fontfamily{\cormorantgaramond@family}\selectfont} + \edef\seriesdefault{\mdseries@rm} + + \fa@naming@exception{figures}{{superior}{proportional}}{Sup} + \fa@naming@exception{figures}{{superior}{tabular}}{Sup} + \def\sufigures{\@nomath\sufigures\fontfigurestyle{superior}\selectfont} + + \fa@naming@exception{figures}{{inferior}{proportional}}{Inf} + \fa@naming@exception{figures}{{inferior}{tabular}}{Inf} + \def\infigures{\@nomath\infigures\fontfigurestyle{inferior}\selectfont} + + \DeclareTextFontCommand{\oldstylenums}{\fontfamily{CormorantGaramond-\cormorantgaramond@figurealign OsF}\selectfont} + \DeclareTextFontCommand{\liningnums}{\fontfamily{CormorantGaramond-\cormorantgaramond@figurealign LF}\selectfont} + \DeclareTextFontCommand{\tabularnums}{\fontfamily{CormorantGaramond-T\cormorantgaramond@figurestyle}\selectfont} + \DeclareTextFontCommand{\proportionalnums}{\fontfamily{CormorantGaramond-\cormorantgaramond@figurestyle}\selectfont} + +\fi + +\DeclareTextFontCommand{\textsu}{\sufigures} +\DeclareTextFontCommand{\textinf}{\infigures} + +\ifcormorantgaramond@otf + \defaultfontfeatures{} +\fi + +\endinput |