diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/merriweather/merriweather.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/merriweather/merriweather.sty | 251 |
1 files changed, 189 insertions, 62 deletions
diff --git a/Master/texmf-dist/tex/latex/merriweather/merriweather.sty b/Master/texmf-dist/tex/latex/merriweather/merriweather.sty index 35fba36110f..71fd75b8202 100644 --- a/Master/texmf-dist/tex/latex/merriweather/merriweather.sty +++ b/Master/texmf-dist/tex/latex/merriweather/merriweather.sty @@ -1,15 +1,15 @@ \ProvidesPackage{merriweather}[% - 2020/07/31 (Bob Tennent) Supports Merriweather(Sans) fonts for all LaTeX engines. ] + 2020/08/30 (Bob Tennent) Supports Merriweather(Sans) fonts for all LaTeX engines. ] \RequirePackage{ifxetex,ifluatex,textcomp} -\newif\ifmerriweather@ttf +\newif\ifmerriweather@otf \ifxetex - \merriweather@ttftrue + \merriweather@otftrue \else\ifluatex - \merriweather@ttftrue + \merriweather@otftrue \else % [pdf]LaTeX - \merriweather@ttffalse + \merriweather@otffalse \fi\fi \newcommand*{\Merriwthr@scale}{1} % not adjustable @@ -25,94 +25,208 @@ \newif\ifmerriweather@sflight \merriweather@sflightfalse \newif\ifmerriweather@rmblack \merriweather@rmblackfalse \newif\ifmerriweather@sfblack \merriweather@sfblackfalse +\newif\ifmerriweather@rmlining \merriweather@rmliningfalse +\newif\ifmerriweather@rmtabular \merriweather@rmtabularfalse +\newif\ifmerriweather@sflining \merriweather@sfliningfalse +\newif\ifmerriweather@sftabular \merriweather@sftabularfalse + \DeclareOptionX{sf}{\merriweather@sftrue} \DeclareOptionX{rm}{\merriweather@rmtrue} \DeclareOptionX{sfdefault}{\merriweather@sftrue\merriweather@sfdefaulttrue} -\DeclareOptionX{type1}{\merriweather@ttffalse} +\DeclareOptionX{type1}{\merriweather@otffalse} \DeclareOptionX{light}{\merriweather@rmlighttrue\merriweather@sflighttrue} \DeclareOptionX{rmlight}{\merriweather@rmlighttrue} \DeclareOptionX{sflight}{\merriweather@sflighttrue} \DeclareOptionX{black}{\merriweather@rmblacktrue\merriweather@sfblacktrue} \DeclareOptionX{rmblack}{\merriweather@rmblacktrue} \DeclareOptionX{sfblack}{\merriweather@sfblacktrue} +\DeclareOptionX{rmlining}{\merriweather@rmliningtrue} +\DeclareOptionX{rmoldstyle}{\merriweather@rmliningfalse} +\DeclareOptionX{sflining}{\merriweather@sfliningtrue} +\DeclareOptionX{sfoldstyle}{\merriweather@sfliningfalse} +\DeclareOptionX{rmtabular}{\merriweather@rmtabulartrue} +\DeclareOptionX{rmproportional}{\merriweather@rmtabularfalse} +\DeclareOptionX{sftabular}{\merriweather@sftabulartrue} +\DeclareOptionX{sfproportional}{\merriweather@sftabularfalse} + \ProcessOptionsX\relax -\ifmerriweather@ttf +\ifmerriweather@otf \RequirePackage{fontspec} \else - \RequirePackage{fontenc,fontaxes,mweights} + \RequirePackage{fontenc,fontaxes} \fi \ifmerriweather@rm\else\ifmerriweather@sf\else \merriweather@rmtrue\merriweather@sftrue % both false -> both true \fi\fi +\ifmerriweather@otf + \ifmerriweather@rmlining + \def\merriweather@figurestyle{Lining} + \else + \def\merriweather@figurestyle{OldStyle} + \fi + \ifmerriweather@rmtabular + \def\merriweather@figurealign{Monospaced} + \else + \def\merriweather@figurealign{Proportional} + \fi + + \ifmerriweather@sflining + \def\merriweathersans@figurestyle{Lining} + \else + \def\merriweathersans@figurestyle{OldStyle} + \fi + \ifmerriweather@sftabular + \def\merriweathersans@figurealign{Monospaced} + \else + \def\merriweathersans@figurealign{Proportional} + \fi + + \ifmerriweather@rmlight + \def\merriweather@regularstyle{Light} + \else + \def\merriweather@regularstyle{Regular} + \fi + \ifmerriweather@rmblack + \def\merriweather@boldstyle{Black} + \else + \def\merriweather@boldstyle{Bold} + \fi + + \ifmerriweather@sflight + \def\merriweathersans@regularstyle{Light} + \else + \def\merriweathersans@regularstyle{Regular} + \fi + \ifmerriweather@sfblack + \def\merriweathersans@boldstyle{ExtraBold} + \else + \def\merriweathersans@boldstyle{Bold} + \fi + +\else % type1 + \ifmerriweather@rmlining + \def\merriweather@figurestyle{LF} + \else + \def\merriweather@figurestyle{OsF} + \fi + \ifmerriweather@rmtabular + \def\merriweather@figurealign{T} + \else + \def\merriweather@figurealign{} + \fi + \ifmerriweather@sflining + \def\merriweathersans@figurestyle{LF} + \else + \def\merriweathersans@figurestyle{OsF} + \fi + \ifmerriweather@sftabular + \def\merriweathersans@figurealign{T} + \else + \def\merriweathersans@figurealign{} + \fi + + \ifmerriweather@rmlight + \def\mdseries@rm{light} + \else + \def\mdseries@rm{m} + \fi + \def\seriesdefault{\mdseries@rm} + \ifmerriweather@rmblack + \def\bfseries@rm{black} + \else + \def\bfseries@rm{b} + \fi + + \ifmerriweather@sflight + \def\mdseries@sf{light} + \else + \def\mdseries@sf{m} + \fi + \def\seriesdefault{\mdseries@sf} + \ifmerriweather@sfblack + \def\bfseries@sf{black} + \else + \def\bfseries@sf{b} + \fi + +\fi + % Set main and/or sans fonts: -\ifmerriweather@ttf +\ifmerriweather@otf \ifxetex\XeTeXtracingfonts=1\fi \defaultfontfeatures{ Ligatures = TeX , - Extension = .ttf , + Extension = .otf , } \ifmerriweather@rm \ifmerriweather@rmlight \ifmerriweather@rmblack \setmainfont - [ UprightFont = *-Light , - ItalicFont = *-LightIt , - BoldFont = *-UltraBold , - BoldItalicFont = *-UltraBdIt ] + [ Numbers = {\merriweather@figurealign,\merriweather@figurestyle}, + UprightFont = *-Light , + ItalicFont = *-LightItalic , + BoldFont = *-Black , + BoldItalicFont = *-BlackItalic ] {Merriweather} \newfontfamily\merriweather - [ UprightFont = *-Light , - ItalicFont = *-LightIt , - BoldFont = *-UltraBold , - BoldItalicFont = *-UltraBdIt ] + [ Numbers = {\merriweather@figurealign,\merriweather@figurestyle}, + UprightFont = *-Light , + ItalicFont = *-LightItalic , + BoldFont = *-Black , + BoldItalicFont = *-BlackItalic ] {Merriweather} \else \setmainfont - [ UprightFont = *-Light , - ItalicFont = *-LightIt , + [ Numbers = {\merriweather@figurealign,\merriweather@figurestyle}, + UprightFont = *-Light , + ItalicFont = *-LightItalic , BoldFont = *-Bold , - BoldItalicFont = *-BoldIt ] + BoldItalicFont = *-BoldItalic ] {Merriweather} \newfontfamily\merriweather - [ UprightFont = *-Light , - ItalicFont = *-LightIt , + [ Numbers = {\merriweather@figurealign,\merriweather@figurestyle}, + UprightFont = *-Light , + ItalicFont = *-LightItalic , BoldFont = *-Bold , - BoldItalicFont = *-BoldIt ] {Merriweather} \fi \else \ifmerriweather@rmblack \setmainfont - [ UprightFont = *-Regular , + [ Numbers = {\merriweather@figurealign,\merriweather@figurestyle}, + UprightFont = *-Regular , ItalicFont = *-Italic , - BoldFont = *-UltraBold , - BoldItalicFont = *-UltraBdIt ] + BoldFont = *-Black , + BoldItalicFont = *-BlackItalic ] {Merriweather} \newfontfamily\merriweather - [ UprightFont = *-Regular , + [ Numbers = {\merriweather@figurealign,\merriweather@figurestyle}, + UprightFont = *-Regular , ItalicFont = *-Italic , - BoldFont = *-UltraBold , - BoldItalicFont = *-UltraBdIt ] + BoldFont = *-Black , + BoldItalicFont = *-BlackItalic ] {Merriweather} \else \setmainfont - [ UprightFont = *-Regular , + [ Numbers = {\merriweather@figurealign,\merriweather@figurestyle}, + UprightFont = *-Regular , ItalicFont = *-Italic , BoldFont = *-Bold , - BoldItalicFont = *-BoldIt ] + BoldItalicFont = *-BoldItalic ] {Merriweather} \newfontfamily\merriweather - [ UprightFont = *-Regular , + [ Numbers = {\merriweather@figurealign,\merriweather@figurestyle}, + UprightFont = *-Regular , ItalicFont = *-Italic , BoldFont = *-Bold , - BoldItalicFont = *-BoldIt ] + BoldItalicFont = *-BoldItalic ] {Merriweather} \fi \fi @@ -121,29 +235,33 @@ \ifmerriweather@sflight \ifmerriweather@sfblack \setsansfont - [ Scale = \MerriwthrSans@scale , + [ Numbers = {\merriweathersans@figurealign,\merriweathersans@figurestyle}, + Scale = \MerriwthrSans@scale , UprightFont = *-Light , ItalicFont = *-LightItalic , BoldFont = *-ExtraBold , - BoldItalicFont = *-ExBoldIt ] + BoldItalicFont = *-ExtraBoldItalic ] {MerriweatherSans} \newfontfamily\merriweathersans - [ Scale = \MerriwthrSans@scale , + [ Numbers = {\merriweathersans@figurealign,\merriweathersans@figurestyle}, + Scale = \MerriwthrSans@scale , UprightFont = *-Light , ItalicFont = *-LightItalic , BoldFont = *-ExtraBold , - BoldItalicFont = *-ExBoldIt ] + BoldItalicFont = *-ExtraBoldItalic ] {MerriweatherSans} \else \setsansfont - [ Scale = \MerriwthrSans@scale , + [ Numbers = {\merriweathersans@figurealign,\merriweathersans@figurestyle}, + Scale = \MerriwthrSans@scale , UprightFont = *-Light , ItalicFont = *-LightItalic , BoldFont = *-Bold , BoldItalicFont = *-BoldItalic ] {MerriweatherSans} \newfontfamily\merriweathersans - [ Scale = \MerriwthrSans@scale , + [ Numbers = {\merriweathersans@figurealign,\merriweathersans@figurestyle}, + Scale = \MerriwthrSans@scale , UprightFont = *-Light , ItalicFont = *-LightItalic , BoldFont = *-Bold , @@ -153,29 +271,33 @@ \else \ifmerriweather@sfblack \setsansfont - [ Scale = \MerriwthrSans@scale , + [ Numbers = {\merriweathersans@figurealign,\merriweathersans@figurestyle}, + Scale = \MerriwthrSans@scale , UprightFont = *-Regular , ItalicFont = *-Italic , BoldFont = *-ExtraBold , - BoldItalicFont = *-ExBoldIt ] + BoldItalicFont = *-ExtraBoldItalic ] {MerriweatherSans} \newfontfamily\merriweathersans - [ Scale = \MerriwthrSans@scale , + [ Numbers = {\merriweathersans@figurealign,\merriweathersans@figurestyle}, + Scale = \MerriwthrSans@scale , UprightFont = *-Regular , ItalicFont = *-Italic , BoldFont = *-ExtraBold , - BoldItalicFont = *-ExBoldIt ] + BoldItalicFont = *-ExtraBoldItalic ] {MerriweatherSans} \else \setsansfont - [ Scale = \MerriwthrSans@scale , + [ Numbers = {\merriweathersans@figurealign,\merriweathersans@figurestyle}, + Scale = \MerriwthrSans@scale , UprightFont = *-Regular , ItalicFont = *-Italic , BoldFont = *-Bold , BoldItalicFont = *-BoldItalic ] {MerriweatherSans} \newfontfamily\merriweathersans - [ Scale = \MerriwthrSans@scale , + [ Numbers = {\merriweathersans@figurealign,\merriweathersans@figurestyle}, + Scale = \MerriwthrSans@scale , UprightFont = *-Regular , ItalicFont = *-Italic , BoldFont = *-Bold , @@ -190,37 +312,41 @@ \renewcommand*\familydefault{\merriweathersffamily} \fi \newfontfamily\merriweatherlight - [ UprightFont = *-Light , - ItalicFont = *-LightIt , + [ Numbers = {\merriweather@figurealign,\merriweather@figurestyle}, + UprightFont = *-Light , + ItalicFont = *-LightItalic , BoldFont = *-Light , - BoldItalicFont = *-LightIt ] + BoldItalicFont = *-LightItalic ] {Merriweather} \newfontfamily\merriweathersanslight - [ Scale = \MerriwthrSans@scale , + [ Numbers = {\merriweathersans@figurealign,\merriweathersans@figurestyle}, + Scale = \MerriwthrSans@scale , UprightFont = *-Light , ItalicFont = *-LightItalic , BoldFont = *-Light , BoldItalicFont = *-LightItalic ] {MerriweatherSans} \newfontfamily\merriweatherblack - [ UprightFont = *-UltraBold , - ItalicFont = *-UltraBdIt , - BoldFont = *-UltraBold , - BoldItalicFont = *-UltraBdIt ] + [ Numbers = {\merriweather@figurealign,\merriweather@figurestyle}, + UprightFont = *-Black , + ItalicFont = *-BlackItalic , + BoldFont = *-Black , + BoldItalicFont = *-BlackItalic ] {Merriweather} \newfontfamily\merriweathersansblack - [ Scale = \MerriwthrSans@scale , + [ Numbers = {\merriweathersans@figurealign,\merriweathersans@figurestyle}, + Scale = \MerriwthrSans@scale , UprightFont = *-ExtraBold , - ItalicFont = *-ExBoldIt , + ItalicFont = *-ExtraBoldItalic , BoldFont = *-ExtraBold , - BoldItalicFont = *-ExBoldIt ] + BoldItalicFont = *-ExtraBoldItalic ] {MerriweatherSans} \else % type1 \ifmerriweather@rm \ifmerriweather@rmlight\def\mdseries@rm{l}\else\def\mdseries@rm{m}\fi - \ifmerriweather@rmblack\def\bfseries@rm{ub}\else\def\bfseries@rm{b}\fi + \ifmerriweather@rmblack\def\bfseries@rm{eb}\else\def\bfseries@rm{b}\fi \else \def\mdseries@rm{m}\def\bfseries@rm{b} \fi @@ -233,8 +359,8 @@ - \def\merriweatherfamily{Merriwthr-OsF} - \def\merriweathersffamily{MerriwthrSans-OsF} + \def\merriweatherfamily{Merriwthr-\merriweather@figurealign\merriweather@figurestyle} + \def\merriweathersffamily{MerriwthrSans-\merriweathersans@figurealign\merriweathersans@figurestyle} \ifmerriweather@rm \renewcommand*\rmdefault{\merriweatherfamily} @@ -254,13 +380,14 @@ \newcommand*\merriweathersans{\fontfamily{\merriweathersffamily}\selectfont} \newcommand*\merriweatherlight{\fontfamily{\merriweatherfamily}\fontseries{l}\selectfont} \newcommand*\merriweathersanslight{\fontfamily{\merriweathersffamily}\fontseries{l}\selectfont} - \newcommand*\merriweatherblack{\fontfamily{\merriweatherfamily}\fontseries{ub}\selectfont} + \newcommand*\merriweatherblack{\fontfamily{\merriweatherfamily}\fontseries{eb}\selectfont} \newcommand*\merriweathersansblack{\fontfamily{\merriweathersffamily}\fontseries{eb}\selectfont} + \fi % turn off defaults in case other fonts are selected: -\ifmerriweather@ttf +\ifmerriweather@otf \defaultfontfeatures{} \fi |