diff options
author | Karl Berry <karl@freefriends.org> | 2020-07-25 21:46:13 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-07-25 21:46:13 +0000 |
commit | 01b19bd46be4381ce96458d9a62b338dfbfc0d99 (patch) | |
tree | 41f1b3808b262f2e0b8595668eb37ced3d6bd704 /Master/texmf-dist/tex/latex/librecaslon/librecaslon.sty | |
parent | 123d248deb5108398b7b8f09342a5f98de0366f4 (diff) |
librecaslon (25jul20)
git-svn-id: svn://tug.org/texlive/trunk@55941 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/librecaslon/librecaslon.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/librecaslon/librecaslon.sty | 74 |
1 files changed, 15 insertions, 59 deletions
diff --git a/Master/texmf-dist/tex/latex/librecaslon/librecaslon.sty b/Master/texmf-dist/tex/latex/librecaslon/librecaslon.sty index 8568633493a..63d68c7045e 100644 --- a/Master/texmf-dist/tex/latex/librecaslon/librecaslon.sty +++ b/Master/texmf-dist/tex/latex/librecaslon/librecaslon.sty @@ -1,16 +1,14 @@ \ProvidesPackage{librecaslon}[% - 2019/06/25 (Bob Tennent) Supports LibreCaslon fonts for all LaTeX engines. ] + 2020/07/24 (Bob Tennent) Supports LibreCaslon fonts for xeLaTeX and luaLaTeX. ] -\RequirePackage{ifxetex,ifluatex,textcomp} +\RequirePackage{iftex} -\newif\iflibrecaslon@otf -\ifxetex - \librecaslon@otftrue -\else\ifluatex - \librecaslon@otftrue -\else % [pdf]LaTeX - \librecaslon@otffalse -\fi\fi +\ifpdftex +\PackageError{librecaslon}{% + *****************************************\MessageBreak + Please process using XeLaTeX or luaLaTeX\MessageBreak + *****************************************} +\fi \newif\iflibrecaslon@lining \librecaslon@liningtrue @@ -19,8 +17,6 @@ \DeclareOptionX{scaled}{\renewcommand*{\LibreCaslon@scale}{#1}} \DeclareOptionX{scale}{\renewcommand*{\LibreCaslon@scale}{#1}} -\DeclareOptionX{type1}{\librecaslon@otffalse} - \DeclareOptionX{lining}[true]{% \@nameuse{if#1}% \librecaslon@liningtrue @@ -53,32 +49,14 @@ \ProcessOptionsX\relax -\iflibrecaslon@otf \iflibrecaslon@lining \def\librecaslon@figurestyle{Monospaced} \else \def\librecaslon@figurestyle{OldStyle} \fi -\else % type1 - - \iflibrecaslon@lining - \def\librecaslon@figurealign{T} - \def\librecaslon@figurestyle{LF} - \else - \def\librecaslon@figurealign{} - \def\librecaslon@figurestyle{OsF} - \fi -\fi - - -\iflibrecaslon@otf - \RequirePackage{fontspec} -\else - \RequirePackage{fontenc,fontaxes} -\fi +\RequirePackage{fontspec} -\iflibrecaslon@otf \ifxetex\XeTeXtracingfonts=1\fi \defaultfontfeatures{ Ligatures = TeX , @@ -90,7 +68,7 @@ UprightFont = *-Regular , ItalicFont = *-Italic , BoldFont = *-Bold , - BoldItalicFont = *-BoldItalic ] + ] {LibreCaslonText} \providecommand\useosf{% \edef\librecaslon@figurestyle{OldStyle} @@ -104,7 +82,7 @@ UprightFont = *-Regular , ItalicFont = *-Italic , BoldFont = *-Bold , - BoldItalicFont = *-BoldItalic ] + ] {LibreCaslonText} \defaultfontfeatures{} } @@ -113,61 +91,39 @@ UprightFont = *-Regular , ItalicFont = *-Italic , BoldFont = *-Bold , - BoldItalicFont = *-BoldItalic ] + ] {LibreCaslonText} \newfontfamily\librecaslonOsF [ Numbers = {OldStyle}, UprightFont = *-Regular , ItalicFont = *-Italic , BoldFont = *-Bold , - BoldItalicFont = *-BoldItalic ] + ] {LibreCaslonText} \newfontfamily\librecaslonLF [ Numbers = {}, UprightFont = *-Regular , ItalicFont = *-Italic , BoldFont = *-Bold , - BoldItalicFont = *-BoldItalic ] + ] {LibreCaslonText} \newfontfamily\librecaslonTLF [ Numbers = {Monospaced}, UprightFont = *-Regular , ItalicFont = *-Italic , BoldFont = *-Bold , - BoldItalicFont = *-BoldItalic ] + ] {LibreCaslonText} \providecommand\sufigures{\librecaslonOsF\addfontfeatures{VerticalPosition=Superior}} \providecommand\infigures{\librecaslonOsF\addfontfeatures{VerticalPosition=ScientificInferior}} -\else % type1 - - \def\librecaslonfamily{LibreCaslon-\librecaslon@figurealign\librecaslon@figurestyle} - \providecommand*\librecaslon{\fontfamily{\librecaslonfamily}\selectfont} - \providecommand*\librecaslonLF{\fontfamily{LibreCaslon-LF}\selectfont} - \providecommand*\librecaslonTLF{\fontfamily{LibreCaslon-TLF}\selectfont} - \providecommand*\librecaslonOsF{\fontfamily{LibreCaslon-OsF}\selectfont} - - \fa@naming@exception{figures}{{superior}{proportional}}{Sup} - \fa@naming@exception{figures}{{superior}{tabular}}{Sup} - \providecommand\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} - - \renewcommand*\rmdefault{\librecaslonfamily} - \providecommand*\useosf{\edef\librecaslon@figurealign{}\edef\librecaslon@figurestyle{OsF}% - \renewcommand*{\rmdefault}{LibreCaslon-OsF}} - -\fi \DeclareTextFontCommand{\textsu}{\sufigures} \DeclareTextFontCommand{\textin}{\infigures} % turn off defaults in case other fonts are selected: -\iflibrecaslon@otf \defaultfontfeatures{} -\fi \endinput |