diff options
author | Karl Berry <karl@freefriends.org> | 2019-05-11 21:27:50 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-05-11 21:27:50 +0000 |
commit | 91f036cf24a64320f86b66435db4733711e3aeb6 (patch) | |
tree | 4c2e191f1454b14cbba4b5439f90626b414bfe6e /Master/texmf-dist/tex/latex/bitter/bitter.sty | |
parent | 439c8dadc32c3029c7aa2bb7c0ce2fd8326a61c3 (diff) |
bitter (11may19)
git-svn-id: svn://tug.org/texlive/trunk@51086 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/bitter/bitter.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/bitter/bitter.sty | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/bitter/bitter.sty b/Master/texmf-dist/tex/latex/bitter/bitter.sty new file mode 100644 index 00000000000..1362c92640d --- /dev/null +++ b/Master/texmf-dist/tex/latex/bitter/bitter.sty @@ -0,0 +1,72 @@ +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{bitter} + [2019/05/10 (R.D. Tennent) Supports Bitter fonts for all LaTeX engines.] + +\RequirePackage{ifxetex,ifluatex,textcomp} + +\newif\ifBitter@ttf +\ifxetex + \Bitter@ttftrue +\else\ifluatex + \Bitter@ttftrue +\else % [pdf]LaTeX + \Bitter@ttffalse +\fi\fi + +\newcommand*{\Bitter@scale}{1} +\RequirePackage{xkeyval} +\DeclareOptionX{scaled}{\renewcommand*{\Bitter@scale}{#1}} +\DeclareOptionX{scale}{\renewcommand*{\Bitter@scale}{#1}} + +\DeclareOptionX{type1}{\Bitter@ttffalse} + +\ProcessOptionsX\relax + +\ifBitter@ttf + \RequirePackage{fontspec} +\else + \RequirePackage{fontenc,fontaxes,mweights} +\fi + +\ifBitter@ttf + \def\Bitter@regular{Regular} + \ifxetex\XeTeXtracingfonts=1\fi + \defaultfontfeatures{ + Ligatures = TeX , + Extension = .ttf , + Scale = \Bitter@scale , + } + \setmainfont + [ UprightFont = *-Regular , + ItalicFont = *-Italic , + BoldFont = *-Bold , + ] + {Bitter} + % grab current family in case of subsequent change: + \let\Bitterfamily\rmdefault + + \newfontfamily\bitter + [ UprightFont = *-Regular , + ItalicFont = *-Italic , + BoldFont = *-Bold , + ] + {Bitter} + +\else % type1 + + \def\bfseries@rm{b} + \def\mdseries@rm{m} + \def\seriesdefault{\mdseries@rm} + \def\bitterfamily{Bitter-TLF} + \def\bitter{\fontfamily{\bitterfamily}\selectfont} + \def\rmdefault{\bitterfamily} + +\fi + +% turn off defaults in case other fonts are selected: +\ifBitter@ttf + \defaultfontfeatures{} +\fi + +\endinput + |