texlive[63057] Master/texmf-dist: xcharter (17apr22)

commits+karl at tug.org commits+karl at tug.org
Sun Apr 17 21:58:40 CEST 2022


Revision: 63057
          http://tug.org/svn/texlive?view=revision&revision=63057
Author:   karl
Date:     2022-04-17 21:58:40 +0200 (Sun, 17 Apr 2022)
Log Message:
-----------
xcharter (17apr22)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/fonts/xcharter/README
    trunk/Master/texmf-dist/doc/fonts/xcharter/xcharter-doc.pdf
    trunk/Master/texmf-dist/doc/fonts/xcharter/xcharter-doc.tex
    trunk/Master/texmf-dist/tex/latex/xcharter/XCharter.sty

Modified: trunk/Master/texmf-dist/doc/fonts/xcharter/README
===================================================================
--- trunk/Master/texmf-dist/doc/fonts/xcharter/README	2022-04-17 16:59:10 UTC (rev 63056)
+++ trunk/Master/texmf-dist/doc/fonts/xcharter/README	2022-04-17 19:58:40 UTC (rev 63057)
@@ -18,11 +18,20 @@
 
     BITSTREAM CHARTER is a registered trademark of Bitstream Inc.
 
-Portions of the font modifications are Copyright (c) 2009--2012, Andrey Panov; Copyright (c) 2013--2021, Michael Sharpe.
+Portions of the font modifications are Copyright (c) 2009--2012, Andrey Panov; Copyright (c) 2013--2022, Michael Sharpe.
 
 
-Current version 1.23 2022-02-25
-1. Added the minxcharter fd files, needed for loading from newtx.
+Current version 1.24 2022-04-16
+(This is an interim release to correct item 1 of the changes listed below. Several new features described in the documentation remain incomplete until a new version of newtx adds the necessary underpinnings.)
+
+Changes in version 1.24
+1. Changes to XCharter.sty, with thanks to Marei Peischl for signalling the problems and suggesting the solutions:
+	(i) Moved the definition of \familydefault from the \AtEndPreamble hook, which made it impossible to change;
+	(ii) Prevented the loading of the T1 encoding is cases where it was not required.
+2. Other changes to XCharter.sty: new option otfmath (loads XCharter-Math), notextnu (prevents XCharter.sty from changing definition of \textnu in babel[greek]); added \textnum as replacement for \textnu.
+
+Changes in version 1.23
+1. Added the {t1,ot1,ly1} minxcharter fd files, needed for loading from newtx.
 2. Substantial changes to XCharter.sty so that it now works with all latex engines.
 
 Changes in version 1.224

Modified: trunk/Master/texmf-dist/doc/fonts/xcharter/xcharter-doc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/fonts/xcharter/xcharter-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/fonts/xcharter/xcharter-doc.tex	2022-04-17 16:59:10 UTC (rev 63056)
+++ trunk/Master/texmf-dist/doc/fonts/xcharter/xcharter-doc.tex	2022-04-17 19:58:40 UTC (rev 63057)
@@ -20,8 +20,8 @@
 \usepackage[OT2,T2A,T1]{fontenc}
 %\traceon
 \usepackage[xcharter,osf,p,mathscale=1.05,textscale=0,uprightscript,vvarbb]{newtx}
+%\usepackage[scaled=.98,osf,otfmath]{XCharter}
 \iftutex\setmonofont{lmmono10-regular.otf}[Scale=1.08]\fi
-%\usepackage[scaled=.98,osf]{XCharter}
 %\linespread{1.04}
 %\usepackage[uprightscript,vvarbb,scaled=1.05]{newtxmath}
 %\usepackage[cal=boondoxo]{mathalfa}
@@ -60,7 +60,7 @@
 %\expandafter\show\csname oldstylenums \endcsname
 %\traceon\oldstylenums{1}\traceoff
 \section{Package Features}
