summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/ebgaramond/ebgaramond.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-12-05 23:48:02 +0000
committerKarl Berry <karl@freefriends.org>2018-12-05 23:48:02 +0000
commit0fc06953cabe62207aaa4e1122c07b3cfc85e2eb (patch)
tree2420359b8a7740ba9d3808a886d23fe8b9e671f7 /Master/texmf-dist/tex/latex/ebgaramond/ebgaramond.sty
parent3784b4ecbad18fe0da7a55a937f054e5aa009cee (diff)
ebgaramond (6dec18)
git-svn-id: svn://tug.org/texlive/trunk@49327 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/ebgaramond/ebgaramond.sty')
-rw-r--r--Master/texmf-dist/tex/latex/ebgaramond/ebgaramond.sty149
1 files changed, 83 insertions, 66 deletions
diff --git a/Master/texmf-dist/tex/latex/ebgaramond/ebgaramond.sty b/Master/texmf-dist/tex/latex/ebgaramond/ebgaramond.sty
index f721d2caee1..7cfd7dfbb0c 100644
--- a/Master/texmf-dist/tex/latex/ebgaramond/ebgaramond.sty
+++ b/Master/texmf-dist/tex/latex/ebgaramond/ebgaramond.sty
@@ -1,6 +1,6 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{ebgaramond}
- [2014/11/25 (Bob Tennent and autoinst) Style file for EB Garamond fonts.]
+ [2018/11/30 (Bob Tennent and autoinst) Style file for EB Garamond fonts.]
\RequirePackage{ifxetex,ifluatex,xkeyval,textcomp}
@@ -15,6 +15,9 @@
\newif\ifebgaramond@lining \ebgaramond@liningfalse
\newif\ifebgaramond@tabular \ebgaramond@tabularfalse
+\newif\ifebgaramond@medium \ebgaramond@mediumfalse
+\newif\ifebgaramond@semibold \ebgaramond@semiboldfalse
+\newif\ifebgaramond@extrabold \ebgaramond@extraboldfalse
\newcommand*{\EBGaramond@scale}{1}
\newcommand*{\EBGaramondInitials@scale}{1}
@@ -31,6 +34,12 @@
\DeclareOptionX{t}{\ebgaramond@tabulartrue}
\DeclareOptionX{proportional}{\ebgaramond@tabularfalse}
\DeclareOptionX{p}{\ebgaramond@tabularfalse}
+\DeclareOptionX{medium}{\ebgaramond@mediumtrue}
+\DeclareOptionX{m}{\ebgaramond@mediumtrue}
+\DeclareOptionX{semibold}{\ebgaramond@semiboldtrue}
+\DeclareOptionX{sb}{\ebgaramond@semiboldtrue}
+\DeclareOptionX{extrabold}{\ebgaramond@extraboldtrue}
+\DeclareOptionX{eb}{\ebgaramond@extraboldtrue}
\ExecuteOptionsX{oldstyle,proportional}
@@ -47,6 +56,19 @@
\else
\def\ebgaramond@figurealign{Proportional}
\fi
+ \ifebgaramond@medium
+ \def\ebgaramond@regularstyle{Medium}
+ \else
+ \def\ebgaramond@regularstyle{Regular}
+ \fi
+ \ifebgaramond@semibold
+ \def\ebgaramond@boldstyle{SemiBold}
+ \else\ifebgaramond@extrabold
+ \def\ebgaramond@boldstyle{ExtraBold}
+ \else
+ \def\ebgaramond@boldstyle{Bold}
+ \fi\fi
+
\else % type1
\ifebgaramond@lining
\def\ebgaramond@figurestyle{LF}
@@ -58,16 +80,30 @@
\else
\def\ebgaramond@figurealign{}
\fi
+ \ifebgaramond@medium
+ \def\mdseries@rm{mb}
+ \else
+ \def\mdseries@rm{m}
+ \fi
+ \ifebgaramond@semibold
+ \def\bfseries@rm{sb}
+ \else\ifebgaramond@extrabold
+ \def\bfseries@rm{eb}
+ \else
+ \def\bfseries@rm{b}
+ \fi\fi
+
\fi
\ifebgaramond@otf
\RequirePackage{fontspec}
\else
- \RequirePackage{fontenc,fontaxes}
+ \RequirePackage{fontenc,fontaxes,mweights}
\fi
\ifebgaramond@otf
\ifxetex\XeTeXtracingfonts=1\fi
+ \def\ebgaramond@regular{Regular}
\defaultfontfeatures{
Ligatures = TeX ,
Scale = \EBGaramond@scale ,
@@ -75,48 +111,49 @@
Extension = .otf }
\setmainfont
[ Numbers = {\ebgaramond@figurealign,\ebgaramond@figurestyle},
- UprightFont = *-Regular ,
- ItalicFont = *-Italic ,
- BoldFont = *-Regular ,
- BoldItalicFont = *-Italic ,
+ UprightFont = *-\ebgaramond@regularstyle ,
+ ItalicFont = *-\ifx\ebgaramond@regularstyle\ebgaramond@regular Italic\else\ebgaramond@regularstyle Italic\fi,
+ BoldFont = *-\ebgaramond@boldstyle ,
+ BoldItalicFont = *-\ebgaramond@boldstyle Italic ,
]
- {EBGaramond12}
+ {EBGaramond}
\newfontfamily\ebgaramond
[ Numbers = {\ebgaramond@figurealign,\ebgaramond@figurestyle},
- UprightFont = *-Regular ,
- ItalicFont = *-Italic ,
- BoldFont = *-Regular ,
- BoldItalicFont = *-Italic ,
+ UprightFont = *-\ebgaramond@regularstyle ,
+ ItalicFont = *-\ifx\ebgaramond@regularstyle\ebgaramond@regular Italic\else\ebgaramond@regularstyle Italic\fi ,
+ BoldFont = *-\ebgaramond@boldstyle ,
+ BoldItalicFont = *-\ebgaramond@boldstyle Italic ,
]
- {EBGaramond12}
+ {EBGaramond}
\providecommand\sufigures{\addfontfeatures{VerticalPosition=Superior}}
\providecommand\infigures{\addfontfeatures{VerticalPosition=ScientificInferior}}
\newfontfamily\swshape
[ Style={Swash},
Numbers = {\ebgaramond@figurealign,\ebgaramond@figurestyle},
- UprightFont = *-Italic ,
- ItalicFont = *-Italic ,
- BoldFont = *-Italic ,
- BoldItalicFont = *-Italic ,
+ UprightFont = *-\ifx\ebgaramond@regularstyle\ebgaramond@regular Italic\else\ebgaramond@regularstyle Italic\fi ,
+ ItalicFont = *-\ifx\ebgaramond@regularstyle\ebgaramond@regular Italic\else\ebgaramond@regularstyle Italic\fi ,
+ BoldFont = *-\ebgaramond@boldstyle Italic,
+ BoldItalicFont = *-\ebgaramond@boldstyle Italic ,
]
- {EBGaramond12}
+ {EBGaramond}
\newfontfamily\ebgaramondOsF
[ Numbers = {\ebgaramond@figurealign,OldStyle},
- UprightFont = *-Regular ,
- ItalicFont = *-Italic ,
- BoldFont = *-Regular ,
- BoldItalicFont = *-Italic ,
+ UprightFont = *-\ebgaramond@regularstyle ,
+ ItalicFont = *-\ifx\ebgaramond@regularstyle\ebgaramond@regular Italic\else\ebgaramond@regularstyle Italic\fi ,
+ BoldFont = *-\ebgaramond@boldstyle ,
+ BoldItalicFont = *-\ebgaramond@boldstyle Italic ,
]
- {EBGaramond12}
+ {EBGaramond}
\newfontfamily\ebgaramondLF
[ Numbers = {\ebgaramond@figurealign,Lining},
- UprightFont = *-Regular ,
- ItalicFont = *-Italic ,
- BoldFont = *-Regular ,
- BoldItalicFont = *-Italic ,
+ UprightFont = *-\ebgaramond@regularstyle ,
+ ItalicFont = *-\ifx\ebgaramond@regularstyle\ebgaramond@regular Italic\else\ebgaramond@regularstyle Italic\fi ,
+ BoldFont = *-\ebgaramond@boldstyle ,
+ BoldItalicFont = *-\ebgaramond@boldstyle Italic ,
]
- {EBGaramond12}
- \newfontface\initials{EBGaramondInitials}
+ {EBGaramond}
+
+ \newfontface\initials{EBGaramond-Initials}
\DeclareTextFontCommand{\oldstylenums}{\ebgaramondOsF}
\DeclareTextFontCommand{\liningnums}{\ebgaramondLF}
\DeclareTextFontCommand{\textin}{\initials}
@@ -127,15 +164,6 @@
\renewcommand*\rmdefault{\ebgaramond@family}
\newcommand*\ebgaramond{\fontfamily{\ebgaramond@family}\selectfont}
- \providecommand{\tldefault}{tl}
- \DeclareRobustCommand\tlshape{\not@math@alphabet\tlshape\relax
- \fontsecondaryshape\tldefault\selectfont}
-
- \DeclareRobustCommand\swshape{\not@math@alphabet\swshape\relax
- \fontprimaryshape\itdefault\fontsecondaryshape\swdefault\selectfont}
- \fa@naming@exception{shape}{{n}{sw}}{nw}
- \fa@naming@exception{shape}{{it}{sw}}{sw}
-
\fa@naming@exception{figures}{{superior}{proportional}}{Sup}
\fa@naming@exception{figures}{{superior}{tabular}}{Sup}
\def\sufigures{\@nomath\sufigures\fontfigurestyle{superior}\selectfont}
@@ -144,35 +172,40 @@
\fa@naming@exception{figures}{{inferior}{tabular}}{Inf}
\def\infigures{\@nomath\infigures\fontfigurestyle{inferior}\selectfont}
- \def\initials{\fontfamily{EBGaramondInitials-TLF}\selectfont}
+ \DeclareRobustCommand\swshape{\not@math@alphabet\swshape\relax
+ \fontprimaryshape\itdefault\fontsecondaryshape\swdefault\selectfont}
+ \fa@naming@exception{shape}{{n}{sw}}{nw}
+ \fa@naming@exception{shape}{{it}{sw}}{sw}
+
+ \def\initials{\fontfamily{EBGaramondInitials-TLF}\fontseries{m}\selectfont}
\DeclareTextFontCommand{\oldstylenums}{\fontfamily{EBGaramond-\ebgaramond@figurealign OsF}\selectfont}
\DeclareTextFontCommand{\liningnums}{\fontfamily{EBGaramond-\ebgaramond@figurealign LF}\selectfont}
- \DeclareTextFontCommand{\textin}{\fontfamily{EBGaramondInitials-TLF}\selectfont}
+ \DeclareTextFontCommand{\textin}{\initials}
\fi
\DeclareTextFontCommand{\textsu}{\sufigures}
-\DeclareTextFontCommand{\textsw}{\swshape}
\DeclareTextFontCommand{\textinf}{\infigures}
+\DeclareTextFontCommand{\textsw}{\swshape}
\ifebgaramond@otf
\newfontfamily\ebgaramondtabular
[ Numbers = {Monospaced,\ebgaramond@figurestyle},
- UprightFont = *-Regular ,
- ItalicFont = *-Italic ,
- BoldFont = *-Regular ,
- BoldItalicFont = *-Italic ,
+ UprightFont = *-\ebgaramond@regularstyle ,
+ ItalicFont = *-\ifx\ebgaramond@regularstyle\ebgaramond@regular Italic\else\ebgaramond@regularstyle Italic\fi ,
+ BoldFont = *-\ebgaramond@boldstyle ,
+ BoldItalicFont = *-\ebgaramond@boldstyle Italic ,
]
- {EBGaramond12}
+ {EBGaramond}
\newfontfamily\ebgaramondproportional
[ Numbers = {Proportional,\ebgaramond@figurestyle},
- UprightFont = *-Regular ,
- ItalicFont = *-Italic ,
- BoldFont = *-Regular ,
- BoldItalicFont = *-Italic ,
+ UprightFont = *-\ebgaramond@regularstyle ,
+ ItalicFont = *-\ifx\ebgaramond@regularstyle\ebgaramond@regular Italic\else\ebgaramond@regularstyle Italic\fi ,
+ BoldFont = *-\ebgaramond@boldstyle ,
+ BoldItalicFont = *-\ebgaramond@boldstyle Italic ,
]
- {EBGaramond12}
+ {EBGaramond}
\DeclareTextFontCommand{\tabularnums}{\ebgaramondtabular}
\DeclareTextFontCommand{\proportionalnums}{\ebgaramondproportional}
\else % type1
@@ -180,22 +213,6 @@
\DeclareTextFontCommand{\proportionalnums}{\fontfamily{EBGaramond-\ebgaramond@figurestyle}\selectfont}
\fi
-\def\EBGaramond@MT@Hook{%
- \DeclareMicrotypeAlias{EBGaramond12}{EBGaramond}
- \DeclareMicrotypeAlias{EBGaramond-LF}{EBGaramond}
- \DeclareMicrotypeAlias{EBGaramond-OsF}{EBGaramond}
- \DeclareMicrotypeAlias{EBGaramond-Sup}{EBGaramond}
- \DeclareMicrotypeAlias{EBGaramond-Inf}{EBGaramond}
- \DeclareMicrotypeAlias{EBGaramond-TLF}{EBGaramond}
- \DeclareMicrotypeAlias{EBGaramond-TOsF}{EBGaramond}
- \DeclareMicrotypeAlias{EBGaramondInitials-TLF}{EBGaramondInitials}
-}
-\@ifpackageloaded{microtype}
-{\EBGaramond@MT@Hook}
-{\@ifundefined{Microtype@Hook}
- {\let\Microtype@Hook\EBGaramond@MT@Hook}
- {\g@addto@macro\Microtype@Hook{\EBGaramond@MT@Hook}}}
-
\ifebgaramond@otf
\defaultfontfeatures{}
\fi