# Is it possible to replace the \mathbbm letters with less grainy ones?

Using the bbm package, one can generate letters that look like this:

\documentclass{report}
\usepackage{bbm}
\begin{document}
$\mathbbm{A}$
\end{document}


As you can see, this has a really low resolution and looks unpleasant at a certain font size. If I put this image into Adobe Illustrator and trace it, the result is a much clearer looking letter:

While this isn't perfect, it would be good enough for my purposes. So is there a way to manually replace bbm characters with adjusted ones? Or any other workaround that would enable utilizing the traced character instead of the character?

• the bbm fonts are only available as bitmap fonts as far as I know, can you not use a different double struck, such as amsfonts \mathbb or stix which are available as scalable fonts? – David Carlisle Jan 15 at 19:03
• As an alternative, you could use \mathbb{A} with the amssymb package. – Steven B. Segletes Jan 15 at 19:03

the bbm fonts are bitmap fonts generated by MetaFont. If other double struck fonts are suitable many are available in scalable formats eg \mathbb font from the AMS but if you really want \mathbb then

  .texlive2019/texmf-var/fonts/pk/ljfour/public/bbm/bbm10.600pk


That is a 600dp bitmap tweaked for an HP laserjet 4 printer (which you are probably not using:-)

If you modify the file to

\documentclass{report}
\usepackage{bbm}
\pdfpkresolution=1200
\begin{document}
$\mathbbm{A}$
\end{document}


The first time you run it metafont will fire up and make a higher resolution bitmap

 .texlive2019/texmf-var/fonts/pk/ultre/public/bbm/bbm10.1200pk


You can only choose resolutions that are in modes.mf

/usr/local/texlive/2019/texmf-dist/metafont/misc/modes.mf


so if you need really high resolution you may need to supply an additional mode definition.

• This gives great results at one resolution, but will be less than optimal when used in an environment that can be zoomed. – barbara beeton Jan 15 at 19:39
• @barbarabeeton depends on your pdf renderer if you have a high enough bitmap resolution then it should make a reasonable attempt at interpolating a reasonable range of zooms to the screen resolution. – David Carlisle Jan 15 at 19:46
• @barbarabeeton no different to the smooth A in the question which is a bitmap, and zooms OK in my browser – David Carlisle Jan 15 at 19:54
• Really a bitmap? I doubt it -- "If I put this image into Illustrator and trace it, the result is a much clearer looking letter:" Last I knew, Illustrator generated outlines. – barbara beeton Jan 15 at 20:06
• @Skydiver they are all related to all fonts, just pick the highest number you see (I originally guessed 2400 but there was no mode for that so it defaulted back to ljfour at 600) at high resolutions there is very little difference between the modes, really metafont modes are all about tweaking serifs and hairlines on low resolution printers – David Carlisle Jan 15 at 20:46

This is just to honorably mention the dsfont package.

\documentclass{article}
\usepackage{bbm}
\usepackage{dsfont}
\usepackage{amsfonts}
\begin{document}
\begin{tabular}{lll}
\verb|\usepackage{bbm}| & \verb|\mathbbm| & $\mathbbm{A}$ \\
\verb|\usepackage{dsfont}| & \verb|\mathds| & $\mathds{A}$ \\
\verb|\usepackage{amsfonts}| & \verb|\mathbb| & $\mathbb{A}$ \\
\end{tabular}
\end{document}


• but what if I really really really want /A not A\ – David Carlisle Jan 15 at 19:47
• @davidcarlisle \reflectbox will make you happy 😃 – Schrödinger's cat Jan 15 at 19:51
• @Schrödinger'scat as in the cat is alive and dead? reflecting a character is changing it few of them are symetrical :-) but I guess you have been joking – Frank Mittelbach Jan 22 at 8:37

You can load many different \mathbb alphabets using the mathalpha package, or if you can use LuaLaTeX or XeLaTeX, unicode-math. All are outline, rather than bitmap, fonts.

After loading the package and your fonts of choice, write \mathbb{A}.