On Thu, Oct 22, 2026 at 20:45 (+0200), Hans Hagen wrote:
> 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 ...
Undoubtedly.
But I'd wager a modest amount that you will look at them again, regardless
of weird situations like the one I have.
>>> > 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
Truly!
>>> 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
Clever, those people! But look at all the fun they have missed.
>> 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
Never the twain shall meet. They are in two different worlds, separated by
an impassable gulf.
>>> > 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
My bad. I had \usepath instead of \usefontpath.
I'll go sharpen my sword and fall on it.
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
___________________________________________________________________________________