2

I was using cmbright for my thesis, but it had some problems with characters like "é", "ã" and "ł". So I changed the main font to Roboto Light, but I still want to use CMU Bright as math font. But if I try to use both fonts, cmbright end up overlapping with Roboto as the main font.

How to setup to CMU Bright not overlap Roboto? Or even a suggestion of a math font similar to CMU Bright that does not overlap with Roboto?

MWE:

\documentclass[a4paper]{article}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage[sfdefault, light]{roboto}

\usepackage{cmbright}

\usepackage{amsmath,amssymb,amsthm,amsfonts}

\usepackage{lipsum}

\begin{document}

\lipsum[1]

\begin{equation*}
  \int_{0}^{\infty} \frac{1}{\cos( x ) x^{2} + x^{e^{x+1}}} dx.
\end{equation*}

\end{document}

2
  • Searching more, I find the following question. So, answering my question, you just need to load cmbright, redefine sfdefault and ttdefault, and then load roboto.
    – k130874
    Dec 28, 2023 at 2:17
  • If switching to OpenType fonts is a choice for you, have a look at NewComputerModern. It has a mesmerizing range of character-support.
    – Niranjan
    Dec 28, 2023 at 6:27

1 Answer 1

2

Change the loading order and redeclare the operator font to use Roboto. I'd also scale Roboto so as to match the height of CMBright.

\documentclass[a4paper]{article}
%\usepackage[utf8]{inputenc}% no longer needed
\usepackage[T1]{fontenc}
\usepackage{cmbright}
\usepackage[sfdefault,light,scale=0.8868]{roboto}
\usepackage{amsmath,amssymb,amsthm}

\usepackage{lipsum}
\AtBeginDocument{%
  \DeclareSymbolFont{operators}{OT1}{\familydefault}{l}{n}%
}

\begin{document}

\lipsum[1]

\begin{equation*}
  \int_{0}^{\infty} \frac{1}{\cos( x ) x^{2} + x^{e^{x+1}}} dx.
\end{equation*}

\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .