diff options
author | Karl Berry <karl@freefriends.org> | 2020-05-04 21:21:34 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-05-04 21:21:34 +0000 |
commit | a6913752e2c93d9b4f808fa89614f048479c74cb (patch) | |
tree | 4809768a28d157f6667d666ae30657630d4908d6 /Master/texmf-dist/tex/latex/garamond-libre/garamondlibre.sty | |
parent | 576edc303564df0402350ff7a4c81fe179ac7929 (diff) |
garamond-libre (4may20)
git-svn-id: svn://tug.org/texlive/trunk@55011 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/garamond-libre/garamondlibre.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/garamond-libre/garamondlibre.sty | 127 |
1 files changed, 127 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/garamond-libre/garamondlibre.sty b/Master/texmf-dist/tex/latex/garamond-libre/garamondlibre.sty new file mode 100644 index 00000000000..b02207edf0b --- /dev/null +++ b/Master/texmf-dist/tex/latex/garamond-libre/garamondlibre.sty @@ -0,0 +1,127 @@ +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{GaramondLibre} + [2020/05/29 (Bob Tennent and autoinst) Style file for GaramondLibre fonts.] + +\RequirePackage{ifxetex,ifluatex,xkeyval,textcomp} + +\newif\ifgaramondlibre@otf +\ifxetex + \garamondlibre@otftrue +\else\ifluatex + \garamondlibre@otftrue +\else % [pdf]LaTeX + \garamondlibre@otffalse +\fi\fi + +\newif\ifgaramondlibre@lining \garamondlibre@liningtrue + +\newcommand*{\GaramondLibre@scale}{1} +\RequirePackage{xkeyval} +\DeclareOptionX{scaled}{\renewcommand*{\GaramondLibre@scale}{#1}} +\DeclareOptionX{scale}{\renewcommand*{\GaramondLibre@scale}{#1}} +\DeclareOptionX{type1}{\garamondlibre@otffalse} +\DeclareOptionX{oldstyle}{\garamondlibre@liningfalse} +\DeclareOptionX{osf}{\garamondlibre@liningfalse} +\DeclareOptionX{lining}{\garamondlibre@liningtrue} +\DeclareOptionX{lf}{\garamondlibre@liningtrue} + + +\ProcessOptionsX\relax + +\ifgaramondlibre@otf + \ifgaramondlibre@lining + \def\garamondlibre@figurestyle{Lining} + \else + \def\garamondlibre@figurestyle{OldStyle} + \fi +\else % type1 + \ifgaramondlibre@lining + \def\garamondlibre@figurestyle{LF} + \else + \def\garamondlibre@figurestyle{OsF} + \fi +\fi + +\ifgaramondlibre@otf +\else + \def\bfseries@rm{b} + \def\mdseries@rm{m} +\fi + +\ifgaramondlibre@otf + \RequirePackage{fontspec} +\else + \RequirePackage{fontenc,fontaxes,mweights} +\fi + +\ifgaramondlibre@otf + \ifxetex\XeTeXtracingfonts=1\fi + \defaultfontfeatures{ + Ligatures = TeX , + Scale = \GaramondLibre@scale , + Extension = .otf } + \setmainfont[ + Numbers = {\garamondlibre@figurestyle}, + UprightFont = *-Regular , + ItalicFont = *-Italic , + BoldFont = *-Bold , + BoldItalicFont = *-BoldItalic, + ] + {GaramondLibre} + \providecommand\sufigures{\addfontfeatures{VerticalPosition=Superior}} + \providecommand\infigures{\addfontfeatures{VerticalPosition=Inferior}} + + \providecommand{\swashshape}{\itshape\addfontfeatures{ItalicFeatures={Style=Swash}}} + \DeclareTextFontCommand{\textsw}{\swashshape} + + \providecommand\ornaments{\addfontfeatures{Numbers=Lining,Ornament}} + \DeclareTextFontCommand{\textornaments}{\ornaments} + + \DeclareTextFontCommand{\oldstylenums}{\addfontfeatures{Numbers=OldStyle}} + \DeclareTextFontCommand{\liningnums}{\addfontfeatures{Numbers=Lining}} + +\else % type1 + + \def\garamondlibre@family{GaramondLibre-\garamondlibre@figurestyle} + \renewcommand*\rmdefault{\garamondlibre@family} + \edef\seriesdefault{\mdseries@rm} + + \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} + + \fa@naming@exception{figures}{{inferior}{proportional}}{Inf} + \fa@naming@exception{figures}{{inferior}{tabular}}{Inf} + \def\infigures{\@nomath\infigures + \fontfigurestyle{inferior}\selectfont} + + \fa@naming@exception{figures}{{ornament}{proportional}}{Orn} + \fa@naming@exception{figures}{{ornament}{tabular}}{Orn} + \def\ornaments{\@nomath\ornaments + \fontencoding{U}\fontfigurestyle{ornament}\selectfont} + \DeclareTextFontCommand{\textornaments}{\ornaments} + \providecommand{\ornament}[1]{\textornaments{\char##1}} + + + \DeclareTextFontCommand{\oldstylenums}{\fontfamily{GaramondLibre-OsF}\selectfont} + \DeclareTextFontCommand{\liningnums}{\fontfamily{GaramondLibre-LF}\selectfont} + \DeclareTextFontCommand{\textsw}{\swshape} + +\fi + +\DeclareTextFontCommand{\textsu}{\sufigures} +\DeclareTextFontCommand{\textin}{\infigures} +\newcommand*\garamondlibrelgr{\fontencoding{LGR}\fontfamily{GaramondLibre-LF}\selectfont} + + +\ifgaramondlibre@otf + \defaultfontfeatures{} +\fi + +\endinput |