Nicola
11. Februar 2016 um 10:31
On 2016-02-11 08:36:12 +0000, Taco Hoekwater said:

[...]

8) Run `mtxrun --script font --reload --force`. After that, mtxrun
  shows me the same output as in step 4. Typesetting the document
  several times always results in `unknown font`. Document and log
  below.

Nicola

\definefontfamily [myfamily] [serif] [Avenir Next Condensed]
\setupbodyfont[myfamily]
\starttext
\tf Regular, \it Italic \bf Bold and \bi BoldItalic
\stoptext
The \definefontfamily uses currently a fixed value for the font width
but I won’t have time for this before the weekend because I have to
check a few (hundred!) fonts for the best solution.


Besides the \definefontfamily you can also write the required typescripts
yourself, below is a example for the normal Avenir Next fonts.

%%%% begin example
\starttypescript[sans][avenir]
    \setups[font:fallback:sans]
    \definefontsynonym [Sans]           [Avenir Next(AvenirNext-Regular)]
    \definefontsynonym [SansItalic]     [Avenir Next(AvenirNext-Italic)]
    \definefontsynonym [SansBold]       [Avenir Next(AvenirNext-Bold)]
    \definefontsynonym [SansBoldItalic] [Avenir Next(AvenirNext-BoldItalic)]
\stoptypescript

\starttypescript[sans][avenir-light]
    \setups[font:fallback:sans]
    \definefontsynonym [Sans]           [Avenir Next(AvenirNext-UltraLight)]
    \definefontsynonym [SansItalic]     [Avenir Next(AvenirNext-UltraLightItalic)]
    \definefontsynonym [SansBold]       [Avenir Next(AvenirNext-Medium)]
    \definefontsynonym [SansBoldItalic] [Avenir Next(AvenirNext-MediumItalic)]
\stoptypescript

\definetypeface [avenir] [ss] [sans] [avenir] [default] [features=default]
\definetypeface [avenir] [mm] [math] [modern] [default]

\definetypeface [avenir-light] [ss] [sans] [avenir-light] [default] [features=default]
\definetypeface [avenir-light] [mm] [math] [modern]       [default]

\setupbodyfont[avenir]

\starttext

\input knuth {\bf \input knuth }

\switchtobodyfont[avenir-light]
\input knuth {\bf \input knuth }

\stoptext
%%%% end example


BTW: ConTeXts already provides typescripts for many OS X fonts but they are a little bit dated.

Wolfgang