-The \emph{XCharter} fonts are extensions of the Bitstream Charter fonts, adding oldstyle figures (proportionally spaced only), superior figures and small caps in all styles. The original Charter fonts were created by famed font designer Matthew Carter in the late 1980's to enhance legibility of the output from printers of that era (laser, dot matrix, thermal and inkjet) with resolutions that would now be considered low---not far from modern screen resolutions. Their low contrasts, high x-heights and use of piecewise linear outlines where possible may make them interesting again as fonts that will render well on small devices and perhaps projected slides. (It's worth noting that the same designer provided Georgia for Microsoft. It is widely considered to be one of the clearest serifed fonts for viewing on screen, and bears a number of similarities to Charter, though the latter is  heavier.) 
+The \emph{XCharter} fonts are extensions of the Bitstream Charter fonts, adding oldstyle figures, superior figures and small caps in all styles. The original Charter fonts were created by famed font designer Matthew Carter in the late 1980's to enhance legibility of the output from printers of that era (laser, dot matrix, thermal and inkjet) with resolutions that would now be considered low---not far from modern screen resolutions. Their low contrasts, high x-heights and use of piecewise linear outlines where possible may make them interesting again as fonts that will render well on small devices and perhaps projected slides. (It's worth noting that the same designer provided Georgia for Microsoft. It is widely considered to be one of the clearest serifed fonts for viewing on screen, and bears a number of similarities to Charter, though the latter is  heavier.) 
 
 As of version 1.09 (2017-06-25) there is a new collection of Cyrillic glyphs in \emph{XCharter}, copied from Andrey Panov's \emph{Khartiya}, an extension of the free Charter fonts, with small caps included. Some new figure styles were also copied from \emph{Khartiya}---inferiors, numerators and denominators. Along with these additions, there are now slanted versions for those who wish to have both slanted and italic text available to meet distinct semantic purposes. Note that figures and uppercase slanted and italic are almost identical (except for slanted \textsl{Q} and italic \textit{Q}) but lower-case forms are distinct.
 
@@ -72,6 +72,7 @@
 {\tt scaled=.98}, for example, scales all text to 98\% of specified size;
 \item {\tt lining} (or just {\tt lf}) makes lining figures ($0123456789$) the default for text---this is set automatically and does not need to be entered explicitly;
 \item {\tt oldstyle} (or {\tt osf}) sets the figure style in text mode to oldstyle ({\osffnt  0123456789}) with numeral one like a shortened  $1$, but math mode will always use lining figures;
+\item {\tt proportional} (or {\tt p}), new as of version 1.23, changes the default tabular figure style to proportional.
 \item {\tt oldstyleI} (or {\tt osfI}) sets the figure style in text mode to oldstyle ({\osfIfnt0123456789}) with numeral one like a shortened I, but math mode will always use lining figures;
 \item {\tt sups} sets the style for superscript figures (e.g., footnote markers) to XCharter's superior figures rather than using the default text inserts in mathematical superscripts. This option has no effect if a KOMA class is in force.
 \item {\tt scosf} makes oldstyle figures the default in small cap text, no matter what the global figure setting may be.
@@ -82,8 +83,8 @@
 There are some substantial additions in version 1.23, some requiring {\tt newtx}, version 1.71 or higher:
 \begin{itemize}
 \item
-{\tt XCharter.sty} now works with all flavors of LaTeX---unicode and non-unicode---but there may be some small differences in output. Essentially all previous  options and macros are supported a\and there are new ones available, some of which are limited to unicode engines.
-\item Previous versions of {\tt XCharter} had only two normal figure styles: {\tt tabular lining} (the default) and {\tt proportional oldstyle}. Version 1.23 adds two more so there are separate {\tt TLF (tabular lining figures)}, {\tt LF (proportional lining figures)}, {\tt TOsF (tabular oldstyle figures)} and {\tt OsF (proportional oldstyle figures)}. Two new options have been added to globally select the default figures style. Option {\tt p} (or {\tt proportional}) and {\tt t} (or {\tt tabular}). A new command\verb|\useproportional| (preamble only) has the same effect as option {\tt proportional}.
+{\tt XCharter.sty} now works with all flavors of LaTeX---unicode and non-unicode---but there may be some small differences in output. Essentially all previous  options and macros are supported and there are new ones available, some of which are limited to unicode engines.
+\item Previous versions of {\tt XCharter} had only two normal figure styles: {\tt tabular lining} (the default) and {\tt proportional oldstyle}. Version 1.23 adds two more so there are separate {\tt TLF (tabular lining figures)}, {\tt LF (proportional lining figures)}, {\tt TOsF (tabular oldstyle figures)} and {\tt OsF (proportional oldstyle figures)}. Two new options have been added to globally select the default figures style. Option {\tt p} (or {\tt proportional}) and {\tt t} (or {\tt tabular}). A new command \verb|\useproportional| (preamble only) has the same effect as option {\tt proportional}.
 \item With the new figures came new macros to select them, no matter what the defaults may be. There are two forms, one that switches the figures until further notice and the other a macro with an argument.
 \begin{center}
   \begin{tabular}{@{} cccc @{}}
