Context : How to install and use new opentype (math) fonts?

You can get out of the box opentype math by setting mm (or math) with \definefontfamily:

\definefontfamily [mainface] [ss] [GFS Neohellenic]
\definefontfamily [mainface] [mm] [GFS Neohellenic Math]
\definefontfamily [mainface] [rm] [Latin Modern Sans]
\definefontfamily [mainface] [tt] [Latin Modern Typewriter] [features=none]
\setupbodyfont    [mainface]

\starttext

\input tufte

\startformula     
    \int_0^\infty t^5 e^{-t}\,dt = 120.
\stopformula

\stoptext

enter image description here

Output of $ pdffont:

name                                 type              encoding         emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
AJITCU+GFSNeohellenic-Regular        CID Type 0C       Identity-H       yes yes yes     10  0
HALPCL+GFSNeohellenicMath            CID Type 0C       Identity-H       yes yes yes     11  0

Context can find opentype fonts that are installed in the OS. To get a list of available fonts run:

$ mtxrun --script fonts --list --all

If you want to filter the results you can use the option --pattern. For example to list all GFS fonts on your system run:

$ mtxrun --script fonts --list --all --pattern=GFS

You can find more documentation on the context wiki: http://wiki.contextgarden.net/Command/definefontfamily


Where should I look for documentation of this feature?

There is a manual which is distributed with ConTeXt standalone, called Fonts out of ConTeXt. It is also sometimes referred to as “the new font manual”.

Or is there some "magic" script allowing for the creation of such scripts?

No, there is no magic script to generate these so-called typescripts. But the structure is straight-forward and it is really easy to roll your own.

The procedure is always the same. You define a typescript for a certain family and assign font files to predefined names. For example

\starttypescript [sans] [fira]
  \definefontsynonym [Sans] [file:FiraSans-Regular.otf] [features=default]
\stoptypescript

This tells ConTeXt that when the Sans version is requested it should load FiraSans-Regular.otf and apply the default font features to it.

The .lfg files (Lua Font Goodies) are more complicated but you mostly need those if you have to patch math fonts, you want to expose special math font features to ConTeXt, or you have to define virtual fonts. In a first approximation they are usually not needed.

Here is a full, yet simple example for the Fira font.

\starttypescriptcollection [fira]

  \starttypescript [sans] [fira]
    \setups[font:fallback:sans]
    \definefontsynonym [Sans]           [file:FiraSans-Regular.otf]       [features=default]
    \definefontsynonym [SansItalic]     [file:FiraSans-RegularItalic.otf] [features=default]
    \definefontsynonym [SansBold]       [file:FiraSans-Bold.otf]          [features=default]
    \definefontsynonym [SansBoldItalic] [file:FiraSans-BoldItalic.otf]    [features=default]
    \definefontsynonym [SansCaps]       [file:FiraSans-Regular.otf]       [features={default,smallcaps}]
  \stoptypescript

  \starttypescript [mono] [fira]
    \setups[font:fallback:mono]
    \definefontsynonym [Mono]     [file:FiraMono-Medium.otf] [features=default]
    \definefontsynonym [MonoBold] [file:FiraMono-Bold.otf]   [features=default]
  \stoptypescript

  \starttypescript [math] [fira]
    \definefontsynonym [MathRoman] [file:Fira-Math.otf] [features=mathextra]
  \stoptypescript

  \starttypescript [fira]
    \definetypeface [\typescriptone] [rm] [serif] [modern] [default]
    \definetypeface [\typescriptone] [ss] [sans]  [fira]   [default]
    \definetypeface [\typescriptone] [tt] [mono]  [fira]   [default]
    \definetypeface [\typescriptone] [mm] [math]  [fira]   [default]
    \quittypescriptscanning
  \stoptypescript

\stoptypescriptcollection

\setupbodyfont[fira,sans]

\starttext

\input knuth

\startformula
  R_{\mu\nu} - \frac{1}{2} R g_{\mu\nu} + \Lambda g_{\mu\nu} = \frac{8 \pi G}{c^4} T_{\mu\nu}
\stopformula

\starttyping
#include <stdio.h>

int main() {
    printf("Hello World!\n");
}
\stoptyping

\stoptext

enter image description here