Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Medium cmss substituted for bold: collateral damage or bug? (Not sure if expected or not) #1644

Open
cfr42 opened this issue Jan 28, 2025 · 2 comments

Comments

@cfr42
Copy link
Contributor

cfr42 commented Jan 28, 2025

If the current series is b and the default sans is neither cmss nor lmss, an attempt to switch to cmss causes medium to be substituted. Thereafter, all bold cmss uses the medium, unless bx is explicitly requested.

This happens because the font definition file ot1cmss.fd does not declare a substitution for b. While it never did, the current series is much more likely to be b for post-2020 LaTeX, while the series change rules do not apply (at the right point).

MWE

\RequirePackage{latexbug}
\documentclass{article}
% because latexbug complains about wiser choices
\usepackage{times}
\begin{document}
\makeatletter
{\bfseries\fontfamily{cmss}\selectfont\curr@fontshape\par}
{\fontfamily{cmss}\bfseries\selectfont\curr@fontshape\par}
\makeatother
\end{document}

Log file attached below, but I suppose 2 lines are sufficient:

LaTeX Font Warning: Font shape `OT1/cmss/b/n' undefined
(Font)              using `OT1/cmss/m/n' instead on input line 7.

Also applies to at least T1, TS1 and U.

Including suitable substitutions in ot1cmss.fd, t1cmss.fd, ts1cmss.fd and ucmss.fd would arguably be more backwards compatible than the status quo with pre-2020 LaTeX, as well as less confusing for users. But it would obviously be less backwards compatible with 2020-2024 LaTeX and perhaps have negative consequences besides.

Att.: prawf-2.log

Related: https://tex.stackexchange.com/q/735923/

@cfr42 cfr42 changed the title Collateral damage or bug (not sure if expected or not) Medium cmss substituted for bold: collateral damage or bug? (Not sure if expected or not) Jan 28, 2025
@cfr42
Copy link
Contributor Author

cfr42 commented Jan 28, 2025

Related: #277

@cfr42
Copy link
Contributor Author

cfr42 commented Jan 29, 2025

TL 2019 log for comparison:

log.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants