TransWikia.com

Problems with italics in other font when using roboto condensed

TeX - LaTeX Asked by ziwikain on February 26, 2021

I just realized that all italics are missing in the main text of my book manuscript (using textit{}).

I narrowed the problem down to the use of Roboto Condensed as font.

documentclass{scrbook} 

usepackage[utf8]{inputenc}usepackage[T1]{fontenc} 
usepackage{fbb}           
%If I unclude the next line, the “text” will no longer be in italiscs
%usepackage[condensed]{roboto} 

begin{document}

Test textit{text}.

end{document}

When I uncomment the Roboto line (or just delete “condensed”) “text” will not be in italic any longer.

I had a look at older versions and recompiled one from mid 2019 when italics were still in it. After recompiling the italics are gone there, too. I reckon it has something to do with changes in TeX Live 2019. Any ideas how to approach the problem?

If it helps, here the part of the log, where the problems occure when roboto condensed is used:

(/usr/local/texlive/2020/texmf-dist/tex/latex/fbb/T1fbb-TLF.fd)

LaTeX Font Warning: Font shape `T1/fbb-TLF/c/n' undefined
(Font)              using `T1/fbb-TLF/m/n' instead on input line 112.

)) (/usr/local/texlive/2020/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def
) (./Test.aux) (/usr/local/texlive/2020/texmf-dist/tex/latex/ly1/ly1ptm.fd)

LaTeX Font Warning: Font shape `T1/fbb-TLF/c/it' undefined
(Font)              using `T1/fbb-TLF/c/n' instead on input line 10.


LaTeX Font Warning: Font shape `T1/fbb-TLF/c/sl' undefined
(Font)              using `T1/fbb-TLF/c/it' instead on input line 12.

[1{/usr/local/texlive/2020/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]
(./Test.aux)

LaTeX Font Warning: Some font shapes were not available, defaults substituted.

2 Answers

For unknown reasons, roboto.sty redefines mddefault to be mddefault@sf which, with the condensed option is c.

Since fbb doesn't provide the condensed series, you get font substitution.

Here's a fix that also avoids spurious warnings.

documentclass{scrbook}

usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}

DeclareFontShape{T1}{cmr}{c}{n}{<->ssub*cmr/m/n}{} % avoid a spurious warning

% first roboto to avoid other spurious warnings
usepackage[condensed]{roboto}

usepackage{fbb}

% fix the bad declaration made by roboto
renewcommand{seriesdefault}{m}

begin{document}


Test textit{text}.

textsf{Condensed}

end{document}

enter image description here

Correct answer by egreg on February 26, 2021

roboto forces the series default to condensed — imho a odd choice, if roboto is used only for sans serif —, but fbb doesn't support this series.

documentclass{scrbook}

%usepackage[utf8]{inputenc} % unneeded in new systems
usepackage[T1]{fontenc}
usepackage{fbb}
usepackage[condensed]{roboto}

makeatletter
renewcommandseriesdefault{mddefault@empty}
makeatother
begin{document}

Test textit{text} sffamily Text textit{text}

end{document}

enter image description here

Answered by Ulrike Fischer on February 26, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP