diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /systems/knuth/dist/lib/slant.mf |
Initial commit
Diffstat (limited to 'systems/knuth/dist/lib/slant.mf')
-rw-r--r-- | systems/knuth/dist/lib/slant.mf | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/systems/knuth/dist/lib/slant.mf b/systems/knuth/dist/lib/slant.mf new file mode 100644 index 0000000000..3763222bce --- /dev/null +++ b/systems/knuth/dist/lib/slant.mf @@ -0,0 +1,32 @@ +% more-or-less general slant font generator for GFtoDVI + +% the calling file should set the font_identifier and +% n = number of characters +% s = slant ratio +% r# = rule thickness (in sharp units) +% u = vertical unit (in pixels) + +if unknown mag: mag := 1; +elseif (mag<1) or (mag<>floor mag): + errmessage "Sorry, mag must be a positive integer"; mag := 1; fi + +mg := mag; mag := 1; mode_setup; u# := u*72.27/pixels_per_inch; +pixels_per_inch := pixels_per_inch*mg; fix_units; + +define_whole_pixels(u); define_blacker_pixels(r); +pickup pencircle scaled r; ruler := savepen; + +for k=1 upto n: + beginchar(k,k*u#*s,n*u#,0); + pickup ruler; draw origin--(k*u*s,k*u); + unfill (lft-1,bot -1)--(rt 1,bot -1) + --(rt 1,0)--(lft-1,0)--cycle; + unfill ((lft -1,0)--(rt 1,0) + --(rt 1,top 1)--(lft -1,top 1)--cycle) shifted (k*u*s,k*u); + endchar; endfor + +font_size 16pt#; +font_slant s; +fontdimen 8: r#; +font_coding_scheme "GFSLANT"; +bye. |