Newer LMTX example. Use this when you want a font for a short piece of text on a title page, for example, rather than throughout the document.
<texcode>
\setuppapersize [A7] [A7]
\definefont [TestA] [name:texgyreheros*default at 12pt]
\definefont [TestB] [name:texgyreherosbold*default at 14pt]