On 10/22/2026 7:52 PM, Jim Diamond wrote:
On Thu, Oct 22, 2026 at 18:09 (+0200), Hans Hagen wrote:
On 10/22/2026 3:44 PM, Jim Diamond wrote:
So I begin to wonder whether there is something inside \switchtobodyfont
(or some macro it calls) which should be global but is not.
won't happen, it's already complex enough ...
What if fixing this made code simpler? Such things have happened. (I'm
not talking about ConTeXt, but you never know. :-)
it's not like i haven't looked into fonts before ...
Even grep font test-ncm-effects.log has just under 74,000 lines.
There's a lot of stuff going on!
indeed, so then ponder why tex is so fast
It was a lot slower when it had to output over 1E6 log lines.
lucky you that's optional
Hmmm... now we are on to something (I think). New example at bottom.
No, but... if it is difficult or impossible to ensure everything is
properly initialized globally when a font is introduced inside a group,
then (since I'm a bit obsessive-compulsive about this) I'd take correct
behaviour over speed.
hm, not me, speed also matters and as mentioned, there is no robust solution
anyway, there's always side effects
I agree speed matters. But surely no-one wants badly-formatted or
incorrect output to save time.
well, in the past decades no one ran into your issue .. most happily
define bodyfonts upfront
The difference between TeXlive and stand-alone is (apparently) that if
context finds the font in some cached "usual place" then it doesn't try to
use the font file in the \usefontpath directory. Why exactly that works
when getting the font from the \usefontpath directory is another
interesting (to me) thing.
i don't think i should waste time on figuring out that difference .. we take
our distribition as reference anyway
Sure. But let me rephrase a clearer statement:
A given ConTeXt, even stand-alone, prefers a cached version of font XYZ
over one found in the \getfontpath directory. (I was flipping back and
forth between TL and stand-alone to avoid having to move NCM in and out of
some directory and running mtxrun every time I wanted to compare.)
hm, just don't mix these two distributions: different font caches etc
You mean this one:
\usetypescriptfile[newcomputermodern]
\setupbodyfont[newcomputermodern]
\starttext
\startchapter[title={Fun with Fonts in \ConTeXt}]
\showbodyfont[8pt]
\stopchapter
\stoptext
Yes, that works fine with TL.
But this:
\usepath[allncmfonts]
\usetypescriptfile[newcomputermodern]
\setupbodyfont[newcomputermodern]
\starttext
\startchapter[title={Fun with Fonts in \ConTeXt}]
\showbodyfont[8pt]
\stopchapter
\stoptext
errors out on the \showbodyfont[8pt] line, even when the entire set of
fonts from newcm-8.1.1.txz is in ./allncmfonts.
so there is something bad with the (fonts on) allncmfonts
That is interesting. I wonder if that is part of the issue.
For the interested readers, this is the error on the terminal:
tex error > tex error on line 6 in file ./showbodyfont-ncm.tex:
\textfont0 is undefined in ordinal, font id 0, character 63)
Does this indicate an error with the fonts?
it indicates that you didn't define a math font which then results in
whatever was loaded already being used or messed up
maybe wipe the cache so that there i no clash with those tl system fonts
As mentioned above (this email, not before) I have two separate worlds:
(1) ConTeXt stand-alone, and
(2) TL2026
and never the twain (or their caches) shall meet. But that is sage advice.
Since the same curious thing happens with the \usefontpath and
\usetypescriptfile lines commented out, I conclude that this peculiar thing
is not related to trying to use New CM.
But what parameters are changing (or not changing) when the first use of
Schola is inside an \hbox{}?
could be anything esp when a font is not found, they whatever is current
wins
Or loses, in this case.
sometimes happens
So many questions about fonts, so little time ...
lucky us that using fonts in the system paths works fine
Quite true!
(i only have tl in a linux vm so no testing with that one; installing and/or
updating tl takes ages and too much disk space)
No real need, as it turns out. For me it was just as easy way to compare
"NCM is already cached" with "NCM is not cached".
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________