Am 04.10.2008 um 00:25 schrieb Hans Hagen:
Steffen Wolfrum wrote:
Hi,
in MkIV hz is bound to the found (thus the speed increase).
Now, how do I assign different degrees of hz to different areas? Say, moderate hz in the normal text and more drastic in controlled situation, like this:
% main text: \setupbodyfont[postscript,10pt] \setupalign[block,hanging,hz]
% and in controlled situation: \setupwhatever[align=hzXXL,style=...]
This doesn't work:
fonts.expansions.classes['NormalQuality'] = { stretch = 1, shrink = 1, step = .5, vector = 'default', factor = 1 }
fonts.expansions.classes['DrasticQuality'] = { stretch = 2, shrink = 2, step = .5, vector = 'default', factor = 1 }
\definefontfeature[hz][default] [protrusion=pure,expansion=sstquality,mode=node,script=latn] \definefontfeature[hzXXL][default] [protrusion=pure,expansion=sstquality,mode=node,script=latn]
\usetypescript[postscript] \definetypeface[postscript][rm][serif][times][default][features=hz]% <- what to do with hzXXL ???
just define an extra typeface with different characteristics
Well, how to define an extra typeface to a hidden predefined typescript "postscript"? The following might work, but it is admittedly a very, very ugly hack (redefining poor sans helvetica ...). Thus, please: any improvement very welcome!! Thanks, Steffen ===== \starttypescript [sans] [helvetica] \definefontsynonym [Helvetica] [file:texgyretermes- regular] [features=default] \definefontsynonym [Helvetica-Oblique] [file:texgyretermes- italic] [features=default] \definefontsynonym [Helvetica-Bold] [file:texgyretermes- bold] [features=default] \definefontsynonym [Helvetica-BoldOblique] [file:texgyretermes- bolditalic] [features=default] \definefontsynonym [Helvetica-Caps] [file:texgyretermes- regular] [features=smallcaps] \stoptypescript \starttypescript [postscript] \definetypeface [postscript] [rm] [serif] [times] [default] \definetypeface [postscript] [ss] [sans] [helvetica] [default] [rscale=2] \definetypeface [postscript] [tt] [mono] [courier] [default] [rscale=1.1] \definetypeface [postscript] [mm] [math] [times] [default] \quittypescriptscanning \stoptypescript \startluacode fonts.expansions.classes['extraquality'] = { stretch = 2, shrink = 2, step = .5, vector = 'default', factor = 1 } \stopluacode % \definefontfeature[hz][default] [protrusion=pure,expansion=quality,mode=node,script=latn] \definefontfeature[extrahz][default] [protrusion=pure,expansion=extraquality,mode=node,script=latn] \usetypescript[postscript] \definetypeface[postscript][rm][serif][times][default][features=hz] \definetypeface[postscript][ss][sans][helvetica][default] [features=extrahz] \setupbodyfont[postscript,10pt] \setupinterlinespace[line=12pt] \setupalign[line,block,hanging,hz] \starttext \showframe \input tufte {\ss \input tufte } \input tufte \stoptext