Skip to main content
Update about unadvertised Math capabilities of popular OpenType fonts, and questions about them.
Source Link

EDIT 7 years later (yes !)

It seems that some OpenType font have an "math" layout table, but do not (yet) advertize it. On my Debian system, the call

fc-list : family capability | grep otlayout | grep math | cut -d : -f 1 | sort | uniq | wc 

shows 26 fonts having an OpenType math layout. Among them, two are sans serif fonts not advertised as math fonts : FreeSans and DejaVu Sans. Furthermore, FreeSerif and DejaVu Serif also have an unadvertisd OpenType math layout. It is tempting to see if these fonts are indeed usable as math fonts.

Using a slight variation of the test case used previously :

\newcommand{\testmymath}[2]{ \setmainfont{#1} \setmathfont{#2} \textbf{(Quick) test of math typesetting of the #2 font.} \begin{itemize} \item Covariant derivative: \[ \nabla \symbf{X} = \tensor{X}{^\alpha_{;\beta}} \pdv{x^\alpha}% \otimes \dd{x^\beta} = \qty(\tensor{X}{^\alpha_{,\beta}} + \Gamma^{\alpha}_{\beta\gamma} \,% X^\gamma) \,\pdv{x^\alpha} \otimes \dd{x^\beta} \] \item Einstein's field equations: \[ G_{\mu\nu} \equiv R_{\mu\nu} - \frac{1}{2} R g_{\mu\nu} = \frac{8\pi G}{c^4} T_{\mu\nu} \] \item Schwarzschild metric: \[ c^2 \dd{\tau}^2 = \qty(1-\frac{r_{\mathrm{s}}}{r}) \, c^2 \ dd{t}^2 - \qty(1-\frac{r_{\mathrm{s}}}{r})^{-1} \dd{r}^2 - r^2 \underbrace{\qty(\dd{\theta}^2 + \sin^2 \theta \dd{\varphi}^2)}_{\dd{\Omega}^2} \] \item Einstein--Hilbert action: \[ S = \frac{1}{2\kappa} \int R \sqrt{-g} \dd[4]{x} \] \end{itemize} \clearpage } 

The results are as follows :

Reference : Latin Modern Math (along with Latin Modern Roman) :

Test of the "reference" fonts Latin Modern Roman

In this page, all seems correct. One notes that in the last expression, the integral sign has the "right" height.

FreeSans

Test of OpenType FreeSans as a math font

The results are mostly correct. However, one notes :

  • bad positioning of the lower part of the underbraced subexpression in the third expression ;

  • undersized integral sing in the last expression ;

  • the differentials in the third expression are rendered by serif 'd's.

DejaVu Sans

Test of the OpenType DejaVu Sans as a math font

This is quite incorrect: this font cannot be used this way.

Similar tests on the "serif" variants of these two fonts give parallel results : FreeSerif gives a "mostly correct" typeset page, whereas DejaVu Serif is unusable.

These results suggest that

  • LuaLaTeX uses variously-sized variants of the integral symbol which are unavailable in FreeSans, where they get replaced by a single, text-sized symbol ;

  • similarly, the misplacement of the underbrace and its corresponing parts suggest incorrect metrics.

Those results should incite the FreeXxx fonts developpers to develop this aspect of their work : it seems that they are almost there...

On the DejaVu front, it seems that GUST's declaration of intention to build a sans serif DejaVu math font has not (yet) been completed. FWIW, the same test led on the Tex Gyre Pagella / Tex Gyre Pagella Math gives good results.

Any further information on this subject will be welcomed. Similarly, I'd like to have an expert advice on my hypotheses about the reasons of FreeSans failures.

HTH,

EDIT 7 years later (yes !)

It seems that some OpenType font have an "math" layout table, but do not (yet) advertize it. On my Debian system, the call

fc-list : family capability | grep otlayout | grep math | cut -d : -f 1 | sort | uniq | wc 

shows 26 fonts having an OpenType math layout. Among them, two are sans serif fonts not advertised as math fonts : FreeSans and DejaVu Sans. Furthermore, FreeSerif and DejaVu Serif also have an unadvertisd OpenType math layout. It is tempting to see if these fonts are indeed usable as math fonts.

Using a slight variation of the test case used previously :

\newcommand{\testmymath}[2]{ \setmainfont{#1} \setmathfont{#2} \textbf{(Quick) test of math typesetting of the #2 font.} \begin{itemize} \item Covariant derivative: \[ \nabla \symbf{X} = \tensor{X}{^\alpha_{;\beta}} \pdv{x^\alpha}% \otimes \dd{x^\beta} = \qty(\tensor{X}{^\alpha_{,\beta}} + \Gamma^{\alpha}_{\beta\gamma} \,% X^\gamma) \,\pdv{x^\alpha} \otimes \dd{x^\beta} \] \item Einstein's field equations: \[ G_{\mu\nu} \equiv R_{\mu\nu} - \frac{1}{2} R g_{\mu\nu} = \frac{8\pi G}{c^4} T_{\mu\nu} \] \item Schwarzschild metric: \[ c^2 \dd{\tau}^2 = \qty(1-\frac{r_{\mathrm{s}}}{r}) \, c^2 \ dd{t}^2 - \qty(1-\frac{r_{\mathrm{s}}}{r})^{-1} \dd{r}^2 - r^2 \underbrace{\qty(\dd{\theta}^2 + \sin^2 \theta \dd{\varphi}^2)}_{\dd{\Omega}^2} \] \item Einstein--Hilbert action: \[ S = \frac{1}{2\kappa} \int R \sqrt{-g} \dd[4]{x} \] \end{itemize} \clearpage } 

The results are as follows :

Reference : Latin Modern Math (along with Latin Modern Roman) :

Test of the "reference" fonts Latin Modern Roman

In this page, all seems correct. One notes that in the last expression, the integral sign has the "right" height.

FreeSans

Test of OpenType FreeSans as a math font

The results are mostly correct. However, one notes :

  • bad positioning of the lower part of the underbraced subexpression in the third expression ;

  • undersized integral sing in the last expression ;

  • the differentials in the third expression are rendered by serif 'd's.

DejaVu Sans

Test of the OpenType DejaVu Sans as a math font

This is quite incorrect: this font cannot be used this way.

Similar tests on the "serif" variants of these two fonts give parallel results : FreeSerif gives a "mostly correct" typeset page, whereas DejaVu Serif is unusable.

These results suggest that

  • LuaLaTeX uses variously-sized variants of the integral symbol which are unavailable in FreeSans, where they get replaced by a single, text-sized symbol ;

  • similarly, the misplacement of the underbrace and its corresponing parts suggest incorrect metrics.

Those results should incite the FreeXxx fonts developpers to develop this aspect of their work : it seems that they are almost there...

On the DejaVu front, it seems that GUST's declaration of intention to build a sans serif DejaVu math font has not (yet) been completed. FWIW, the same test led on the Tex Gyre Pagella / Tex Gyre Pagella Math gives good results.

Any further information on this subject will be welcomed. Similarly, I'd like to have an expert advice on my hypotheses about the reasons of FreeSans failures.

HTH,

Rephrasing, better cross(referencing.
Source Link
user2903730
  • 603
  • 5
  • 15

In order to compare theKrishna's (GFS Neohellenic Math) and Henri Menke's (Fira Math) answersnow give us two fonts now available, here is what you get when you retypesans-based Opentype typefaces. A very rough first comparison can be done by retyping the example given below by Henri Menke for Fira Math and recompilerecompiling it with GFS Neohellenic Math :

The same example, composed with GFS Neohellenic MathHenri Menke's example, composed with GFS Neohellenic Math

In order to compare the two fonts now available, here is what you get when you retype the example given below by Henri Menke for Fira Math and recompile it with GFS Neohellenic Math :

The same example, composed with GFS Neohellenic Math

Krishna's (GFS Neohellenic Math) and Henri Menke's (Fira Math) answersnow give us two sans-based Opentype typefaces. A very rough first comparison can be done by retyping the example given below by Henri Menke for Fira Math and recompiling it with GFS Neohellenic Math :

Henri Menke's example, composed with GFS Neohellenic Math

Updating the question to account for new available informations.
Source Link
user2903730
  • 603
  • 5
  • 15

In order to compare the two fonts now available, here is what you get when you retype the example given below by Henri Menke for Fira Sans Math and recompile it with GFS Neohellenic Math :

So we have now twotwo possible solutions to compose math-rich consistent documents using a sans-based design. If the GUST stands by its intent to create a Déjà Vù Sans Math (as answered by Barbara BeetonUlrike Fisher, and seen on a 2015 BachoTeX poster), we should get three possible bases for such a document. This should help to get rid of those zillions slides/Web pages where "modernist" sans-based designshorriblydesigns horribly swear with Latin Modern (or worse, bitmapped Computed Modern....).

In order to compare the two fonts now available, here is what you get when you retype the example given for Fira Sans Math and recompile it with GFS Neohellenic Math :

So we have now two possible solutions to compose math-rich consistent documents using a sans-based design. If the GUST stands by its intent to create a Déjà Vù Sans Math (as answered by Barbara Beeton, and seen on a 2015 BachoTeX poster), we should get three possible bases for such a document. This should help to get rid of those zillions slides/Web pages where "modernist" sans-based designshorribly swear with Latin Modern (or worse, bitmapped Computed Modern....).

In order to compare the two fonts now available, here is what you get when you retype the example given below by Henri Menke for Fira Math and recompile it with GFS Neohellenic Math :

So we have now two possible solutions to compose math-rich consistent documents using a sans-based design. If the GUST stands by its intent to create a Déjà Vù Sans Math (as answered by Ulrike Fisher, and seen on a 2015 BachoTeX poster), we should get three possible bases for such a document. This should help to get rid of those zillions slides/Web pages where "modernist" sans-based designs horribly swear with Latin Modern (or worse, bitmapped Computed Modern....).

Updating the question to account for new available informations.
Source Link
user2903730
  • 603
  • 5
  • 15
Loading
Tweeted twitter.com/StackTeX/status/928108484503236608
Source Link
user2903730
  • 603
  • 5
  • 15
Loading