mtheme icon indicating copy to clipboard operation
mtheme copied to clipboard

Fira Sans as math font

Open twsh opened this issue 7 years ago • 10 comments

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.

twsh avatar Dec 10 '17 00:12 twsh

Is Fira Sans a Math font?

ArchangeGabriel avatar Dec 10 '17 17:12 ArchangeGabriel

@ArchangeGabriel It's on the list here: http://www.tug.dk/FontCatalogue/mathfonts.html

Is there something specific that I would need to check?

twsh avatar Dec 10 '17 18:12 twsh

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.

ArchangeGabriel avatar Dec 10 '17 18:12 ArchangeGabriel

@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.

louisstuart96 avatar Dec 20 '17 03:12 louisstuart96

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.

stone-zeng avatar Mar 14 '18 16:03 stone-zeng

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.

matze avatar Mar 29 '18 08:03 matze

@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={}

jakobmoss avatar Jun 20 '18 13:06 jakobmoss

Note that @Stone-Zeng is already at 0.2.2 release. ;)

ArchangeGabriel avatar Jun 28 '18 10:06 ArchangeGabriel

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 …

matze avatar Jul 16 '18 13:07 matze

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.

Ordoviz avatar Oct 25 '20 11:10 Ordoviz