On 4/27/2021 5:49 AM, Aditya Mahajan wrote:
On Mon, 26 Apr 2021, denis.ma...@ub.unibe.ch wrote:

Wikified, as per Aditya's suggestion.

I expanded on the description to make it clearer (hopefully). However, as I was testing, 
I realized that the remark about math font sizes ("These quick font switches [...] 
do not change the bodyfont, so they don't affect [...] math font size") is no longer 
true. In LTMX, \tfa correctly scales the math font size as well.

\starttext
\tfc x$x$x
\stoptext

I am not sure when this behavior changed, but looking at some of my old documents I see 
that I have been using "\tfc $+$" in some of my tikz code for about 4 years. 
So, it appears to be a old feature. I am thinking of changing the wiki from:

These quick font switches are meant for changing the font style, alternative, 
or size of a few words: they do not change the bodyfont, so they don't affect 
interline spacing or math font sizes

to

These quick font switches are meant for changing the font style, alternative, 
or size of a few words: they do not change the bodyfont, so they don't affect 
interline spacing.

(so not mention math at all). Let me know if I am misunderstanding something 
here.

These tfa tfb .. are often used in titles so that's by the math scales along (it's what \synchronizebigmath etc do).

Now, although that is unrelated, there has been a change in the font code but that only kicks in when you enable it:

   \enableexperiments[fonts.compact]

you can see the difference in th enumber of reported font instances. You can read a bit about it in followingup-fonts. For complex setups is a bit faster in loading, it takes less memory, but normally more calculations happens so that compensates it.

The imapact in the lmtx code is that (when we go that route) some font code can be dropped. The impact on luametatex-the-engine is that all font related dimensions have more complex calculations, and of course the impact on the math code is even larger because there we also have the styles to deal with. On the other hand, we now have basically one load of those fonts.

You can do a quick test with

\starttext
    {\ttc x$x$x}
    {\glyphscale 1720 x$x$x}
    {\glyphxscale 1720 x$x$x}
    {\glyphyscale 1720 x$x$x}
\stoptext

you can also imagien that it has an impact on font handling

\starttext
    {\glyphscale 1720 effe}{\glyphxscale 1720 effe}{\glyphyscale 1720 effe}
    {\glyphscale 1720 ef}{\glyphxscale 1720 feef}{\glyphyscale 1720 fe}
\stoptext

because suddenly we have three more properties that distinguishes them.

So, something like this impacts quite some subsystems: font, math, backend, interfaces. But I'm not too unhappy with it. The question is, when will we make the experiment the default.

Hans

ps. Of course, when enabled, for cjk fonts the load/memory impact is more impressive.

-----------------------------------------------------------------
                                          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 : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to