mtheme
mtheme copied to clipboard
Fira Sans as math font
Metropolis sets the main font to Fira Sans when it can. Should it also set the math font to Fira Sans? I think that that would be nicer if it's possible.
Is Fira Sans a Math font?
@ArchangeGabriel It's on the list here: http://www.tug.dk/FontCatalogue/mathfonts.html
Is there something specific that I would need to check?
So it’s not a real math font (i.e. supporting Unicode Maths —but they are very few of them), though it should be OK.
I haven’t tested non-Unicode Maths in a while, I should give it a try.
@twsh In the catalog, Fira Sans itself doesn't have math support. It's newtxsf
math font which is compatible with Fira Sans.
Default font settings in beamer
will use text fonts for 'pureletters'(A-Z,a-z) and 'numbers'(0-9), while other math symbols use CM font. Therefore, Fira Sans can be used in math formula, though in an uncomfortable way.
Non-Unicode math font packages are OK, along with beamer
's professionalfonts
font theme.
I'm now making a Unicode math font FiraMath based on Fira Sans and maybe you will be interested in it.
This font is still under developing, and if there are any problems, please tell me.
This font is still under developing, and if there are any problems, please tell me.
That's great! Please let us know when you have an official release ready.
@twsh, it is possible to force the use of a non-math font to typeset the math, as mentioned above (if you don't want to wait for the FiraMath release). I use the following in my preamble to obtain math with the Fira fonts:
\usefonttheme{professionalfonts}
\usepackage{unicode-math}
\setmainfont{Fira Sans Light} % Needs to be specified again!
\setmathfont{TeX Gyre Pagella Math}[Scale=MatchLowercase] % Just a default
\setmathfont{Fira Sans Light}[range={up/{num,latin,Latin,greek,Greek},%
\mathexclam,\mathplus,\pm,\div,\minus,\mathpercent,\mathampersand,%
\mathquestion,\mathatsign,\increment,\less,\equal,\greater,\ne,\leq,%
\geq,\matheth,\ell,\partial},%
Script=Latin,script-features={}, sscript-features={}]
\setmathfont{Fira Sans Light Italic}[range={it/{latin,Latin,greek,Greek}},%
Script=Latin, script-features={}, sscript-features={}
Note that @Stone-Zeng is already at 0.2.2 release. ;)
At the moment I would not add a hard dependency on FiraMath because it's not yet released on all major TeX distributions. However, we could add a section to the manual …
I use
\setsansfont[BoldFont={Fira Sans SemiBold}]{Fira Sans Book}
\usepackage[mathrm=sym]{unicode-math}
\setmathfont{Fira Math}
and compile with LuaLaTeX. The first line ensures that the sans and math font have the same weight. Fira Math Light is currently in Beta and not on CTAN yet.