diff options
Diffstat (limited to 'Master/texmf-dist/fonts/source/public/knitting/knit_dimens.mf')
-rw-r--r-- | Master/texmf-dist/fonts/source/public/knitting/knit_dimens.mf | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/Master/texmf-dist/fonts/source/public/knitting/knit_dimens.mf b/Master/texmf-dist/fonts/source/public/knitting/knit_dimens.mf new file mode 100644 index 00000000000..0e69a6bdbb7 --- /dev/null +++ b/Master/texmf-dist/fonts/source/public/knitting/knit_dimens.mf @@ -0,0 +1,100 @@ +widewd# = 16.3pt#; +% This is as wide as a cell can be without causing problems with 5-cell-wide symbols +if known wd#: else: wd# = 12 pt#; fi + ht# + dp# = 12 pt#; ht#-dp# = 6.44444pt#; + + symbolwidth#=0.7pt#; + purl_symbolwidth#=0.7pt#; + gridwidth# = if gridfont: 0.3pt# else: 0pt# fi; + overlinewd# = if gridfont: 1.5pt# else: 0.8pt# fi; + +eraserwidth# = 3pt#; +wrapturngap# = 2pt#; + + o#:=0.4pt#; %Vertical overshoot + ho#:=o#; %Horizontal overshoot + +% Vertical gaps +standardgap# = if gridfont: 3pt# else: 2.5pt# fi; +smallgap# = if gridfont: 2.5pt# else: 2pt# fi; +mingap# = if gridfont: 1.2pt# else: 1pt# fi; + +botcableheight# - symbolwidth#/2 = (-dp# + smallgap#); +topcableheight# + symbolwidth#/2 = (ht# - smallgap#); + +cablevertgap# = 3symbolwidth#; +cablebargap# = 4pt#; +cableslant# = 4pt#; + +if known topgap#: else: topgap# = standardgap#; fi +if known bottomgap#: else: bottomgap# = standardgap#; fi + +cableextend# := 0pt#; +% If your software is prone to leaving little gaps between the nogrid +% cable connectors, or in wide increases and decreases, you might want +% to make this nonzero. + +if gridfont: +purlextend# := 0pt#; +else: +purlextend# := 0.2pt#; +fi +% +% Purlextend affects how far outside their box the purl background goes. +% +% This is largely irrelevant when printing, +% but it makes the PDFs look much better. +% +% If you do a Knuth-esque bitmap-font customization to your +% particular printer, this is one parameter you *have* to fiddle with. + +define_pixels(wd,ht,dp); +define_blacker_pixels(cableextend,purlextend,gridwidth,symbolwidth,purl_symbolwidth, + overlinewidth); +define_pixels(eraserwidth,wrapturngap); +define_corrected_pixels(o,ho); +define_pixels(standardgap,smallgap,mingap,topgap,bottomgap, + cablevertgap,cablebargap,cableslant, botcableheight,topcableheight); + +pickup pencircle scaled symbolwidth; symbol_pen := savepen; +pickup pencircle scaled purl_symbolwidth; purl_symbol_pen := savepen; +pickup pencircle scaled eraserwidth; eraser_pen := savepen; + +offset = (topgap-bottomgap)/2; +small_topgap = topgap + smallgap-standardgap; +small_bottomgap = bottomgap + smallgap-standardgap; +min_topgap = topgap + mingap-standardgap; +min_bottomgap = bottomgap + mingap-standardgap; + +standardheight := ht+dp-topgap-bottomgap; +biggerheight := ht+dp-small_topgap-small_bottomgap; + +font_size 10pt#; + +font_slant := 0pt#; % fontdimen 1 +font_normal_space := 0pt#; % fontdimen 2 +font_normal_stretch := 0pt#; % fontdimen 3 +font_normal_shrink := 0pt#; % fontdimen 4 +font_x_height := ht#; % fontdimen 5 +font_quad := wd#; % fontdimen 6 +font_extra_space := 0pt#; % fontdimen 7 + +fontdimen 8: % Font dimensions 8+ listed here +dp#, % dimen 8: depth +% width is not needed because it is quad (dimen 6) +% height is not needed because it is xheight (dimen 5) +ht#+dp#, % dimen 9: height+depth (LaTeX height) +gridwidth#, % dimen 10: grid width +overlinewd#, % dimen 11: overline/bar width +(ht#+dp#)/8, % dimen 12: raise/lower symbols in narrow increases +(topgap#-bottomgap#), % dimen 13: vertical offset +purlextend#; % dimen 14: purl box outlap + +def incrwidth (expr sts) = wd# enddef; +def decrwidth (expr sts) = wd# enddef; +Vwidth := standardheight; % Used twice: v and y +Wwidth := biggerheight; % Used for make 3 from 1 +wideincline := 2symbolwidth; +wideinctip := 0.3symbolwidth; + +symbolmaxwd# = 82.244pt# - max(2purlextend#,gridwidth#); |