4

Stemming from a very similar question I asked previously, I was surprised to see the following symbol from the bbm package is not being scaled correctly.

The offending symbol

enter image description here

MWE

Based on this solution.

\documentclass[border=10]{standalone}
\usepackage{lmodern,amsmath,amssymb,bbm,bm,physics,nicefrac,fixcmex}
\begin{document}
    {\fontsize{50}{62.500000}{\rmfamily 
            $\displaystyle\int_\mathbb{R}^{} \sqrt{\dfrac{x}{\sqrt{2\pi\sigma}} 
                \exp(-\dfrac{x^2}{2\sigma^2})}\mathbbm{1}_{\{x > 0\}} \dd{x} = 1 $}}
\end{document}

Possibly relevant

oliversm
  • 2,717

3 Answers3

5

The bbm package uses a font that's only available as bitmap. The related .fd file contains

\DeclareFontShape{U}{bbm}{m}{n}
   {  <5> <6> <7> <8> <9> <10> <12> gen * bbm
      <10.95> bbm10%
      <14.4>  bbm12%
      <17.28><20.74><24.88> bbm17}{}

and other similar parts. This means that the font is not available at sizes beyond 25pt (24.88pt, to be precise). Indeed, you get the warnings

LaTeX Font Warning: Font shape `U/bbm/m/n' in size <50> not available
(Font)              size <24.88> substituted on input line 6.

LaTeX Font Warning: Font shape `U/bbm/m/n' in size <34.99985> not available
(Font)              size <24.88> substituted on input line 6.

LaTeX Font Warning: Size substitutions with differences
(Font)              up to 25.12pt have occurred.

Solutions? Use a different font that's fully scalable, for instance STIX.

\documentclass[border=10]{standalone}
\usepackage{lmodern,amsmath,amssymb,bm,physics,nicefrac,fixcmex}

\DeclareFontEncoding{LS1}{}{}
\DeclareFontSubstitution{LS1}{stix}{m}{n}

\newcommand{\bbone}{\text{\usefont{LS1}{stixbb}{m}{n}1}}

\begin{document}
{\fontsize{50}{62.5}{\rmfamily 
$\displaystyle\int_\mathbb{R}^{} \sqrt{\dfrac{1}{\sqrt{2\pi\sigma}} 
\exp(-\dfrac{x^2}{2\sigma^2})}\bbone_{\{x>0\}} \dd{x} = 1 $}}
\end{document}

enter image description here

egreg
  • 1,121,712
0

You could draw it at the smaller size and scale it. With the two versions I show, the left uses this approach. The right uses the OP's original approach.

\documentclass[border=10]{standalone}
\usepackage{lmodern,amsmath,amssymb,bbm,bm,physics,nicefrac,fixcmex,scalerel}
\begin{document}
\rmfamily 
            \scaleto{\displaystyle\int_\mathbb{R}^{} \sqrt{\dfrac{x}{\sqrt{2\pi\sigma}} 
                \exp(-\dfrac{x^2}{2\sigma^2})}\mathbbm{1}_{\{x > 0\}} \dd{x} = 1 }{150pt}
    {\fontsize{50}{62.500000}\selectfont{\quad vs.\quad\rmfamily 
            $\displaystyle\int_\mathbb{R}^{} \sqrt{\dfrac{x}{\sqrt{2\pi\sigma}} 
                \exp(-\dfrac{x^2}{2\sigma^2})}\mathbbm{1}_{\{x > 0\}} \dd{x} = 1 $}}
\end{document}

enter image description here

  • This is inadvisable for a bitmap font. It would work for an outline font, but those wouldn’t have that problem. – Davislor Mar 21 '19 at 20:44
0

The symbol you want is in Unicode as 𝟙 (U+1D7D9), Mathematical Double-Struck Digit One. It is available in unicode-math as \Bbbone, \symbb{1} and \mathbb{1}, or you can copy or paste in the symbol. Any recent Unicode math font should contain it (although some older ones do not). Load your math font with the Scale= option and it will automatically scale to the correct height.

Davislor
  • 44,045