[latex3-commits] [git/LaTeX3-latex3-latex2e] develop: Additional hooks to support CJK font setups (#306) (a3064ea7)

Frank Mittelbach frank.mittelbach at latex-project.org
Mon Apr 6 18:26:44 CEST 2020


Repository : https://github.com/latex3/latex2e
On branch  : develop
Link       : https://github.com/latex3/latex2e/commit/a3064ea7f96c186a9e91843924b5c3a870741a01

>---------------------------------------------------------------

commit a3064ea7f96c186a9e91843924b5c3a870741a01
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Mon Apr 6 18:26:44 2020 +0200

    Additional hooks to support CJK font setups (#306)


>---------------------------------------------------------------

a3064ea7f96c186a9e91843924b5c3a870741a01
 base/changes.txt  |  6 ++++++
 base/ltfssini.dtx | 37 ++++++++++++++++++++++++++++++++++++-
 2 files changed, 42 insertions(+), 1 deletion(-)

diff --git a/base/changes.txt b/base/changes.txt
index de63c69c..40888a2a 100644
--- a/base/changes.txt
+++ b/base/changes.txt
@@ -1,3 +1,9 @@
+2020-04-06  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
+
+	* ltfssini.dtx (section{Custom series settings for main document families}):
+	Added hooks \@expandfontdefaultshook, \@setbfseriesdefaultshook and
+	\@setndseriesdefaultshook to better support Japanese etc (gh/306)
+
 2020-03-19  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
 
 	* fontdef.dtx (subsection{Defaults}):
diff --git a/base/ltfssini.dtx b/base/ltfssini.dtx
index 28d6b34d..fe7d858d 100644
--- a/base/ltfssini.dtx
+++ b/base/ltfssini.dtx
@@ -36,7 +36,7 @@
 %
 %
 \ProvidesFile{ltfssini.dtx}
-             [2020/03/19 v3.1l LaTeX Kernel (NFSS Initialisation)]
+             [2020/04/06 v3.1m LaTeX Kernel (NFSS Initialisation)]
 % \iffalse
 \documentclass{ltxdoc}
 \begin{document}
@@ -411,6 +411,12 @@
   \series at maybe@drop at one@m\bfdefault\bfdef at ult
   \series at maybe@drop at one@m\mddefault\mddef at ult
   \edef\famdef at ult{\familydefault}%
+%    \end{macrocode}
+%    Formats that set up parallel fonts, e.g., for Japanese, can use
+%    this hook to add additional code here.
+% \changes{v3.1m}{2020/04/06}{Hook added (gh/306)}
+%    \begin{macrocode}
+  \@expandfontdefaultshook
 }
 %    \end{macrocode}
 %
@@ -457,6 +463,13 @@
     \let\bfseries at rm\bfdef at ult
     \let\bfseries at sf\bfdef at ult
     \let\bfseries at tt\bfdef at ult
+%    \end{macrocode}
+%    
+%    Formats that set up parallel fonts, e.g., for Japanese, can use
+%    this hook to add resets here.
+% \changes{v3.1m}{2020/04/06}{Hook added (gh/306)}
+%    \begin{macrocode}
+    \@setbfseriesdefaultshook
   \fi
 %    \end{macrocode}
 %    
@@ -492,6 +505,13 @@
     \let\mdseries at rm\mddef at ult
     \let\mdseries at sf\mddef at ult
     \let\mdseries at tt\mddef at ult
+%    \end{macrocode}
+%    
+%    Formats that set up parallel fonts, e.g., for Japanese, can use
+%    this hook to add resets here.
+% \changes{v3.1m}{2020/04/06}{Hook added (gh/306)}
+%    \begin{macrocode}
+    \@setmdseriesdefaultshook
   \fi
     \ifx\f at family\rmdef at ult      \fontseries\mdseries at rm
     \else\ifx\f at family\sfdef at ult \fontseries\mdseries at sf
@@ -655,11 +675,20 @@
 %  \end{macro}
 %
 %
+%  \begin{macro}{\@expandfontdefaultshook}
+%  \begin{macro}{\@setbfseriesdefaultshook}
+%  \begin{macro}{\@setmdseriesdefaultshook}
 %  \begin{macro}{\@rmfamilyhook}
 %  \begin{macro}{\@sffamilyhook}
 %  \begin{macro}{\@ttfamilyhook}
 %    By default the hooks do nothing.
 %    \begin{macrocode}
+\let\@expandfontdefaultshook\@empty
+\let\@setbfseriesdefaultshook\@empty
+\let\@setmdseriesdefaultshook\@empty
+%    \end{macrocode}
+%    
+%    \begin{macrocode}
 \let\@rmfamilyhook\@empty
 \let\@sffamilyhook\@empty
 \let\@ttfamilyhook\@empty
@@ -667,6 +696,9 @@
 %  \end{macro}
 %  \end{macro}
 %  \end{macro}
+%  \end{macro}
+%  \end{macro}
+%  \end{macro}
 %
 %
 %
@@ -993,6 +1025,9 @@
 %<latexrelease>        {\not at math@alphabet\ttfamily\mathtt
 %<latexrelease>         \fontfamily\ttdefault\selectfont}
 %<latexrelease>
+%<latexrelease>\let\@expandfontdefaultshook\@undefined
+%<latexrelease>\let\@setbfseriesdefaultshook\@undefined
+%<latexrelease>\let\@setmdseriesdefaultshook\@undefined
 %<latexrelease>\let\@rmfamilyhook\@undefined
 %<latexrelease>\let\@sffamilyhook\@undefined
 %<latexrelease>\let\@ttfamilyhook\@undefined





More information about the latex3-commits mailing list.