latex2e
latex2e copied to clipboard
fontenc T1 with \tiny and \sffamily swaps bold <-> regular
Brief outline of the bug
Loading fontenc with option T1 swaps bold and regular fonts when using \tiny and \sffamily.
Here is what i have tested so far:
Any of the following changes restore the proper boldness
- using OT1 instead of T1
- changing the fontsize (tested up to \Large)
- removing \sffamily
- loading a different font (tested with lmodern)
Adding \itshape seems to have no influence on the boldness.
Minimal example showing the bug
\RequirePackage{latexbug}
\documentclass{article}
\usepackage[T1]{fontenc} %OT1: as expected, T1: bold and regular swapped when tiny
%\usepackage{lmodern} %problem is not present with lmodern
\begin{document}
\tiny\sffamily should be regular
\tiny\sffamily\bfseries should be bold
\end{document}
Log file (required) and possibly PDF file
that is odd, although it seems to be a issue with the fonts rather than latex
this plain tex example access the fonts directly
\font\fxa=ecss1000 at 10pt
\font\fxb=ecsx1000 at 10pt
\font\fva=ecss0500 at 10pt
\font\fvb=ecsx0500 at 10pt
{\fxa one two three}
{\fxb one two three}
{\fva one two three}
{\fvb one two three}
\bye
producing
Showing the 10pt design size fonts having the expected correspondence but the 5pt design size regular font is much wider than the 5pt sx version.
As a work around you could load \RequirePackage{fix-cm}
, it doesn't use this small sizes which are, as David showed, buggy. With it I then get
The fonts are actually wrong and we will fix it by not using the smallest (wrong sizes) but instead scale down.