\setuppapersize [A4][A4]

\starttypescript [serif] [myBodyFont]
    \definefontsynonym [myBodyFontRegular] [name:Times New Roman] [features=default]
    \definefontsynonym [myBodyFontItalic] [name:Times New Roman Italic] [features=default]
    \definefontsynonym [myBodyFontBold] [name:Times New Roman Bold] [features=default]
    \definefontsynonym [myBodyFontBoldItalic] [name:Times New Roman Bold Italic] [features=default]
\stoptypescript
\starttypescript [serif] [myBodyFont]
    \setups[font:fallback:serif]
    \definefontsynonym [Serif] [myBodyFontRegular]
    \definefontsynonym [SerifItalic] [myBodyFontItalic]
    \definefontsynonym [SerifBold] [myBodyFontBold]
    \definefontsynonym [SerifBoldItalic] [myBodyFontBoldItalic]
\stoptypescript
\starttypescript [myBodyFont]
    \definetypeface [myBodyFont] [rm] [serif] [myBodyFont] [default]
\stoptypescript

\starttypescript [sans] [myHeadingsFont]
    \definefontsynonym [myHeadingsFontRegular] [name:Arial] [features=default]
    \definefontsynonym [myHeadingsFontItalic] [name:Arial Italic] [features=default]
    \definefontsynonym [myHeadingsFontBold] [name:Arial Bold] [features=default]
    \definefontsynonym [myHeadingsFontBoldItalic] [name:Arial Bold Italic] [features=default]
\stoptypescript
\starttypescript [sans] [myHeadingsFont]
    \setups[font:fallback:sans]
    \definefontsynonym [Sans] [myHeadingsFontRegular]
    \definefontsynonym [SansItalic] [myHeadingsFontItalic]
    \definefontsynonym [SansBold] [myHeadingsFontBold]
    \definefontsynonym [SansBoldItalic] [myHeadingsFontBoldItalic]
\stoptypescript
\starttypescript [myHeadingsFont]
    \definetypeface [myHeadingsFont] [ss] [sans] [myHeadingsFont] [default]
\stoptypescript

\usetypescript[myBodyFont]
\usetypescript[myHeadingsFont]

\setupbodyfont[myBodyFont,12pt]

\definefont[myChapterFont][myHeadingsFontRegular sa 1.728]

%\setuphead[chapter][style=myChapterFont]      % compile error at line 49
\setuphead[chapter][style=\myChapterFont]  % compile error at line 49

\starttext

\chapter{chapter test}

\section{section test}

text test

\stoptext