@@ -107,7 +108,7 @@
 \item
 {\tt nofontspec} prevents {\tt XCharter.sty} from loading {\tt fontspec}.
 \item {\tt type1text} (or {\tt type1})  specifies processing the text font using {\tt type1} mode. This does not prevent {\tt fontspec} from loading.
-\item {\tt defaultfeatures=} gives you a place to set the default text font features for {\tt fontspac}.
+\item {\tt defaultfeatures=} gives you a place to set the default text font features for {\tt fontspec}.
 \end{itemize}
 \end{itemize}
 
@@ -125,7 +126,7 @@
 \item \verb|{\osfstyle 23}| prints \textosf{23} ({\tt OldStyle,Proportional}) while \verb|{\liningnums 23}| prints {\liningnums 23}, {\tt Lining} with whatever figure alignment is in force. There are also macros \verb|\tabularnums|, \verb|\proportionalnums|, \verb|\oldstylenums|, \verb|\tosfstyle| and \verb|\tlfstyle| with the expected behaviors.
 %\item \verb|\textosf| prints its argument in oldstyle figures using, in effect, the {\tt osf} option---e.g., \verb|\textosf{12}| results in \textosf{12}. 
 %\item \verb|\textosfI| prints its argument in oldstyle figures using, in effect, the {\tt osfI} option---e.g., \verb|\textosfI{12}| results in \textosfI{12}. 
-\item Numerators and denominators are normally used only for constructing fractions, but may if needed be called using \verb|\textnumerator| and \verb|\textdenominator|. They are about 7\% smaller than superiors and inferiors. You may use \verb|\textde| and \verb|\textnu| as abbreviations, though the latter will not be available if {\tt babel} is loaded with {\tt greek} option.
+\item Numerators and denominators are normally used only for constructing fractions, but may if needed be called using \verb|\textnumerator| and \verb|\textdenominator|. They are about 7\% smaller than superiors and inferiors. You may use \verb|\textde| and \verb|\textnu| as abbreviations, though the latter will not be available if {\tt babel} is loaded with {\tt greek} option. As of version 1.24, you may prevent \verb|\textnu| from overwriting the babel/greek definition by using the new option {\tt notextnu} to {\tt XCharter}. In any case, a new command \verb|\textnum| takes the place of the old {\tt XCharter} \verb|\textnu|.
 \item The \verb|\textfrac| macro allows you to write, e.g.,  \verb|\textfrac{31}{32}| to get the simple fraction \textfrac{31}{32}, and \verb|\textfrac[2]{31}{32}| to get \textfrac[2]{31}{32}. (The optional argument, $2$ in the latter case, is always typeset in lining figures.)
 \item The \verb|\textsfrac| macro, available only when you use the {\tt newtx} package with option {\tt xcharter} to load {\tt XCharter} with {\tt newtxmath}, allows you to write, e.g.,  \verb|\textsfrac{31}{32}| to get the simple stacked fraction 
 \iftutex
@@ -142,29 +143,35 @@
 \end{itemize}
 \subsection*{Math package choices:}
 
-There is now a unicode math package, {\tt xcharter-math} that may be run with a simple preamble containing
+There is now a unicode math package, {\tt XCharter-Math} that may be run with a simple preamble containing
 \begin{verbatim}
 \usepackage{fontspec}
-\setmainfont{xcharter}
+\setmainfont{XCharter} % reads XCharter.fontspec
 \usepackage{unicode-math}
 \setmathfont{XCharter-Math.otf}
 \end{verbatim}
-or, as described in the documentation for {\tt xcharter-math},
+or, even better, as described in the documentation for {\tt XCharter-Math},
 \begin{verbatim}
