Hi,
The latest lmtx has a new feature: expansion control independent of font
specific settings. When used the font specific step stretch and shrink
will be overloaded. This permits mixed setups that are normally nor
possible because these three properties need to be consistent within a
paragraph. It also permits local deviations from the defaults, for
instance in more extreme cases.
\startluacode
local classes = fonts.expansions.classes
classes.qualityb = {
vector = "default",
factor = 1,
stretch = 8,
shrink = 4,
step = .5,
}
classes.qualitya = {
vector = "default",
factor = 1,
stretch = 4,
shrink = 2,
step = .5,
}
\stopluacode
\showframe
% \enabletrackers[*expansion]
\setupbodyfont[dejavu,8pt]
\defineexpansion
[myexpansion]
[step=1,
stretch=50,
shrink=20]
\definefontfeature [basea] [default] [expansion=qualitya]
\definefontfeature [baseb] [default] [expansion=qualityb]
\definefont[FontA][Serif*basea]
\definefont[FontB][Serif*baseb]
\setupalign[verytolerant,stretch,hz]
\starttext
\startbuffer
\dorecurse {30} {%
{\FontB \red test me #1,} \FontA \dorecurse{#1}{test ##1, }%
}\par
\stopbuffer
{\getbuffer \page}
\setexpansion[myexpansion] {\getbuffer \page}
\stoptext
Maybe it's useful (I hardly use expansion myself). Hopefully there are
no side effects.
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
___________________________________________________________________________________