summaryrefslogtreecommitdiff
path: root/fonts/playfair/latex/PlayfairDisplay.sty
diff options
context:
space:
mode:
Diffstat (limited to 'fonts/playfair/latex/PlayfairDisplay.sty')
-rw-r--r--fonts/playfair/latex/PlayfairDisplay.sty62
1 files changed, 10 insertions, 52 deletions
diff --git a/fonts/playfair/latex/PlayfairDisplay.sty b/fonts/playfair/latex/PlayfairDisplay.sty
index d1f42d39e5..8ed7b1d33f 100644
--- a/fonts/playfair/latex/PlayfairDisplay.sty
+++ b/fonts/playfair/latex/PlayfairDisplay.sty
@@ -1,16 +1,15 @@
\ProvidesPackage{PlayfairDisplay}[%
- 2019/10/15 (Bob Tennent) Supports PlayfairDisplay fonts for all LaTeX engines. ]
+ 2020/07/25 (Bob Tennent) Supports PlayfairDisplay fonts for xeLaTeX and luaLaTeX. ]
-\RequirePackage{ifxetex,ifluatex,textcomp}
+\RequirePackage{iftex}
+
+\ifpdftex
+\PackageError{playfair}{%
+ *****************************************\MessageBreak
+ Please process using XeLaTeX or luaLaTeX\MessageBreak
+ *****************************************}
+\fi
-\newif\ifplayfair@otf
-\ifxetex
- \playfair@otftrue
-\else\ifluatex
- \playfair@otftrue
-\else % [pdf]LaTeX
- \playfair@otffalse
-\fi\fi
\newcommand*{\PlayfairDisplay@scale}{1}
\RequirePackage{xkeyval}
@@ -19,7 +18,6 @@
\newif\ifplayfair@black \playfair@blackfalse
-\DeclareOptionX{type1}{\playfair@otffalse}
\DeclareOptionX{black}{\playfair@blacktrue}
\newif\ifplayfair@lining \playfair@liningtrue
@@ -56,7 +54,6 @@
\ProcessOptionsX\relax
-\ifplayfair@otf
\ifplayfair@lining
\def\playfair@figurestyle{Lining}
\else
@@ -68,29 +65,10 @@
\def\playfair@boldstyle{Bold}
\fi
-\else % type1
-
- \ifplayfair@lining
- \def\playfair@figurestyle{TLF}
- \else
- \def\playfair@figurestyle{TOsF}
- \fi
- \ifplayfair@black
- \def\bfseries@rm{eb}
- \else
- \def\bfseries@rm{b}
- \fi
-\fi
-
-\ifplayfair@otf
- \RequirePackage{fontspec}
-\else
- \RequirePackage{fontenc,fontaxes,mweights}
-\fi
+\RequirePackage{fontspec}
% Set main and/or sans fonts:
-\ifplayfair@otf
\ifxetex\XeTeXtracingfonts=1\fi
\defaultfontfeatures{
@@ -132,31 +110,11 @@
-\else % type1
-
- \fa@naming@exception{figures}{{superior}{proportional}}{Sup}
- \fa@naming@exception{figures}{{superior}{tabular}}{Sup}
- \def\sufigures{\@nomath\sufigures\fontfigurestyle{superior}\selectfont}
-
- \def\playfairfamily{PlayfairDisplay-\playfair@figurestyle}
-
- \renewcommand*\rmdefault{\playfairfamily}
-
- \newcommand*\playfair{\fontfamily{\playfairfamily}\selectfont}
- \newcommand*\playfairblack{\fontfamily{\playfairfamily}\fontseries{eb}\selectfont}
- \newcommand*\playfairOsF{\fontfamily{PlayfairDisplay-TOsF}\selectfont}
- \newcommand*\playfairLF{\fontfamily{PlayfairDisplay-TLF}\selectfont}
-
-
-\fi
-
\DeclareTextFontCommand{\textsu}{\sufigures}
\let\textsuperior\textsu
% turn off defaults in case other fonts are selected:
-\ifplayfair@otf
\defaultfontfeatures{}
-\fi
\endinput