-\\usepackage{xcharter-otf}
+\usepackage{xcharter-otf}
 \end{verbatim}
-but in order to get the options and macros described in this documentation, you could use instead
+but in order to get the options and macros described in this documentation, you should use instead, for the same effect
 \begin{verbatim}
-\usepackage{XCharter} % loads fontspec
-\usepackage{unicode-math}
-\setmathfont{XCharter-Math.otf}
+\usepackage[otfmath]{XCharter} 
+% loads fontspec, unicode-math, and sets XCharter-Math.otf
 \end{verbatim}
-
-Three non-unicode math packages seem to provide reasonable companions for \textsf{XCharter}. The first example uses Charter italics as math italics, but doesn't provide arbitrary scaling and doesn't sufficiently distinguish math italic v from mathematical Greek \verb|\nu|. Moreover, it is not easy to redefine \verb|\mathcal| to get a better math calligraphic alphabet---e.g., the {\tt mathalpha} package fails. The second uses \textsf{libertine} italics and Greek in math mode, which is a good match to Charter in style and weight after scaling up, is arbitrarily scalable, has distinct math italic v and mathematical Greek \verb|\nu|, and is completely compatible with {\tt mathalfa}. The third is a new revision of {\tt newtxmath} with option {\tt charter} (or, equivalently, {\tt xcharter}), which substitutes Charter italics as math italics and, as of version 1.11,  uses a newly developed family of Greek symbols in \{regular, bold\} $\times$ \{upright, italic\} to match the style and italic angle of XCharter. This version is scalable and has a math italic v (plus a matching w) distinct from \verb|\nu|. (The option {\tt noxchvw} to {\tt newtxmath} changes the v and w to be the original Charter italic glyphs, which may lead to issues with \verb|\nu|. The option {\tt alty} to {\tt newtxmath/charter}, new as of version {\tt 1.203}, substitutes $y$ for the default \emph{y} which, IMO, works better in combination with other math symbols because it lacks the problematic tail of \emph{y}.)
+\textsc{Notes on the last preamble fragment:}
+\begin{itemize}
+\item
+Unless option {\tt otfmath} is specified,  math will be processed by {\tt newtxmath} with {\tt xcharter} option. (See examples 2--6 below.)
+\item All options passed to {\tt XCharter} that are not understood by {\tt XCharter} will be passed along to {\tt xcharter-otf} provided option {\tt otfmath} was specified. 
+\end{itemize}
+Three non-unicode math packages seem to provide reasonable companions for \textsf{XCharter}. The first example uses Charter italics as math italics, but doesn't provide arbitrary scaling and doesn't sufficiently distinguish math italic v from mathematical Greek \verb|\nu|. Moreover, it is not easy to redefine \verb|\mathcal| to get a better math calligraphic alphabet---e.g., the {\tt mathalpha} package fails. The second uses \textsf{libertine} italics and Greek in math mode, which is a good match to Charter in style and weight after scaling up, is arbitrarily scalable, has distinct math italic v and mathematical Greek \verb|\nu|, and is completely compatible with {\tt mathalpha}. The third is a new revision of {\tt newtxmath} with option {\tt charter} (or, equivalently, {\tt xcharter}), which substitutes Charter italics as math italics and, as of version 1.11,  uses a newly developed family of Greek symbols in \{regular, bold\} $\times$ \{upright, italic\} to match the style and italic angle of XCharter. This version is scalable and has a math italic v (plus a matching w) distinct from \verb|\nu|. (The option {\tt noxchvw} to {\tt newtxmath} changes the v and w to be the original Charter italic glyphs, which may lead to issues with \verb|\nu|.)
+% The option {\tt alty} to {\tt newtxmath/charter}, new as of version {\tt 1.203}, substitutes $y$ for the default \emph{y} which, IMO, works better in combination with other math symbols because it lacks the problematic tail of \emph{y}.)
 %\newpage
 
 \textsc{Example 1:}
 \begin{verbatim}
+% [pdf]latex only
 \usepackage[charter,expert]{mathdesign}
 \usepackage[scaled=.96,osf]{XCharter}% matches the size used in math
 \linespread{1.04}
