From d79a721c345c9a2ced6c0640e88c10cc3378c1f0 Mon Sep 17 00:00:00 2001
From: Norbert Preining <norbert@preining.info>
Date: Wed, 1 Jul 2020 03:03:30 +0000
Subject: CTAN sync 202007010303

---
 fonts/erewhon/tex/erewhon.sty | 48 +++++++++++++++++++++++++++++++++++++------
 1 file changed, 42 insertions(+), 6 deletions(-)

(limited to 'fonts/erewhon/tex/erewhon.sty')

diff --git a/fonts/erewhon/tex/erewhon.sty b/fonts/erewhon/tex/erewhon.sty
index 463351b24a..66ec18e221 100644
--- a/fonts/erewhon/tex/erewhon.sty
+++ b/fonts/erewhon/tex/erewhon.sty
@@ -1,8 +1,8 @@
 %% erewhon.sty
 %%
 \NeedsTeXFormat{LaTeX2e}
-\def\fileversion{1.110}
-\def\filedate{2020/05/30}
+\def\fileversion{1.111}
+\def\filedate{2020/06/29}
 \ProvidesPackage{erewhon}
     [\filedate\space v\fileversion]
     
@@ -13,7 +13,7 @@
 \RequirePackage{textcomp}
 \RequirePackage{scalefnt} % only for \textruble
 \DeclareEncodingSubset{TS1}{erewhon-*}{0}
-\RequirePackage{ifthen}
+\RequirePackage{xstring,ifthen} % for \textfrac
 \IfFileExists{mweights.sty}{\RequirePackage{mweights}}{}
 \RequirePackage{etoolbox}
 \IfFileExists{fontaxes.sty}{
@@ -45,13 +45,47 @@
     \DeclareTextFontCommand{\textde}{\defigures}
     \let\textdenominator\textde
 }{}
-\providecommand*{\textfrac}[2]{%
-    \textnu{#1}\kern0em{\fontencoding{TS1}\selectfont\char"2F}\kern0em\textde{#2}} %\textfractionsolidus does not work here
+%\providecommand*{\textfrac}[2]{%
+%    \textnu{#1}\kern0em{\fontencoding{TS1}\selectfont\char"2F}\kern0em\textde{#2}} %\textfractionsolidus does not work here
+\newcommand{\textfrac}[3][]{% like \textfrac[1]{7}{8}
+  \mbox{%
+    \ifthenelse{\not\equal{#1}{}}%Test for integer portion [optional #1]
+      {\textlf{#1}\kern.05em}{}%         
+    \textnu{#2}% numerator
+    \StrRight{#2}{1}[\@digit@]%
+    % look for  1, 2, 3, 4, 7
+    \ifcase\@digit@% 0
+    \or% 1
+    \or\kern.02em% 2
+    \or%\kern-.01em% 3
+    \or%\kern-.01em% 4
+    \or%\kern.01em% 5
+    \or\kern.01em% 6
+    \or\kern-.08em% 7
+    \fi%
+    \kern\Erewhon@foresolidus{\fontencoding{TS1}\selectfont\char"2F}%
+    \kern\Erewhon@aftsolidus%
+    \StrLeft{#3}{1}[\@digit@]%
+    % look for 1, 4, 5, 7
+    \ifcase\@digit@% 0
+    \or%\kern -.02em% 1
+    \or% 2
+    \or% 3
+    \or\kern -.03em% 4
+    \or% 5
+    \or% 6
+    \or\kern .02em% 7
+    \fi%
+    \textde{#3}%       denominator [#3]
+  }%
+}
 
 \def\erewhon@spc{.211em}
 \def\erewhon@stretch{.1055em}
 \def\erewhon@shrink{.0703em}
 \def\erewhon@spcf{} % a factor to multiply \fontdimen2
+\def\Erewhon@foresolidus{0em}
+\def\Erewhon@aftsolidus{0em}
 
 \newcommand*{\erewhon@scale}{1}
 \RequirePackage{xkeyval}
@@ -61,6 +95,8 @@
 \DeclareOptionX{stretch}[.125em]{\gdef\erewhon@stretch{#1}}
 \DeclareOptionX{shrink}[.1em]{\gdef\erewhon@shrink{#1}}
 \DeclareOptionX{space}[1.23]{\gdef\erewhon@spcf{#1}}
+\DeclareOptionX{foresolidus}{\gdef\Erewhon@foresolidus{#1}}
+\DeclareOptionX{aftsolidus}{\gdef\Erewhon@aftsolidus{#1}}
 
 \let\orig@footnote=\thefootnote
 \let\orig@makefnmark=\@makefnmark
@@ -141,7 +177,7 @@ OsF}\fontshape{sc}\selectfont #1}%
 \DeclareTextCommand{\textcircled}{TS1}[1]{\hmode@bgroup
    \ooalign{%
       \hfil \raise .37ex\hbox {\fontencoding{T1}\fontseries{m}\fontshape{sc}\fontsize{7.2}{7.2}\selectfont \lowercase{#1}}\hfil \crcr
-     \textbigcircle 
+     \char 37 %\textbigcircle 
    }%
  \egroup}
 
-- 
cgit v1.2.3

