On Sun, Oct 18, 2026 at 14:33 (+0200), Wolfgang Schuster wrote: > Am 18.10.2026 um 00:04 schrieb Jim Diamond via ntg-context: >> Hi list,
>> I wanted to try out the new CM fonts found at >> https://download.gnu.org.ua/release/newcm/newcm-8.1.1.txz >> I downloaded them an put the font files in a director called NCMS, then I >> compiled this document: >> [...] >> I didn't get the NCM font in my PDF. ConTeXt reported >> selectfont > the requested font 'NewCMSans10-Regular.otf' has no files >> for the 'tf' alternative, Latin Modern is used instead. >> Then I put unpacked the tar file in a place where ConTeXt searches for font >> files, reloaded the font cache, and compiled it again. This time, I did >> get the NCM font in my PDF, with ConTeXT reporting: >> fonts > otf loading > loading >> '.../tex/fonts/other-fonts/newcm-8.1.1/otf/NewCMSans10-Regular.otf', hash >> 'newcmsans10-regular' >> There is no wiki page, and I didn't find the TeX definition of \usefontpath >> or the backing Lua definition enlightening. >> Can someone enlighten me as to how I should / could use \usefontpath to >> tell ConTeXt to look in a particular directory for font file(s)? >> Alternatively, if there is A Better Way of telling ConTeXt (from within the >> source file, not from the command line) to use a font which is not cached, >> I'd be happy to know that. > You're using \definefontfamily which can only use cached font even with the > file method, \usefontpath is only used when you use a typescript/typeface to > load a font. > For New Computer Modern you're lucky because context provides a typescript > which can be used but you have to provide the font files yourself. > %%%% begin example > \usefontpath > [NCMS] > \definestartstop > [NCMSsmallprint] > [before=\startnarrower, > after=\stopnarrower, > style=\switchtobodyfont[newcomputermodern,small,ss]] > \definestartstop > [SmallPrint] > [before=\startnarrower, > after=\stopnarrower, > style=\switchtobodyfont[small,ss]] > \usebodyfont > [newcomputermodern] > \setupbodyfont > [modern] > \starttext > Latin Modern: > \startSmallPrint > This is a line of text. {\sc This is a \tex{sc} line of text.} > \stopSmallPrint > \blank > New Computer Modern: > \startNCMSsmallprint > This is a line of text. {\sc This is a \tex{sc} line of text.} > \stopNCMSsmallprint > \stoptext > %%%% end example Wolfgang, thanks for the prompt (and working, of course) solution. Jim ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : [email protected] / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___________________________________________________________________________________
