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:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\usefontpath[NCMS]

\definefontfamily [NCMS] [ss] [NewCMSans10-Regular.otf][
  tf=file:NewCMSans10-Regular.otf,
  bf=file:NewCMSans10-Bold.otf,
  it=file:NewCMSans10-Oblique.otf,
  sl=file:NewCMSans10-Oblique.otf,
  bi=file:NewCMSans10-BoldOblique.otf,
]

% NCM Sans small print
  \definestartstop[NCMSsmallprint]
    [before={\startnarrower\switchtobodyfont[NCMS,small,ss]},
     after={\stopnarrower},
    ]


% LM Sans Small print
\definestartstop[SmallPrint]
                [
                    before={\startnarrower\switchtobodyfont[small,ss]},
                    after={\stopnarrower},
                ]

\starttext

LM SS:

\startSmallPrint
This is a line of text.  {\sc This is a \letterbackslash{}sc line of text.}
\stopSmallPrint

\blank

NCM SS:

\startNCMSsmallprint
This is a line of text.  {\sc This is a \letterbackslash{}sc line of text.}
\stopNCMSsmallprint

\stoptext
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

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.


Thanks.
                                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
___________________________________________________________________________________

Reply via email to