From: Hans Hagen <j.hagen@xs4all.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: lmtx: new text & math font stuff
Date: Wed, 30 Dec 2020 16:53:05 +0100 [thread overview]
Message-ID: <92af731f-62bc-4c20-ea00-f056a65b46f3@xs4all.nl> (raw)
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
___________________________________________________________________________________
next reply other threads:[~2020-12-30 15:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-30 15:53 Hans Hagen [this message]
2020-12-30 18:27 ` Thomas A. Schmitz
2020-12-30 20:59 ` Hans Hagen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=92af731f-62bc-4c20-ea00-f056a65b46f3@xs4all.nl \
--to=j.hagen@xs4all.nl \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).