7

What is the math font of unicode-math that can get the following output:

enter image description here

since the following:

\documentclass{article}
\usepackage{unicode-math}
\begin{document}
$\symbb{R}$
\end{document}

results in

enter image description here

Diaa
  • 9,599
  • duplicate of this, I think https://tex.stackexchange.com/questions/60014/traditional-german-sans-serif-and-serif-blackboard-bold-symbols/506634#506634 – David Carlisle Sep 09 '19 at 21:51
  • 2
    @DavidCarlisle The fonts there have results close to what I need but not identical. I would be happier if I could know how to get exactly the same style :) – Diaa Sep 09 '19 at 22:08
  • 3
    The style you are looking for is provided by amsfonts, accessed by \mathbb{R}. – barbara beeton Sep 10 '19 at 01:00
  • I guess the closest match could be from mtpro2 but it is to be compiled with pdflatex. \documentclass[border=1mm]{standalone} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[lite,amsbb]{mtpro2} \begin{document}\Huge $\mathbb{R}$ \end{document} – BambOo Sep 10 '19 at 14:06
  • @barbarabeeton I am away to experiment, but can amsfonts be loaded along with unicode-math and compiled by lualatex? – Diaa Sep 10 '19 at 15:16
  • 1
    Unfortunately, I'm unable to experiment, and haven't tried this before. But this answer (using XeTeX) should provide useful guidance: Unicode-math and \Re – barbara beeton Sep 10 '19 at 16:11

2 Answers2

5

Mplus gets close:

Mplus

Note: Barbara is right. amsfonts

\documentclass{article}
%\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{unicode-math}
\begin{document}
{\Huge $\mathbb{R}$}
\end{document}

So the answer would be: either a truetype/opentype version of amsfonts, or unicode-math can still use legacy fonts, if desired.

unicode-math access is by $\symbb{R}$.

=============

Original post:

I've seen that one before.

A sort of sans libertine/helvetica flavour.

Some random samples, none with a straight leg:

a to l

\documentclass[12pt]{article}
\usepackage{fontspec}
\usepackage{xcolor}
\pagecolor{red!3}


