From e0c6872cf40896c7be36b11dcc744620f10adf1d Mon Sep 17 00:00:00 2001
From: Norbert Preining <norbert@preining.info>
Date: Mon, 2 Sep 2019 13:46:59 +0900
Subject: Initial commit

---
 fonts/bitter/latex/bitter.sty | 72 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 72 insertions(+)
 create mode 100644 fonts/bitter/latex/bitter.sty

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

diff --git a/fonts/bitter/latex/bitter.sty b/fonts/bitter/latex/bitter.sty
new file mode 100644
index 0000000000..1362c92640
--- /dev/null
+++ b/fonts/bitter/latex/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
+
-- 
cgit v1.2.3

