ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* lmtx: new text & math font stuff
@ 2020-12-30 15:53 Hans Hagen
  2020-12-30 18:27 ` Thomas A. Schmitz
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen @ 2020-12-30 15:53 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi,

As you know, lmtx is also a place for experiments. Currently I'm playing 
a bit with fonts. Recently (as mentioned a whil eback) I added glyph 
scaling which permits interesting trickery, although one needs to be 
aware of how it combines with other features. Here's an example:

     \def\UnKernedTeX
        {T%
        {\glyph xoffset -.2ex yoffset -.4ex `E}%
        {\glyph xoffset -.4ex options "C0 `X}}

     \dorecurse{100}{ x \UnKernedTeX}

There are alse \glyphxscale cum suis but again, beware that it might 
influence things when not used grouped.

At some point this will be an option in scaled fonts (think of \tfc and 
such). It saves instances. You can get an idea with:

    \enableexperiments[text.fonts.compact]

The 'text' in this command suggests that we can also do that with math 
and indeed we have

    \enableexperiments[math.fonts.compact]

These directives have to come *before* loading fonts in order to be 
effective. Especially the math can bring down the number of font 
instances: text, script and scriptscript all use the same instance, 
which is good news. The bad news is that it's up to users to check how 
this plays out. There are some differences due to the fact that scaling 
happens elsewhere and otherwise which results in tiny differences (4/5th 
decimal).

As said, these are experiments so ity might progress. I post 
intermediate versions because that way I can control it better. There is 
another variant in the planning.

Yet another expriment (undecided if that will stay, i played with if 
before and then rejected it):

    \enabledirectives[fonts.injections.method=advance]

If it stays I probbably have to patch some other code to better suit it.

Overall, although in math it add to the overhead, due to the fact that 
math is hardly demanding (makes only a fraction of the rendering) the 
memory footprint can be quite a bit lower and performance a bit better 
(not that much). The measures used in rendering are kind of floating 
(recalculated often) when these mechanisms are enabled but my impression 
is that todays compilers make that hardly noticeable.

As usual, it opens up possibilities, but of course at the price of 
testing.

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 : 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-12-30 20:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-30 15:53 lmtx: new text & math font stuff Hans Hagen
2020-12-30 18:27 ` Thomas A. Schmitz
2020-12-30 20:59   ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).