[Tex/LaTex] Problem with the \mathbf command

beamerboldfontsformattingmath-mode

In this MWE, I want to obtain bold letter for the letter "H" (compare the two "H") :

\documentclass[10 pt]{beamer}
\usetheme{default}
\usepackage{lmodern} % load a font with all the characters
\usepackage{fontspec}
\usepackage{cmbright}
\SetSymbolFont{largesymbols}{normal}{OMX}{iwona}{m}{n}
\usepackage{amsmath}%loads amsmath that should go before unicode-math
\usefonttheme{professionalfonts}
\defaultfontfeatures{Mapping=tex-text}  % This seems to be important for mapping glyphs properly

\begin{document}
\begin{frame}
\[
\mbox{First bold H : }\|x\|_{\mathbf{H}},\; \mbox{Second bold H : }\mathbf{H} 
\]
\end{frame}
\end{document}

but I don't know how doing it.
THe "H" produced by this MWE is tiny but no bold effect. If I use

\SetSymbolFont{largesymbols}{normal}{OMX}{iwona}{m}{n}

I obtain bold tiny "H" but the font used still not the same.

Best Answer

For sizes below 10pt the cmbright package is subsetting bold fonts (which don't exists) and uses the normal weight instead. You can change this by adding this code behind cmbright:

\usepackage{cmbright}
\fontencoding{OT1}\fontfamily{cmbr}\selectfont %to load ot1cmbr.fd
\DeclareFontShape{OT1}{cmbr}{bx}{n}{% change bx definition
<->cmbrbx10%
}{}
\normalfont % back to normalfont
Related Question