4

I would like to have

  • Calibri for text, and
  • CM Bright for math.

Is this possible?

My own attempt was to override the CM Bright text font using fontspec with the no-math option. However this does not work. Does anybody have an idea?

\documentclass{article}
\usepackage{cmbright}
\usepackage[no-math]{fontspec}
\setmainfont{Calibri}
\begin{document}
Test $test\int\xi$
\end{document}

[This is Windows. For Linux include the fonts in the directory and use \setmainfont[BoldItalicFont=calibriz.ttf, BoldFont=calibrib.ttf, ItalicFont=calibrii.ttf]{calibri.ttf}]

1

The cmbright package wrongly does \normalfont at the end.

\documentclass{article}

% fix the error in cmbright.sty that executes \normalfont
\let\latexnormalfont\normalfont
\let\normalfont\relax
% load cmbright
\usepackage{cmbright}
% restore the meaning of \normalfont
\let\normalfont\latexnormalfont

% restore the standard fonts for text
\renewcommand{\familydefault}{\rmdefault}
\renewcommand{\sfdefault}{cmr}
\renewcommand{\ttdefault}{cmtt}

\usepackage[no-math]{fontspec}

\setmainfont{Futura} % I don't have Calibri

\begin{document}

Test $test\int\xi$

\end{document}

enter image description here

1

The following seems to work:

\usepackage{cmbright}
\usepackage{fontspec}
\setmainfont{Calibri}
\renewcommand{\familydefault}{\rmdefault}

However, I am still not sure why and if this is the correct way (does this work for all types of fonts?).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.