@@ -172,6 +179,7 @@
 
 \textsc{Example 2:}
 \begin{verbatim}
+% [pdf]latex only
 \usepackage[scaled=.98,sups,osf]{XCharter}% lining figures in math, osf in text
 \usepackage[scaled=1.04,varqu,varl]{inconsolata}% inconsolata typewriter
 \usepackage[type1]{cabin}% sans serif
@@ -181,6 +189,7 @@
 
 \textsc{Example 3:}
 \begin{verbatim}
+% [pdf]latex only
 \usepackage[scaled=.98,sups,osf]{XCharter}% lining figures in math, osf in text
 \usepackage[scaled=1.04,varqu,varl]{inconsolata}% inconsolata typewriter
 \usepackage[type1]{cabin}% sans serif
@@ -189,6 +198,7 @@
 \end{verbatim}
 \textsc{Example 4:}
 \begin{verbatim}
+% [pdf]latex only
 \usepackage[<specify babel languages>]{babel}% load before XCharter
 \usepackage[scaled=.98,sups,osf]{XCharter}% osf in text, lining figures in math
 \usepackage[scaled=1.04,varqu,varl]{inconsolata}% inconsolata typewriter
@@ -203,7 +213,7 @@
 \usepackage[<specify babel languages>]{babel}% load before newtx
 \usepackage[scaled=1.04,varqu,varl]{inconsolata}% inconsolata tt
 \usepackage[type1]{cabin}% sans serif for math
-\usepackage[T1]{fontenc} % encodiing to use for mathtt, etc
+\usepackage[T1]{fontenc} % encoding to use for mathtt, etc
 \usepackage[xcharter,osf,p,mathscale=1.05,textscale=0,uprightscript,vvarbb]{newtx}% loads newtxmath
 % newtx loads fontspec with unicode engines
 \setmonofont{lmmono10-regular.otf}[Scale=1.08] % typewriter for text
@@ -225,7 +235,7 @@
 \usepackage[scaled=1.04,varqu,varl]{inconsolata}% inconsolata typewriter
 \usepackage[type1]{cabin}% sans serif
 \usepackage[uprightscript,charter,vvarbb,scaled=1.05]{newtxmath}
-\\linespread{1.04}
+\linespread{1.04}
 \end{verbatim}
 
 Here is a short sample based on the preamble of \textsc{Example 3}:\\[4pt]
