[latex3-commits] [git/LaTeX3-latex3-latex2e] legacy-declarefontseriesdefault: test + news entry (c824bff0)
Frank Mittelbach
frank.mittelbach at latex-project.org
Fri Sep 10 14:01:58 CEST 2021
Repository : https://github.com/latex3/latex2e
On branch : legacy-declarefontseriesdefault
Link : https://github.com/latex3/latex2e/commit/c824bff04b1a4bf1772e8967622563550dd9beec
>---------------------------------------------------------------
commit c824bff04b1a4bf1772e8967622563550dd9beec
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date: Fri Sep 10 14:01:58 2021 +0200
test + news entry
>---------------------------------------------------------------
c824bff04b1a4bf1772e8967622563550dd9beec
base/doc/ltnews34.tex | 40 +++++++++++++++++++++++++++++------
base/testfiles-legacy/github-0663.lvt | 28 ++++++++++++++++++++++++
base/testfiles-legacy/github-0663.tlg | 6 ++++++
3 files changed, 68 insertions(+), 6 deletions(-)
diff --git a/base/doc/ltnews34.tex b/base/doc/ltnews34.tex
index 33923fd7..b31bf601 100644
--- a/base/doc/ltnews34.tex
+++ b/base/doc/ltnews34.tex
@@ -511,12 +511,6 @@ the callback handler indicates to remove the entire math block.
\githubissue{644}
-\subsection{Improve handling of legacy \cs{bfdefault} changes}
-
-\emph{write}
-%
-\githubissue{663}
-
\subsection{???}
@@ -565,6 +559,36 @@ This has now been corrected.
\githubissue{658}
+\subsection{Improve handling of legacy \cs{bfdefault} changes}
+
+In the past, changes to the font series defaults were made by directly
+altering \cs{bfdefault} or \cs{mddefault}. Since 2020 there is now
+\cs{DeclareFontSeriesDefault} that allows more granular control,
+i.e., with that declaration you can alter the default for individual meta
+font families, for example, by only altering the bold settings for the
+sans serif family without changing it for \cs{rmfamily} or \cs{ttfamily}.
+See~\cite{34:ltnews31} for more details.
+
+For backwards compatibility, changing \cs{bfdefault} with
+\cs{renewcommand} remained possible. If used, it alters the setting
+for all meta families in one go. This cannot be done when the
+\cs{renewcommand} happens and was therefore delayed until the next
+time \cs{bfseries} or \cs{mdseries} was executed.
+
+However, the problem with that
+approach was that any call to \cs{DeclareFontSeriesDefault} that
+happened in the mean time was overwritten---the two approaches didn't
+work well side by side. This is a problem because older font packages
+use the legacy method while newer ones use
+\cs{DeclareFontSeriesDefault}. This has now been corrected by changing
+\cs{DeclareFontSeriesDefault} to do any necessary resetting prior to
+setting new defaults.
+%
+\githubissue{663}
+
+
+
+
\subsection{???}
%
@@ -659,6 +683,10 @@ a \cs{mathopen} has been added to avoid that the anchor affects a following unar
\emph{\LaTeX{} documentation on the \LaTeX{} Project Website}.\\
\url{https://latex-project.org/help/documentation/}
+\bibitem{34:ltnews31} \LaTeX{} Project Team:
+ \emph{\LaTeXe{} news 31}.\\
+ \url{https://latex-project.org/news/latex2e-news/ltnews31.pdf}
+
\bibitem{34:ltnews32} \LaTeX{} Project Team:
\emph{\LaTeXe{} news 32}.\\
\url{https://latex-project.org/news/latex2e-news/ltnews32.pdf}
diff --git a/base/testfiles-legacy/github-0663.lvt b/base/testfiles-legacy/github-0663.lvt
new file mode 100644
index 00000000..884cdbac
--- /dev/null
+++ b/base/testfiles-legacy/github-0663.lvt
@@ -0,0 +1,28 @@
+\documentclass{article}
+
+\input{test2e}
+
+\renewcommand\bfdefault{b}
+
+% next package uses \DeclareFontSeriesDefault[rm]{bf}{sbc}
+%
+%\usepackage[boldsans]{ccfonts}
+%
+% we mimic this here:
+
+\DeclareFontShape{OT1}{cmr}{sbc}{n}{<->sub*cmss/sbc/n}{} % map it to sans
+
+\DeclareFontSeriesDefault[rm]{bf}{sbc}
+
+
+\begin{document}
+
+\START
+
+\typeout{font: \the\font}
+
+\bfseries
+
+\typeout{font: \the\font}
+
+\END
diff --git a/base/testfiles-legacy/github-0663.tlg b/base/testfiles-legacy/github-0663.tlg
new file mode 100644
index 00000000..3ff7f11e
--- /dev/null
+++ b/base/testfiles-legacy/github-0663.tlg
@@ -0,0 +1,6 @@
+This is a generated file for the LaTeX2e validation system.
+Don't change this file in any respect.
+font: \OT1/cmr/m/n/10
+LaTeX Font Warning: Font shape `OT1/cmr/sbc/n' in size <10> not available
+(Font) Font shape `OT1/cmss/sbc/n' tried instead on input line ....
+font: \OT1/cmss/sbc/n/10
More information about the latex3-commits
mailing list.