Skip to content

Commit

Permalink
Series changes (a version of #1396) (#1583)
Browse files Browse the repository at this point in the history
* typo

* rollback tests and documentation for #1581

* correct docs after review

* ltfssaxes from #1396

* ltnews41 and changes

* align series change rule arguments

* more rule cleanup and start of rollback support

* Full support

* wording

* Apply suggestions from code review

Co-authored-by: user227621 <[email protected]>

* more suggestions from review

* otf files do not end in .ttf :-)

* Apply suggestions from code review

Co-authored-by: user227621 <[email protected]>

* Apply suggestions from code review

Co-authored-by: user227621 <[email protected]>

* WIP

* Apply suggestions from code review

Co-authored-by: user227621 <[email protected]>

* more minor changes

* Apply suggestions from code review

Co-authored-by: user227621 <[email protected]>

* Update base/ltfssaxes.dtx

Co-authored-by: user227621 <[email protected]>

* that fix got lost during merge

* Update base/ltfssaxes.dtx

Co-authored-by: user227621 <[email protected]>

* Update base/ltfssaxes.dtx

Co-authored-by: user227621 <[email protected]>

* corrections by Chris

* re-add a rule

* grumble

* and, of course, my typical typo

* Apply suggestions from code review

Co-authored-by: user227621 <[email protected]>

* some further minor changes

* regen and cleanup of the rollback data (we don't need to roll back anything that hasn't changed between 2024 and 2020)

* Apply suggestions from code review

Co-authored-by: user227621 <[email protected]>

---------

Co-authored-by: user227621 <[email protected]>
  • Loading branch information
FrankMittelbach and user227621 authored Dec 17, 2024
1 parent c4ebca2 commit 176699b
Show file tree
Hide file tree
Showing 43 changed files with 3,327 additions and 549 deletions.
7 changes: 7 additions & 0 deletions base/changes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ to completeness or accuracy and it contains some references to files that are
not part of the distribution.
================================================================================

2024-12-13 Maurice Hansen & Frank Mittelbach

* ltfssaxes.dtx
Add numerous \DeclareFontSeriesChangeRule entries to support the full
range of weights (from 'ul' to 'ub') and widths (from 'uc' to 'ux').
Minor modifications to the existing entries. (gh/1583)

2024-12-11 Frank Mittelbach <[email protected]>

* ltfssaxes.dtx (subsection{Mapping rules for shape combinations}):
Expand Down
53 changes: 53 additions & 0 deletions base/doc/ltnews41.tex
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,55 @@ \subsection{Logging text command and symbol declarations}
%
\githubissue{1242}

\subsection{Supporting the \texttt{ssc} and \texttt{sw} shapes}

The \texttt{ssc} shape (spaced small capitals) is supported in
\LaTeX{} through the commands \cs{sscshape} and \cs{textssc}. However,
until this release there where no font shape change rules defined for
this admittely seldom available shape, so that
\begin{verbatim}
\sscshape\itshape
\end{verbatim}
changed unconditionally to \texttt{it} (italics) rather than to
\texttt{sscit} (spaced small italic capitals). Thanks to Michael
Ummels, the missing declarations have now been added so that shape
changes in font families that support spaced small capitals work
properly.

At the same time we took the opportunity to improve the fallbacks for
the \texttt{sw} (swash) shapes, which are accessible through the
commands \cs{swshape} or \cs{textsw}. If an \texttt{sw} combination is
not available, the rules now try to replace \texttt{sw} with
\texttt{it} rather than falling back to \texttt{n}.
%
\githubissue{1581}

\subsection{Improvement of the NFSS font series management}

\LaTeX's font selection mechanism (NFSS) supports 9~weight levels,
from ultra-light~(\texttt{ul}) to ultra-bold~(\texttt{ub}), and also
9~width levels, from ultra-condensed~(\texttt{uc}) to
ultra-expanded~(\texttt{ux}). With the February~2020 release, this
mechanism was extended so that requests to set the weight or the width
attributes of the series are combined in a sensible
way~\cite{41:ltnews31}: E.g., if you typeset a paragraph in a
condensed face using \verb+\fontseries{c}\selectfont+ and then use
\cs{textbf} inside the paragraph, a bold condensed face is
selected. The combination of the series values is done by consulting a
simple lookup table whose entries are defined with
\cs{DeclareFontSeriesChangeRule}.

Until now, this lookup table was missing some entries, especially with
regard to rarely used width values. In such cases, the series values
were not combined as expected. This has been fixed (thanks to Maurice
Hansen) by adding numerous \cs{DeclareFontSeriesChangeRule} entries so
that the full range of weights (from \texttt{ul} to \texttt{ub}) and
widths (from \texttt{uc} to \texttt{ux}) is now supported when
combining font series values.
%
\githubissue{1396}


\subsection{Supporting the \texttt{ssc} and \texttt{sw} shapes}

The \texttt{ssc} shape (spaced small capitals) is supported in
Expand Down Expand Up @@ -354,6 +403,10 @@ \subsection{\pkg{multicol}:\ Full support for extended marks}
\emph{\LaTeXe{} news 1--41}. June, 2025.
\url{https://latex-project.org/news/latex2e-news/ltnews.pdf}

\bibitem{41:ltnews31} \LaTeX{} Project Team.
\emph{\LaTeXe{} news 31}. February 2020.
\url{https://latex-project.org/news/latex2e-news/ltnews31.pdf}

\bibitem{41:ltnews34} \LaTeX{} Project Team.
\emph{\LaTeXe{} news 34}. November 2021.
\url{https://latex-project.org/news/latex2e-news/ltnews34.pdf}
Expand Down
Loading

0 comments on commit 176699b

Please sign in to comment.