@@ -320,7 +330,7 @@
 \item 
 \url{https://www.pdf-online.com/osa/validate.aspx} is a free online validator. Almost all XCharter documents validate PDF/A-1b.
 \item 
-The free {\tt veraPDF} validator is much stricter. Most documents produced using XCharter failed. 
+The free {\tt veraPDF} validator is much stricter. Recent documents produced using XCharter since version 1.24 have validated correctly. 
 \end{itemize}
 \newpage
 
@@ -444,6 +454,62 @@
 
 The following tables show how to access the new glyphs in unicode TeX. Note that you will need to set {\tt StylisticSet=1} if you wish not to use the new sharp-s glyphs.
 
-\includegraphics{newgermanfxch-crop}
+%\includegraphics{newgermanfxch-crop}
+\noindent \textbf{New symbols in XCharter:}
+\begin{center}
+  \begin{tabular}{@{} lcl @{}}
+    \hline
+    Glyph name & glyph & macro\\ 
+    \hline
+    {\tt uni1E9E} & \symbol{"1E9E} &\verb|\symbol{"1E9E}|\\ 
+    {\tt uni1E9E.ss01} & {\addfontfeature{StylisticSet=1}\symbol{"1E9E}} & \verb|{\addfontfeature{StylisticSet=1}\symbol{"1E9E}}| \\ 
+    {\tt germandbls.sc} & \textsc{\ss} & \verb|{\textsc{\ss}}| \\ 
+    {\tt germandbls.sc.ss01} & {\addfontfeature{StylisticSet=1}\textsc{\ss}} & \verb|{\addfontfeature{StylisticSet=1}\textsc{\ss}}| \\ 
+    \hline
+  \end{tabular}
+\end{center}  
+ 
+%{\bfseries
+%\begin{center}
+%  \begin{tabular}{@{} lcl @{}}
+%    \hline
+%    Glyph name & glyph & macro\\ 
+%    \hline
+%    {\tt uni1E9E} & \symbol{"1E9E} &\verb|\symbol{"1E9E}|\\ 
+%    {\tt uni1E9E.alt} & {\addfontfeature{StylisticSet=1}\symbol{"1E9E}} & \verb|{\addfontfeature{StylisticSet=1}\symbol{"1E9E}}| \\ 
+%    {\tt germandbls.sc.ss02} & {\addfontfeature{StylisticSet=1}\textsc{\ss}} & \verb|{\addfontfeature{StylisticSet=1}\textsc{\ss}}| \\ 
+%    \hline
+%  \end{tabular}
+%\end{center}
+%}
+\noindent \textbf{Effect of choice of {\tt StylisticSet}:}
+ 
+\begin{center}
+  \begin{tabular}{@{} ccccc @{}}
+    \hline
+    StylisticSet & \verb|\ss| & \verb|\SS| & \verb|\MakeUppercase{\ss}| & \verb|\textsc{\ss}| \\ 
+    \hline
+    None & \ss & \SS & \MakeUppercase{\ss} & \textsc{\ss}\\ 
+    
+    =1 & {\addfontfeature{StylisticSet=1}\ss} & {\addfontfeature{StylisticSet=1}\SS} & {\addfontfeature{StylisticSet=1}\MakeUppercase{\ss}} & {\addfontfeature{StylisticSet=1}\textsc{\ss}}\\ 
+    \hline
+  \end{tabular}
+\end{center}
 
+\noindent \textbf{Choosing the shape of the oldstyle figure ``one'':}\\
+
+The default is \oldstylenums{1}. The choice is controlled by the feature \texttt{cv01}. To change this globally when you load XCharter, you may make oldstyle numbers the default with the alternate shape for ``one'':
+\begin{verbatim}
+\setmainfont{XCharter}[CharacterVariant={1:0},Numbers={OldStyle}]
+\end{verbatim}
+To set this for one-time use, you can write:
+\begin{verbatim}
+{\addfontfeature{CharacterVariant={1:0},Numbers={OldStyle}}1}
+\end{verbatim}
+to make $1$ render as {\addfontfeature{CharacterVariant={1:0},Numbers={OldStyle}}\oldstylenums{1}}. (According to its documentation, the first index $1$ in \verb|{1:0}| refers to the {\tt CharacterVariant} index, and the second index, $0$, refers to the first choice specified among the variant forms.)
+%1{\addfontfeature{CharacterVariant={1:0},Numbers={OldStyle}}1}
+%{\addfontfeature{CharacterVariant={1:1},Numbers={OldStyle}}1}
+
+If you choose to load {\tt XCharter-*.otf} using {\tt XCharter.sty} or {\tt newtx}, you may make use of the options {\tt osf}, {\tt osfI} or the macros \verb|\useosf|, \verb|\useosfI| to the same effect.
+
 \end{document}
\ No newline at end of file

Modified: trunk/Master/texmf-dist/tex/latex/xcharter/XCharter.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/xcharter/XCharter.sty	2022-04-17 16:59:10 UTC (rev 63056)
+++ trunk/Master/texmf-dist/tex/latex/xcharter/XCharter.sty	2022-04-17 19:58:40 UTC (rev 63057)
@@ -3,16 +3,13 @@
 %%
 \NeedsTeXFormat{LaTeX2e}
 
-\def\fileversion{1.22}
-\def\filedate{2022/02/25}
+\def\fileversion{1.24}
+\def\filedate{2022/04/16}
 
 \ProvidesPackage{XCharter}[\filedate\space v\fileversion]
 
 \message{`XCharter' v\fileversion, \filedate\space Text macros for XCharter, an extension of Charter (msharpe)}
 
-\RequirePackage[T1]{fontenc}
-\RequirePackage{textcomp}
-\DeclareEncodingSubset{TS1}{XCharter-*}{0}
 \RequirePackage{iftex,xkeyval,etoolbox,textcomp}
 \RequirePackage{xstring,ifthen,scalefnt} % for \textfrac
 \RequirePackage{mweights,xkeyval}
@@ -24,9 +21,15 @@
 
 % Engine check
 \newif\ifxch at otftext
-\iftutex\xch at otftexttrue\fi 
-\newif\ifxch at nofontspec
-
+\iftutex
+	\xch at otftexttrue
+\else
+	\RequirePackage[T1]{fontenc}
+	\RequirePackage{textcomp}
+	\DeclareEncodingSubset{TS1}{XCharter-*}{0}
+\fi 
+%\newif\ifxch at nofontspec
+\newif\ifxch at otfmath
 % newtx check
 \newif\ifntx at newtx
 \@ifundefined{ntx at otftexttrue}{% not run from newtx.sty
@@ -54,7 +57,7 @@
 \@nameuse{if#1}\xch at otftextfalse\fi
 }
 \DeclareOptionX{nofontspec}[true]{% type1 + don't load fontspec
-\@nameuse{if#1}\xch at nofontspectrue\fi
+%\@nameuse{if#1}\xch at nofontspectrue\fi % No effect from 1.24 onward
 }
 \def\xch at defaultfeatures{}
 \DeclareOptionX{defaultfeatures}{\def\xch at defaultfeatures{#1}}
@@ -63,6 +66,10 @@
 \def\xch at dfltfigurestyle{lf}
 \def\xch at dfltfigurealign{t}
 
+\DeclareOptionX{otfmath}[true]{%
+\@nameuse{xch at otfmath#1}
+}
+
 \DeclareOptionX{lining}[true]{%
 \@nameuse{xch at lining#1}
 }
@@ -124,6 +131,7 @@
 
 %Scale
 \providecommand*{\XCharter at scale}{1}% Might have been defined in newtx
+\DeclareOptionX{Scale}{\renewcommand*{\XCharter at scale}{#1}}
 \DeclareOptionX{scale}{\renewcommand*{\XCharter at scale}{#1}}
 \DeclareOptionX{scaled}{\renewcommand*{\XCharter at scale}{#1}}
 
@@ -162,6 +170,8 @@
 %\DeclareOptionX{proportional}{\useproportional}
 %\def\xch at fnmark{}
 %\DeclareOptionX{fnmarkerfont}{\def\xch at fnmark{#1}}
+\newif\ifxch at notextnu
+\DeclareOptionX{notextnu}{\xch at notextnutrue}
 \DeclareOptionX{defaultfeatures}{\def\xch at defaultfeatures{#1}}
 \DeclareOptionX{oldSS}{\advance\xch at cnt\@ne}
 \DeclareOptionX{theoremfont}{\xch at thrmtrue}
@@ -171,21 +181,29 @@
 \DeclareOptionX{scosf}{\xch at scosftrue}
 \DeclareOptionX{foresolidus}{\gdef\XCharter at foresolidus{#1}}
 \DeclareOptionX{aftsolidus}{\gdef\XCharter at aftsolidus{#1}}
+\DeclareOptionX*{\ifxch at otfmath\PassOptionsToPackage{\CurrentOption}{xcharter-otf}\fi}
 \ExecuteOptionsX{lining,tabular}
 \ProcessOptionsX\relax
 
+%+++++++++++++++++Option consequences++++++++++++++++++++++++
+
 % Check for conflict between nofontspec and others
-\ifxch at nofontspec
-  \iftutex
-	\xch at otftextfalse
-  \fi
-\fi
+%\ifxch at nofontspec
+%  \iftutex
+%	\xch at otftextfalse
+%  \fi
+%\fi
 %\edef\xch at scaled{s*[\xch at scale]}% used in fd files
 
 \iftutex
-  \ifxch at nofontspec % do nothing
-  \else   
+  \ifxch at otfmath
+     \RequirePackage{fontspec}
+     \RequirePackage[Scale=\XCharter at scale]{xcharter-otf}
+     %\setmathfont{XCharter-Math.otf}
+  \else   % set up for minxcharter+newtxmath, then otf XCharter
      \RequirePackage[no-math]{fontspec}
+     \let\ntxmath at scale=\XCharter at scale
+     
   \fi
 \fi
 
@@ -241,8 +259,8 @@
     \fa at naming@exception{figures}{{numerators}{tabular}}{Numr}
     \def\nufigures{\@nomath\nufigures%
         \fontfigurestyle{numerators}\selectfont}
-    \DeclareTextFontCommand{\textnu}{\nufigures}
-    \let\textnumerator\textnu
+    \DeclareTextFontCommand{\textnumerator}{\nufigures}
+    %\let\textnum\textnumerator
     
     \fa at naming@exception{figures}{{denominators}{proportional}}{Dnom}
     \fa at naming@exception{figures}{{denominators}{tabular}}{Dnom}
@@ -352,7 +370,7 @@
 %\newcommand{\textosf}[1]{{\fontencoding{T1}\fontfamily{XCharterx}\selectfont #1}}% to get XCharter osf
 %\newcommand{\textosfI}[1]{{\fontencoding{T1}\fontfamily{XChartery}\selectfont #1}}% to get XCharter osfI
 
-\renewcommand*{\bfdefault}{b}
+%\renewcommand*{\bfdefault}{b}
 \renewcommand*{\scdefault}{sc}% for better compatibility with mathdesign
 
 % The following are provided so that we may access osf in any mode
@@ -478,7 +496,7 @@
       \not at math@alphabet\osfstyle\relax
       \addfontfeatures{Numbers={Proportional,OldStyle}}%
     }
-    \DeclareRobustCommand{\tosfstyle}{%
+     \DeclareRobustCommand{\tosfstyle}{%
       \not at math@alphabet\tosfstyle\relax
       \addfontfeatures{Numbers={Monospaced,OldStyle}}%
     }
@@ -547,15 +565,7 @@
   \providecommand\sufigures{\addfontfeatures{VerticalPosition=Superior}}
   \providecommand\defigures{\addfontfeatures{RawFeature=+dnom}}
 \providecommand\infigures{\addfontfeatures{VerticalPosition=Inferior}}
-	\let\nustyle\nufigures
-    \DeclareTextFontCommand{\textnu}{\nufigures}
-	\let\destyle\defigures
-    \DeclareTextFontCommand{\textsu}{\sufigures}
-    \let\textsuperior\textsu
-    \DeclareTextFontCommand{\textde}{\defigures}
-    \let\textdenominator\textde
-    \DeclareTextFontCommand{\textinf}{\infigures}
-    \let\textinferior\textinf
+%	\let\nustyle\nufigures
  
   \ifxch at sups %
     \usepackage{realscripts}
@@ -581,7 +591,7 @@
 %}
 %\let\textthit\textth
   \renewcommand*{\rmdefault}{XCharter-TLF} % always TLF in math
-  \renewcommand*{\familydefault}{\rmdefault}
+  %\renewcommand*{\familydefault}{\rmdefault}
    
   \ifxch at sups %
    \ifxch at KOMA %
@@ -629,6 +639,7 @@
           BoldItalicFont = *-BoldItalic ,
           BoldSlantedFont= *-BoldSlanted ,
           SmallCapsFeatures={Letters=SmallCaps} ,
+          \if1\XCharter at altone CharacterVariant={1:0}\fi
           ] {\xch at base}
 \def\xch at sty{\xch at figurestyle}\def\xch at fa{\xch at figurealign}
   \if l\xch at thmlin\def\xch at sty{Lining}\def\xch at fa{Tabular}\fi 
@@ -688,12 +699,22 @@
 	
     \newcommand*{\thdefault}{XCharterTH-\xch at thfigurestyle}
     \normalfont
-	\renewcommand*{\familydefault}{\rmdefault}
+	%\renewcommand*{\familydefault}{\rmdefault}
 \let\textthit\textth
   }
 \fi
 
 %both
+\let\nustyle\nufigures
+\let\textnum\textnumerator
+\ifxch at notextnu\else\let\textnu=\textnumerator\fi
+\let\destyle\defigures
+\DeclareTextFontCommand{\textsu}{\sufigures}
+\let\textsuperior\textsu
+\DeclareTextFontCommand{\textde}{\defigures}
+\let\textdenominator\textde
+\DeclareTextFontCommand{\textinf}{\infigures}
+\let\textinferior\textinf
 \DeclareTextFontCommand{\textosf}{\osfstyle}
 \DeclareTextFontCommand{\texttosf}{\tosfstyle}
 \DeclareTextFontCommand{\texttlf}{\tlfstyle}



More information about the tex-live-commits mailing list.