Skip to content

Commit

Permalink
adjust fd file for issue #879
Browse files Browse the repository at this point in the history
  • Loading branch information
davidcarlisle committed Jul 10, 2022
1 parent 735a547 commit d47f159
Show file tree
Hide file tree
Showing 5 changed files with 251 additions and 10 deletions.
4 changes: 4 additions & 0 deletions base/changes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ completeness or accuracy and it contains some references to files that
are not part of the distribution.
================================================================================

2022-07-10 David Carlisle <David.Carlisle@latex-project.org>

* cmfonts.fdd: avoid EC ss fonts at small design sizes. Scale 8pt font. gh/879

2022-06-22 David Carlisle <David.Carlisle@latex-project.org>

* ltkeys.dtx:
Expand Down
35 changes: 25 additions & 10 deletions base/cmfonts.fdd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
% Copyright 1993-2019
% Copyright 1993-2022
% The LaTeX Project and any individual authors listed elsewhere
% in this file.
%
Expand Down Expand Up @@ -67,7 +67,7 @@
%<*driver, >
\ProvidesFile{cmfonts.drv}
%</driver, >
[2019/12/16 v2.5j Standard LaTeX font definitions]
[2022/07/10 v2.5k Standard LaTeX font definitions]
%
%<*driver>
\documentclass{ltxdoc}
Expand Down Expand Up @@ -261,13 +261,13 @@
% (thanks to Christian Cornelssen)}
% \begin{macrocode}
%<*new|ec>
%<*!tt>
%<*!tt&!T1cmss>
\providecommand{\EC@family}[5]{%
\DeclareFontShape{#1}{#2}{#3}{#4}%
{<5><6><7><8><9><10><10.95><12><14.4>%
%<ec> <17.28><20.74><24.88><29.86><35.83>genb*#5}{}}
%<!ec> <17.28><20.74><24.88>genb*#5}{}}
%</!tt>
%</!tt&!T1cmss>
% \end{macrocode}
% For monospaced fonts, the normal interpolation breaks down below
% 8pt, so scale the 8pt fonts instead.
Expand All @@ -282,6 +282,21 @@
%<ec> <35.83>genb*#5}{}}
%<!ec> <9><10><10.95><12><14.4><17.28><20.74><24.88>genb*#5}{}}
%</tt>
% \end{macrocode}
% \changes{v2.5fk}{2022/07/10}%
% {Avoid ec ss fonts at design size 5, 6, 7. gh/879}
% For ec cmss fonts avoid the small design sizes which have incorrect
% definitions.
% (Medium weight bolder and wider than bold extended for 5pt and 6pt,
% 7pt does not have expected contrast. Scale 8pt, matching |fix-cm|).
% gh/879
% \begin{macrocode}
%<*T1cmss>
\providecommand{\EC@ssfamily}[5]{%
\DeclareFontShape{#1}{#2}{#3}{#4}%
{<5><6><7><8>#50800%
<9><10><10.95><12><14.4><17.28><20.74><24.88><29.86><35.83>genb*#5}{}}
%</T1cmss>
%</new|ec>
% \end{macrocode}
%
Expand Down Expand Up @@ -489,12 +504,12 @@
% {EC fonts}
% \begin{macrocode}
%<*ec>
\EC@family{T1}{cmss}{m}{n}{ecss}
\EC@family{T1}{cmss}{m}{sl}{ecsi}
\EC@family{T1}{cmss}{m}{it}{ecsi}
\EC@family{T1}{cmss}{bx}{n}{ecsx}
\EC@family{T1}{cmss}{bx}{it}{ecso}
\EC@family{T1}{cmss}{bx}{sl}{ecso}
\EC@ssfamily{T1}{cmss}{m}{n}{ecss}
\EC@ssfamily{T1}{cmss}{m}{sl}{ecsi}
\EC@ssfamily{T1}{cmss}{m}{it}{ecsi}
\EC@ssfamily{T1}{cmss}{bx}{n}{ecsx}
\EC@ssfamily{T1}{cmss}{bx}{it}{ecso}
\EC@ssfamily{T1}{cmss}{bx}{sl}{ecso}
%</ec>
% \end{macrocode}
% The next substitution is very questionable.
Expand Down
152 changes: 152 additions & 0 deletions base/doc/ltnews36.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
% \iffalse meta-comment
%
% Copyright 2021-2022
% The LaTeX Project and any individual authors listed elsewhere
% in this file.
%
% This file is part of the LaTeX base system.
% -——————————————
%
% It may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3c
% of this license or (at your option) any later version.
% The latest version of this license is in
% https://www.latex-project.org/lppl.txt
% and version 1.3c or later is part of all distributions of LaTeX
% version 2008 or later.
%
% This file has the LPPL maintenance status "maintained".
%
% The list of all files belonging to the LaTeX base distribution is
% given in the file `manifest.txt'. See also `legal.txt' for additional
% information.
%
% The list of derived (unpacked) files belonging to the distribution
% and covered by LPPL is defined by the unpacking scripts (with
% extension .ins) which are part of the distribution.
%
% \fi
% Filename: ltnews35.tex
%
% This is issue 35 of LaTeX News.

\NeedsTeXFormat{LaTeX2e}[2020-02-02]

\documentclass{ltnews}

%% Maybe needed only for Chris' inadequate system:
\providecommand\Dash {\unskip \textemdash}

%% NOTE: Chris' preferred hyphens!
%%\showhyphens{parameters}
%% \hyphenation{because parameters parameter}

\usepackage[T1]{fontenc}

\usepackage{lmodern,url,hologo}

\usepackage{csquotes}
\usepackage{multicol}
\usepackage{color}

\providecommand\hook[1]{\texttt{#1}}

\providecommand\meta[1]{$\langle$\textrm{\itshape#1}$\rangle$}
\providecommand\option[1]{\texttt{#1}}
\providecommand\env[1]{\texttt{#1}}
\providecommand\Arg[1]{\texttt\{\meta{#1}\texttt\}}


\providecommand\eTeX{\hologo{eTeX}}
\providecommand\XeTeX{\hologo{XeTeX}}
\providecommand\LuaTeX{\hologo{LuaTeX}}
\providecommand\pdfTeX{\hologo{pdfTeX}}
\providecommand\MiKTeX{\hologo{MiKTeX}}
\providecommand\CTAN{\textsc{ctan}}
\providecommand\TL{\TeX\,Live}
\providecommand\githubissue[2][]{\ifhmode\unskip\fi
\quad\penalty500\strut\nobreak\hfill
\mbox{\small\slshape(%
\href{https://github.com/latex3/latex2e/issues/\getfirstgithubissue#2 \relax}%
{github issue#1 #2}%
)}%
\par\smallskip}
%% But Chris has to mostly disable \href for his TEXPAD app:
%% \def\href #1{} % Only For Chris' deficient TeX engine

% simple solution right now (just link to the first issue if there are more)
\def\getfirstgithubissue#1 #2\relax{#1}

\providecommand\sxissue[1]{\ifhmode\unskip
\else
% githubissue preceding
\vskip-\smallskipamount
\vskip-\parskip
\fi
\quad\penalty500\strut\nobreak\hfill
\mbox{\small\slshape(\url{https://tex.stackexchange.com/#1})}\par}

\providecommand\gnatsissue[2]{\ifhmode\unskip\fi
\quad\penalty500\strut\nobreak\hfill
\mbox{\small\slshape(%
\href{https://www.latex-project.org/cgi-bin/ltxbugs2html?pr=#1\%2F\getfirstgithubissue#2 \relax}%
{gnats issue #1/#2}%
)}%
\par}

\let\cls\pkg
\providecommand\env[1]{\texttt{#1}}
\providecommand\acro[1]{\textsc{#1}}

\vbadness=1400 % accept slightly empty columns


\makeatletter
% maybe not the greatest design but normally we wouldn't have subsubsections
\renewcommand{\subsubsection}{%
\@startsection {subsubsection}{2}{0pt}{1.5ex \@plus 1ex \@minus .2ex}%
{-1em}{\@subheadingfont\colonize}%
}
\providecommand\colonize[1]{#1:}
\makeatother

\let\finalvspace\vspace % for document layout fixes

% Undo ltnews's \verbatim@font with active < and >
\makeatletter
\def\verbatim@font{%
\normalsize\ttfamily}
\makeatletter

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\providecommand\tubcommand[1]{}
\tubcommand{\input{tubltmac}}

\publicationmonth{November}
\publicationyear{2022}

\publicationissue{36}

\begin{document}

\tubcommand{\addtolength\textheight{4.2pc}} % only for TUB

\maketitle
{\hyphenpenalty=10000 \exhyphenpenalty=10000 \spaceskip=3.33pt \hbadness=10000
\tableofcontents}

\setlength\rightskip{0pt plus 3em}




\subsection{EC sans serif at small sizes}
The EC (T1 encoded Computer Modern) fonts have errors at small sizes.
(The medium weight is bolder ad wider than the bold extended)
The default \texttt{.fd} fil has been adjusted to use a scaled 8pt font.
%
\githubissue{879}



\end{document}
38 changes: 38 additions & 0 deletions base/testfiles/github-0879.lvt
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@

\documentclass{article}

\input{test2e}

% testfor gh/879; bold extended should be wider than medium

\def\TEST#1#2#3{%
\sbox0{\fontsize{#3}{#3}\usefont{T1}{cmss}{m}{#1}%
One TWO three FOUR five}%
\sbox2{\fontsize{#3}{#3}\usefont{T1}{cmss}{#2}{#1}%
One TWO three FOUR five}%
%\par\usebox{0}: #1 m #3
%\par\usebox{2}: #1 #2 #3
\typeout{#1/#2/#3:\ifnum#3<10 \space\fi m\ifdim\wd0>\wd2 >\else<=\fi#2}}

\def\TTEST#1#2{%
\TEST{#1}{#2}{12}
\TEST{#1}{#2}{10}
\TEST{#1}{#2}{9}
\TEST{#1}{#2}{8}
\TEST{#1}{#2}{7}
\TEST{#1}{#2}{6}
\TEST{#1}{#2}{5}
}

\begin{document}

\START

\TTEST{n}{bx}
\TTEST{sl}{bx}
\TTEST{it}{bx}

\TTEST{n}{sbc}


\end{document}
32 changes: 32 additions & 0 deletions base/testfiles/github-0879.tlg
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
This is a generated file for the LaTeX2e validation system.
Don't change this file in any respect.
LaTeX Font Info: Trying to load font information for T1+cmss on input line ....
n/bx/12:m<=bx
n/bx/10:m<=bx
n/bx/9: m<=bx
n/bx/8: m<=bx
n/bx/7: m<=bx
n/bx/6: m<=bx
n/bx/5: m<=bx
sl/bx/12:m<=bx
sl/bx/10:m<=bx
sl/bx/9: m<=bx
sl/bx/8: m<=bx
sl/bx/7: m<=bx
sl/bx/6: m<=bx
sl/bx/5: m<=bx
it/bx/12:m<=bx
it/bx/10:m<=bx
it/bx/9: m<=bx
it/bx/8: m<=bx
it/bx/7: m<=bx
it/bx/6: m<=bx
it/bx/5: m<=bx
n/sbc/12:m>sbc
n/sbc/10:m>sbc
n/sbc/9: m>sbc
n/sbc/8: m>sbc
n/sbc/7: m>sbc
n/sbc/6: m>sbc
n/sbc/5: m>sbc
(github-0879.aux)

0 comments on commit d47f159

Please sign in to comment.