font-glf.mklx /size: 1407 b    last modification: 2021-10-28 13:51
1%D \module
2%D   [       file=font-glf,
3%D        version=2020.12.21,
4%D          title=\CONTEXT\ Font Macros,
5%D       subtitle=Glyph Scaling,
6%D         author=Hans Hagen,
7%D           date=\currentdate,
8%D      copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
9%C
10%C This module is part of the \CONTEXT\ macro||package and is
11%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
12%C details.
13
14\writestatus{loading}{ConTeXt Font Macros / Glyph Scaling}
15
16\unprotect
17
18%D Experiment:
19
20\installcorenamespace{tweakedfont}
21
22\installcommandhandler \??tweakedfont {tweakedfont} \??tweakedfont
23
24\appendtoks
25    % we can optimize for zero and 1000 .. maybe also options?
26    \overloaded\frozen\protected\edefcsname\currenttweakedfont\endcsname
27      {\begincsname\tweakedfontparameter\c!style\endcsname
28       \glyphxscale \numexpr\numericscale\tweakedfontparameter\c!xscale*\glyphxscale/\plusthousand\relax
29       \glyphyscale \numexpr\numericscale\tweakedfontparameter\c!yscale*\glyphyscale/\plusthousand\relax
30       \glyphxoffset\dimexpr\glyphxoffset+\tweakedfontparameter\c!xoffset\relax
31       \glyphyoffset\dimexpr\glyphyoffset+\tweakedfontparameter\c!yoffset\relax}%
32\to \everydefinetweakedfont
33
34\setuptweakedfont
35  [\c!scale=\plusthousand,
36   \c!xscale=\tweakedfontparameter\c!scale,
37   \c!yscale=\tweakedfontparameter\c!scale,
38   \c!xoffset=\zeropoint,
39   \c!yoffset=\zeropoint]
40
41\protect \endinput
42