Closed zepinglee closed 4 years ago
Your syntax is wrong, you are only defining a regular font and make it bold. If you look in the log you will see a warning that bold is actually not defined:
LaTeX Font Warning: Font shape `TU/lmroman10-regular.otf(0)/b/n' undefined
(Font) using `TU/lmroman10-regular.otf(0)/m/n' instead on input lin
With
\documentclass{article}
\usepackage{fontspec}
\usepackage{graphics}
\setmainfont{lmroman10-regular.otf}[BoldFont={lmroman10-regular.otf},BoldFeatures={FakeBold=10}]
\begin{document}
\textbf{Fake bold}
\resizebox{.2cm}{!}{\rule{1cm}{1cm}}
Test
\end{document}
It works as expected for me.
Your syntax is wrong, you are only defining a regular font and make it bold. If you look in the log you will see a warning that bold is actually not defined:
LaTeX Font Warning: Font shape `TU/lmroman10-regular.otf(0)/b/n' undefined (Font) using `TU/lmroman10-regular.otf(0)/m/n' instead on input lin
With
\documentclass{article} \usepackage{fontspec} \usepackage{graphics} \setmainfont{lmroman10-regular.otf}[BoldFont={lmroman10-regular.otf},BoldFeatures={FakeBold=10}] \begin{document} \textbf{Fake bold} \resizebox{.2cm}{!}{\rule{1cm}{1cm}} Test \end{document}
It works as expected for me.
My mistake. Thanks!
There is AutoFakeBold
for this.
Description
The fake bold text followed by graphics (
\includegraphics
or\resizebox
) affects rest of the content.Check/indicate
Minimal example demonstrating the issue
Further details