[Tex/LaTex] Computer Modern Bright font and blackboard bold symbols

blackboard;fontssans-serif

I am trying to match the sans serif math font provided by cmbright with proper blackboard bold symbols (also sans serif). I found that the fourier and stix (xits?) fonts provide such symbols. But how can I use cmbright and import only the blackboard bold symbols in LuaLaTeX/XeLaTeX?

Best Answer

Getting the definition of the font from fourier is easy; with a little trial and error one can also get the right magnification factor.

\documentclass{article}
\usepackage{cmbright}

%%% taken from fourier.sty
\DeclareFontFamily{U}{futm}{}
\DeclareFontShape{U}{futm}{m}{n}{
  <-> s * [.97534] fourier-bb % but changing the magnification factor
  }{}
\DeclareMathAlphabet{\mathbb}{U}{futm}{m}{n}

\begin{document}
$-3\in\mathbb{Z}\subseteq\mathbb{Q}\ne Q$

\texttt{\sbox0{$Q$}\the\ht0}

\texttt{\sbox0{$\mathbb{Q}$}\the\ht0}

\end{document}

The last two lines show that the heights match (up to 0.00001pt).

enter image description here

For the STIX fonts the procedure is similar.

\documentclass{article}
\usepackage{cmbright}

%% taken from the STIX font distribution
\DeclareFontEncoding{LS1}{}{}
\DeclareFontSubstitution{LS1}{stix}{m}{n}
\DeclareFontFamily{LS1}{stixbb}{\skewchar\font127 }
\DeclareFontShape{LS1}{stixbb}{m}{n} {<-> s*[1.032631] stix-mathbb}{}
\DeclareFontShape{LS1}{stixbb}{b}{n} {<-> s*[1.032631] stix-mathbb-bold}{}
\DeclareMathAlphabet{\mathbb}{LS1}{stixbb}{m}{n}
\SetMathAlphabet{\mathbb}{bold}{LS1}{stixbb}{b}{n}

\begin{document}
$-3\in\mathbb{Z}\subseteq\mathbb{Q}\ne Q$

\texttt{\sbox0{$Q$}\the\ht0}

\texttt{\sbox0{$\mathbb{Q}$}\the\ht0}

\end{document}

enter image description here