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. :-)


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

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


>> 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.)

>> 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?

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


>> 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".

Cheers.
                                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