[Tex/LaTex] xelatex error: LaTeX Font Warning: Font shape

boldfontssmall-capsxetex

Thank you all in advance.
I know not much about fonts.
but once I compile my document I get:

    LaTeX Font Warning: Font shape `EU1/lmr/bx/sc' undefined
(Font)              using `EU1/lmr/bx/n' instead on input line 174.

I'm not sure how solve this issue, even though there are other similar posts here but the answers are all too advanced.

Best Answer

There's no "boldface small caps" font in the Latin Modern family, so LaTeX performs a substitution; in this case it preserves the "boldface" weight attribute and chooses the "normal" shape.

I don't think there's much to do in this case other than defining a different substitution, but medium weight small caps embedded in a boldface context is worse, I believe.

One can follow Andrey Vihrov's suggestion and write in the preamble

\makeatletter
\let\@@scshape=\scshape
\renewcommand{\scshape}{%
  \ifnum\strcmp{\f@series}{bx}=\z@
    \usefont{T1}{cmr}{bx}{sc}%
  \else
    \ifnum\strcmp{\f@shape}{it}=\z@
      \fontshape{scsl}\selectfont
    \else
      \@@scshape
    \fi
  \fi}
\makeatother

(I've slightly modified the code). However this uses a T1-encoded font, so only the characters in T1 are available.

If a "boldface small caps" font with a wide covering of Unicode is really needed, one should adopt a font family that has the required shape.