[latex3-commits] [git/LaTeX3-latex3-latex2e] develop: Gh905 (#906) (0c2316d1)

GitHub noreply at github.com
Thu Aug 18 18:21:16 CEST 2022


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

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

commit 0c2316d149d08066e2db58b6f7b89d647964e801
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Thu Aug 18 18:21:16 2022 +0200

    Gh905 (#906)
    
    * enhancement for #905  (WIP)
    
    * more documentation


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

0c2316d149d08066e2db58b6f7b89d647964e801
 base/changes.txt      | 10 +++++++---
 base/doc/fntguide.tex | 32 +++++++++++++++++++++++++++-----
 base/doc/ltnews36.tex | 40 ++++++++++++++++++++++++++++++++++++++--
 base/lttextcomp.dtx   | 10 ++++++++--
 4 files changed, 80 insertions(+), 12 deletions(-)

diff --git a/base/changes.txt b/base/changes.txt
index 735ac8f4..e02fdbac 100644
--- a/base/changes.txt
+++ b/base/changes.txt
@@ -8,13 +8,17 @@ are not part of the distribution.
 
 2022-08-13  Marcel Krüger  <Marcel.Krueger at latex-project.org>
 
-  * ltluatex.dtx:
+	* ltluatex.dtx:
 	Unregister mlist_to_hlist callback when no related callbacks are registered
 
+2022-08-07  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
+
+	* lttextcomp.dtx: Make \DeclareEncodingSubset act globally so that
+	it can be used in fd files (gh/905)
+
 2022-07-23  Joseph Wright <Joseph.Wright at latex-project.org>
 
-	* ltkeys.dtx: 
-	Output 'friendly' package names in messages
+	* ltkeys.dtx: Output 'friendly' package names in messages
 
 2022-07-10  David Carlisle  <David.Carlisle at latex-project.org>
 
diff --git a/base/doc/fntguide.tex b/base/doc/fntguide.tex
index 2dfd1952..65467339 100644
--- a/base/doc/fntguide.tex
+++ b/base/doc/fntguide.tex
@@ -42,7 +42,7 @@
 
 \title{\LaTeXe{} font selection}
 
-\author{\copyright~Copyright 1995--2021, \LaTeX\ Project
+\author{\copyright~Copyright 1995--2022, \LaTeX\ Project
   Team.\thanks{Thanks to Arash Esbati for documenting the
     newer NFSS features of 2020}\\
   All rights reserved.%
@@ -52,7 +52,7 @@
    \texttt{fntguide.tex} for full details.}%
 }
 
-\date{December 2021}
+\date{August 2022}
 
 \begin{document}
 
@@ -1436,6 +1436,20 @@ Example:
    \DeclareFontEncoding{OT1}{}{}
 \end{verbatim}
 
+\NEWfeature{2021/06/01}
+Fonts in encoding \texttt{TS1} are usually not implementing the full encoding but only a subset.
+This subset should be declared  with a |\DeclareEncodingSubset|
+declaration:
+
+\begin{decl}
+  |\DeclareEncodingSubset| \arg{encoding}
+                           \arg{font family}
+                           \arg{subset number}
+\end{decl}
+This should even be done if the font is implementing the full
+\texttt{TS1} encoding; see page~\pageref{page:declareencodingsubset} for
+further details.
+
 Some author commands need to change their definition depending on which
 encoding is currently in use.  For example, in the |OT1| encoding, the
 letter `\AE' is in slot |"1D|, whereas in the |T1| encoding it is in
@@ -2053,7 +2067,7 @@ glyphs from the math fonts instead of the current text font (this means
 they always keep the same shape and do not nicely blend in with the text
 font).
 
-\newpage
+%\newpage
 
 The following tables show the macros available.  The next commands are
 `constructed' accents and are built via \TeX{} macros:
@@ -2239,7 +2253,8 @@ question arises: ``Which glyphs of the |TS1| encoding are implemented by
 which font?''
 
 \NEWfeature{2021/06/01}
-Fonts can be ordered in sub-encodings with the |\DeclareEncodingSubset|
+Fonts\label{page:declareencodingsubset}
+can be ordered in sub-encodings with the |\DeclareEncodingSubset|
 macro:
 \begin{decl}
   |\DeclareEncodingSubset| \arg{encoding}
@@ -2582,7 +2597,14 @@ is the same as writing
 If only some are needed then one can define them individually but in
 many cases all four are wanted, hence the shortcut.
 
-
+Maintainers of font bundles that include \texttt{TS1} encoded font files
+should add an appropriate declaration into the corresponding
+\texttt{ts1}\textit{family}\texttt{.fd} file, because otherwise the
+default subencoding is assumed, which is probably disabling too many
+glyphs that are actually available in the font.\footnote{The \LaTeX{}
+  format contains declarations for many font families already, but this
+  is really the wrong place for the declarations. Thus for new fonts
+  they should be placed into the corresponding \texttt{.fd} file.}
 
 
 \section{If you need to know more \ldots}
diff --git a/base/doc/ltnews36.tex b/base/doc/ltnews36.tex
index bd24cffb..bcd356f4 100644
--- a/base/doc/ltnews36.tex
+++ b/base/doc/ltnews36.tex
@@ -145,6 +145,32 @@
 
 \emph{to be written}
 
+
+\subsection{Encoding subsets for \texttt{TS1} encoded fonts}
+
+The text companion encoding \texttt{TS1} is unfortunately not very
+faithfully supported in fonts that are not close cousins to the
+Computer Modern fonts. It was therefore necessary to provide the
+notion of \enquote{sub-encodings} on a per font basis. These
+sub-encodings are declared for a font family with the help of a
+\cs{DeclareEncodingSubset} declaration, see \cite{36:fntguide} for
+details.
+
+Maintainers of font bundles that include \texttt{TS1} encoded font
+files should add an appropriate declaration into the corresponding
+\texttt{ts1}\textit{family}\texttt{.fd} file, because otherwise the
+default subencoding is assumed, which is probably disabling too many
+glyphs that are actually available in the font.\footnote{The \LaTeX{}
+  format contains declarations for many font families already.  This
+  was done in 2020 to quickstart the use of the symbols in the kernel,
+  but it is really the wrong place for such declarations. Thus, for
+  new fonts the declarations should be placed into the corresponding
+  \texttt{.fd} files.}
+%
+\githubissue{905}
+
+
+
 \section{New or improved commands}
 
 
@@ -183,11 +209,17 @@ font instead.
 
 \subsection{\LuaTeX\ callback efficiency improvement}
 
-The mechanism for providing the \texttt{pre/post\_mlist\_to\_hlist\_filter} callbacks in \LuaTeX\ has been improved to make it more reusable and to avoid overhead if these callbacks are not used.
+The mechanism for providing the
+\texttt{pre/post\_mlist\_to\_hlist\_filter} callbacks in \LuaTeX\ has
+been improved to make it more reusable and to avoid overhead if these
+callbacks are not used.
 %
 \githubissue{830}
 
 
+
+
+
 \section{Bug fixes}
 
 
@@ -240,7 +272,11 @@ is now properly guarded for.
 \bibitem{36:ltnews35} \LaTeX{} Project Team:
   \emph{\LaTeXe{} news 35}.\\
   \url{https://latex-project.org/news/latex2e-news/ltnews35.pdf}
-%
+
+\bibitem{36:fntguide} \LaTeX{} Project Team:
+  \emph{\LaTeXe{} font selection}.\\
+  \url{https://latex-project.org/help/documentation/}
+
 %\bibitem{36:ltfilehook-doc} Frank Mittelbach, Phelype Oleinik, \LaTeX{}~Project~Team:
 %  \emph{The \texttt{\upshape ltfilehook} documentation}.\\
 %  Run \texttt{texdoc} \texttt{ltfilehook-doc} to view.
diff --git a/base/lttextcomp.dtx b/base/lttextcomp.dtx
index de6b221b..8f5ec0d2 100644
--- a/base/lttextcomp.dtx
+++ b/base/lttextcomp.dtx
@@ -37,7 +37,7 @@
 %
 %
 \ProvidesFile{lttextcomp.dtx}
-             [2021/12/09 v1.0f LaTeX Kernel (text companion symbols)]
+             [2022/08/07 v1.0g LaTeX Kernel (text companion symbols)]
 % \iffalse
 \documentclass{ltxdoc}
 \begin{document}
@@ -226,7 +226,13 @@
    \@ifundefined{#1:#2}%
      {\@font at info{Setting #2 sub-encoding to #1/#3}}%
      {\@font at info{Changing #2 sub-encoding to #1/#3}}%
-     \@namedef{#1:#2}{#3}}
+%    \end{macrocode}
+%    This declaration should be usable in \texttt{.fd} files and
+%    therefore has to make its definition globally, because such files
+%    can get loaded in random places.
+% \changes{v1.0g}{2022/08/07}{Make  global declaration (gh/905)}
+%    \begin{macrocode}
+     \global\@namedef{#1:#2}{#3}}
 %    \end{macrocode}
 %
 %    Any reason to allow those in the middle of documents?





More information about the latex3-commits mailing list.