From e5053aca346b6b429f77806ea89e37d67da94b29 Mon Sep 17 00:00:00 2001
From: Norbert Preining <norbert@preining.info>
Date: Mon, 3 Aug 2020 03:01:12 +0000
Subject: CTAN sync 202008030301

---
 fonts/bitter/latex/bitter.sty | 48 +++++++++++++++++++++++++++++++------------
 1 file changed, 35 insertions(+), 13 deletions(-)

(limited to 'fonts/bitter/latex/bitter.sty')

diff --git a/fonts/bitter/latex/bitter.sty b/fonts/bitter/latex/bitter.sty
index b792ae6d1e..a215441ee7 100644
--- a/fonts/bitter/latex/bitter.sty
+++ b/fonts/bitter/latex/bitter.sty
@@ -1,31 +1,40 @@
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesPackage{bitter}
-    [200/07/25 (R.D. Tennent)  Supports Bitter fonts for xeLaTeX and luaLaTeX.]
+    [2020/08/02 (R.D. Tennent)  Supports Bitter fonts for all LaTeX engines.]
 
-\RequirePackage{iftex}
+\RequirePackage{ifxetex,ifluatex,textcomp}
 
-\ifpdftex
-\PackageError{bitter}{%
- *****************************************\MessageBreak
-  Please process using XeLaTeX or luaLaTeX\MessageBreak
- *****************************************}
-\fi  
+\newif\ifBitter@ttf
+\ifxetex
+  \Bitter@ttftrue
+\else\ifluatex
+  \Bitter@ttftrue
+\else  % [pdf]LaTeX
+  \Bitter@ttffalse
+\fi\fi
 
-
-\newcommand*{\Bitter@scale}{1}  
+\newcommand*{\Bttr@scale}{1}  
 \RequirePackage{xkeyval}
-\DeclareOptionX{scaled}{\renewcommand*{\Bitter@scale}{#1}}
-\DeclareOptionX{scale}{\renewcommand*{\Bitter@scale}{#1}}
+\DeclareOptionX{scaled}{\renewcommand*{\Bttr@scale}{#1}}
+\DeclareOptionX{scale}{\renewcommand*{\Bttr@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 ,
+     Scale     = \Bttr@scale ,
   }
   \setmainfont
       [ UprightFont    = *-Regular ,
@@ -43,8 +52,21 @@
       ]
       {Bitter}
 
+\else % type1
+
+  \def\bfseries@rm{b}
+  \def\mdseries@rm{m}
+  \def\seriesdefault{\mdseries@rm}
+  \def\bitterfamily{Bttr-TLF}
+  \def\bitter{\fontfamily{\bitterfamily}\selectfont}
+  \def\rmdefault{\bitterfamily}
+
+\fi
+
 % turn off defaults in case other fonts are selected:
+\ifBitter@ttf
   \defaultfontfeatures{}
+\fi
 
 \endinput
 
-- 
cgit v1.2.3

