latex3 / fontspec

Font selection in LaTeX for XeTeX and LuaTeX
http://latex3.github.io/fontspec/
LaTeX Project Public License v1.3c
277 stars 34 forks source link

AutoFakeSlant does not work when specifying BoldFont #443

Open yuishin-kikuchi opened 3 years ago

yuishin-kikuchi commented 3 years ago

Description

AutoFakeSlant does not work when specifying BoldFont. Problem occurs with both xelatex/lualatex.

Check/indicate

Minimal example demonstrating the issue

\documentclass{article}
\usepackage[no-math]{fontspec}
\setmainfont{Roboto}[
  UprightFont=*-Regular,
  BoldFont=*-Bold,
  AutoFakeSlant=0.5,
] % I know roboto family has italic and bold italic version.
\begin{document}
{The quick brown fox}\par
{\bfseries The quick brown fox}\par
{\itshape The quick brown fox}\par
{\bfseries\itshape The quick brown fox}\par % why not slanted?
\end{document}

Further details

The code:

\setmainfont{Roboto}[
  UprightFont=*-Regular,
  BoldFont=*-Bold,
  AutoFakeSlant=0.5,
  BoldItalicFeatures={
    Font=*-Bold,
    FakeSlant=0.5,
  }
]

works fine. But this is redundant.