From 1e45d661b659c3025746d3a41119300ab90d1dcd Mon Sep 17 00:00:00 2001
From: Norbert Preining <norbert@preining.info>
Date: Fri, 28 Jul 2023 03:01:08 +0000
Subject: CTAN sync 202307280301

---
 fonts/xcharter/tex/XCharter.sty | 54 ++++++++++++++++++++++++++++++++---------
 1 file changed, 42 insertions(+), 12 deletions(-)

(limited to 'fonts/xcharter/tex/XCharter.sty')

diff --git a/fonts/xcharter/tex/XCharter.sty b/fonts/xcharter/tex/XCharter.sty
index b2a21b4fe6..799181391c 100644
--- a/fonts/xcharter/tex/XCharter.sty
+++ b/fonts/xcharter/tex/XCharter.sty
@@ -1,10 +1,18 @@
 %% XCharter is an extension of the Bitstream Charter fonts, adding osf,  
-% small caps and superior figures. Generated 2022/02/20 by Michael Sharpe.
+% small caps and superior and inferior letters figures.
+% Modified 2023/07/21 by Michael Sharpe.
 %%
+% The type1 fonts contain two distinct glyph possibilities for oldstyle
+% one. The default is like a shortened 1 (the corresponding tfm files
+% have names beginning with "XCharter1-") and the alternate form is like
+% a shortened I. The tfm files for the latter begin with "XCharter-".
+% Option osf sets figure style to oldstyle with one like short 1.
+% Option osfI sets figure style to oldstyle with one like short I.
+
 \NeedsTeXFormat{LaTeX2e}
 
-\def\fileversion{1.24}
-\def\filedate{2022/04/16}
+\def\fileversion{1.25}
+\def\filedate{2023/07/21}
 
 \ProvidesPackage{XCharter}[\filedate\space v\fileversion]
 
@@ -28,6 +36,18 @@
 	\RequirePackage{textcomp}
 	\DeclareEncodingSubset{TS1}{XCharter-*}{0}
 \fi 
+\iftutex % may not read latex.ltx
+\@ifundefined{textsuperscript}{%
+\DeclareRobustCommand*\textsuperscript[1]{%
+  \@textsuperscript{\selectfont#1}}}{}
+\def\@textsuperscript#1{%
+  {\m@th\ensuremath{^{\mbox{\fontsize\sf@size\sf@size#1}}}}}
+\@ifundefined{textsubscript}{%\DeclareRobustCommand*\textsubscript[1]{%
+  \@textsubscript{\selectfont#1}}%
+\def\@textsubscript#1{%
+  {\m@th\ensuremath{_{\mbox{\fontsize\sf@size\sf@size#1}}}}}{}
+\fi
+
 %\newif\ifxch@nofontspec
 \newif\ifxch@otfmath
 % newtx check
@@ -183,8 +203,8 @@
 \DeclareOptionX{aftsolidus}{\gdef\XCharter@aftsolidus{#1}}
 \DeclareOptionX*{\ifxch@otfmath\PassOptionsToPackage{\CurrentOption}{xcharter-otf}\fi}
 \ExecuteOptionsX{lining,tabular}
-\ProcessOptionsX\relax
-
+\ProcessOptionsX\relax  
+  
 %+++++++++++++++++Option consequences++++++++++++++++++++++++
 
 % Check for conflict between nofontspec and others
@@ -215,11 +235,12 @@
   \fi
   \def\xch@base{XCharter}
   \newcommand{\textfrac}[3][]{{%
- \mbox{%
+  \mbox{%
     \ifthenelse{\not\equal{#1}{}}%Test for integer portion [optional #1]
       {\textlf{#1}\kern.03em}{}%         
     \textsu{#2\char"2044}% numerator
-\textde{\kern-.159em{\addfontfeature{RawFeature=+ss02}\char"2044}#3}% denominator
+  \textde{%\kern-.159em
+{\addfontfeature{RawFeature=+ss02}\char"2044}#3}% denominator
 }}}
   \def\xch@dflt{}
  %\xch@cnt will be 0..7 
@@ -246,7 +267,7 @@
     \def\sufigures{\@nomath\sufigures
         \fontfigurestyle{superior}\selectfont}
     \DeclareTextFontCommand{\textsu}{\sufigures}
-    \let\textsuperior\textsu
+    \let\textsup\textsu
     
     \fa@naming@exception{figures}{{inferior}{proportional}}{Inf}
     \fa@naming@exception{figures}{{inferior}{tabular}}{Inf}
@@ -502,8 +523,12 @@
     }
     \DeclareRobustCommand{\oldstylenums}{%
       \not@math@alphabet\oldstylenums\relax
-      \addfontfeatures{Numbers=OldStyle}%
+      \addfontfeatures{Numbers=OldStyle, CharacterVariant={1:0}}%
     }
+    \DeclareRobustCommand{\oldstyleInums}{%
+      \not@math@alphabet\oldstyleInums\relax
+      \addfontfeatures{Numbers=OldStyle, RawFeature=-cv01}%
+	}
     \DeclareRobustCommand{\liningnums}{%
       \not@math@alphabet\liningnums\relax
       \addfontfeatures{Numbers=Lining}%
@@ -702,7 +727,7 @@
 	%\renewcommand*{\familydefault}{\rmdefault}
 \let\textthit\textth
   }
-\fi
+\fi % type1
 
 %both
 \let\nustyle\nufigures
@@ -710,11 +735,13 @@
 \ifxch@notextnu\else\let\textnu=\textnumerator\fi
 \let\destyle\defigures
 \DeclareTextFontCommand{\textsu}{\sufigures}
-\let\textsuperior\textsu
+\let\sustyle\sufigures
+\let\textsup\textsu
 \DeclareTextFontCommand{\textde}{\defigures}
 \let\textdenominator\textde
 \DeclareTextFontCommand{\textinf}{\infigures}
 \let\textinferior\textinf
+\let\textsub\textinf
 \DeclareTextFontCommand{\textosf}{\osfstyle}
 \DeclareTextFontCommand{\texttosf}{\tosfstyle}
 \DeclareTextFontCommand{\texttlf}{\tlfstyle}
@@ -746,5 +773,8 @@
     {\thfamily #1}%
 }
 %
-
+%\expandafter\show\csname textsuperscript \endcsname
+%\makeatletter
+%\show\@textsuperscript
+%\makeatother
 \endinput
-- 
cgit v1.2.3