\newcommand\SampleText{\symbol{"211D}}


\newfontface\fra{Arial Unicode MS}
\newfontface\frb{Cambria Math}
\newfontface\frc{DejaVu Math}
\newfontface\frd{DejaVu Math TeX Gyre}
\newfontface\fre{DejaVu Sans}
\newfontface\frf{DejaVu Sans Mono}
\newfontface\frg{DejaVu Serif}
\newfontface\frh{Fira Math}
\newfontface\fri{FreeSans}
\newfontface\frj{FreeSerif}
\newfontface\frk{FreeSerifAvvaShenouda}
\newfontface\frl{GFS Neohellenic Math}
\newfontface\frm{Honoka Antique-Kaku}
\newfontface\frn{Honoka Antique-Maru}
\newfontface\fro{HPMLinux Biolinum O}
\newfontface\frp{HPMLinux Libertine O}
\newfontface\frq{Kabala}
\newfontface\frr{Libertinus Math}
\newfontface\frs{Libertinus Mono}
\newfontface\frt{Libertinus Sans}
\newfontface\fru{Libertinus Serif}
\newfontface\frv{Libertinus Serif Display}
\newfontface\frw{Linux Biolinum}
\newfontface\frx{Linux Biolinum G}
\newfontface\fry{Linux Biolinum O}
\newfontface\frz{Lucida Sans Unicode}

\newcommand\printther[2]{{#1\huge    \SampleText} -- #2}


\begin{document}


\printther{\fra}{Arial Unicode MS}

\printther{\frb}{Cambria Math}

\printther{\frc}{DejaVu Math}

\printther{\frd}{DejaVu Math TeX Gyre}

\printther{\fre}{DejaVu Sans}

\printther{\frf}{DejaVu Sans Mono}

\printther{\frg}{DejaVu Serif}

\printther{\frh}{Fira Math}

\printther{\fri}{FreeSans}

\printther{\frj}{FreeSerif}

\printther{\frk}{FreeSerifAvvaShenouda}

\printther{\frl}{GFS Neohellenic Math}

\printther{\frm}{Honoka Antique-Kaku}

\printther{\frn}{Honoka Antique-Maru}

\printther{\fro}{HPMLinux Biolinum O}

\printther{\frp}{HPMLinux Libertine O}

\printther{\frq}{Kabala}

\printther{\frr}{Libertinus Math}

\printther{\frs}{Libertinus Mono}

%\printther{\frt}{Libertinus Sans}
%
%\printther{\fru}{Libertinus Serif}
%
%\printther{\frv}{Libertinus Serif Display}
%
%\printther{\frw}{Linux Biolinum}
%
%\printther{\frx}{Linux Biolinum G}
%
%\printther{\fry}{Linux Biolinum O}

\printther{\frz}{Lucida Sans Unicode}

{\fra \SampleText}
{\frb \SampleText}
{\frc \SampleText}
{\frd \SampleText}
{\fre \SampleText}
{\frf \SampleText}
{\frg \SampleText}
{\frh \SampleText}
{\fri \SampleText}
{\frj \SampleText}
{\frk \SampleText}
{\frl \SampleText}
{\frm \SampleText}
{\frn \SampleText}
{\fro \SampleText}
{\frp \SampleText}
{\frq \SampleText}
{\frr \SampleText}
{\frs \SampleText}
{\frt \SampleText}
{\fru \SampleText}
{\frv \SampleText}
{\frw \SampleText}
{\frx \SampleText}
{\fry \SampleText}
{\frz \SampleText}


\end{document}

====

For completeness, a fuller gallery, in parts, more systematically arranged.

(1) These are (some of) the ones with "Math" in the font name:

mathr

And then in order of decreasing coverage of the Letterlike Symbols unicode block:

(2)

r2

(3)

r3

(4)

r4

(5)

r5

(6)

r6

And arbitrarily stop there, with a coverage of 20 out of 80 glyphs in the block.

There is obviously something very interesting going on with fonts.

Cicada
  • 10,129
4

Cambria Math uses a nearly-identical glyph. Ironically, you’d need to pay money for this copyrighted font, even though the reason you want it is that they ripped off someone else’s design. (It’s owned by Microsoft and included with Windows and Office. If you dual-boot Linux, you could make a symbolic link from the font file on your Windows partition to ~/.fonts or /usr/local/share/fonts. You could also buy the font from Monotype.)

You can select math alphabets or individual glyphs from the font of your choice with the range= option of \setmathfont. For example:

\documentclass{article}
\usepackage{unicode-math}

\setmathfont{Latin Modern Math}
\setmathfont{TeX Gyre Pagella Math}[range={bb,bbit}, Scale=MatchUppercase]

\begin{document}
\[ \mathbb{CDHNRQSZ} \]
\end{document}

TeX Gyre Pagella Math Sample

Or with the font changed to:

\setmathfont{TeX Gyre DejaVu Math}[range={bb,bbit}, Scale=MatchUppercase]

TeX Gyre DejaVu Math sample

You can change only the ℝ with

\setmathfont[range=`ℝ]

or

\setmathfont[range=\BbbR]
Davislor
  • 44,045
  • How can I write a single instance of the uppercase R for once (on the go) in a font other than the main math font without having to write \setmathfont[range=\BbbR] in the preamble since I don't need a permanent change? For example, if I have \setmathfont{TeX Gyre DejaVu Math}[range={bb,bbit}, Scale=MatchUppercase] in the preamble, how can I type R in Cambria Math for once inside some equation? – Diaa Jun 08 '20 at 01:48
  • 1
    Declare it as a new math alphabet with \setmathfontface, e.g. \setmathfontface\varbb{Some Font}. Then use either \varbb{R} or \varbb{\BbbR}, depending on whether you want to use the font’s R or ℝ. – Davislor Jun 08 '20 at 01:55
  • For the following, \documentclass{article} \usepackage{unicode-math} \setmathfont{Latin Modern Math} \setmathfontface\varbb{Cambria Math} \begin{document} $\symbb{R}~\varbb{\BbbR}~\symbb{\varbb{R}}$ \end{document}, why is the third one different from the second? Is it because \symbb doesn't allow nesting? – Diaa Jun 08 '20 at 02:02
  • 1
    Math alphabets don’t nest. It’s like how you write \mathbfcal instead of \mathbf{\mathcal{...}} – Davislor Jun 08 '20 at 02:07
  • Thanks for the explanation. One more question please, how to edit your suggestion to accept only the letter R from my keyboard and get the output of its double-struck in, for example, Cambria Math? – Diaa Jun 08 '20 at 02:11
  • To use the ℝ from a math font instead of the R from a decorative font, you can type in any of the following: , \BbbR, or ^^^^211d. – Davislor Jun 08 '20 at 02:12
  • \setmathfont[range=\BbbR, Scale=MatchUppercase]{Cambria Math}. – Davislor Jun 08 '20 at 02:14
  • If you want the output of \symbb{R} to be different from ℝ, which I do not recommend, you can do this by setting \varbb as above, loading newunicodechar, and setting ℝ active with \newunicodechar{ℝ}{\varbb{ℝ}}. – Davislor Jun 08 '20 at 02:16
  • \setmathfont[range=\BbbR, Scale=MatchUppercase]{Cambria Math} permanently sets \BbbR to be in Cambria, however, I don't look for commitment :); I just need a way to change the font of \BbbR on the fly inside the equation for once. – Diaa Jun 08 '20 at 02:28