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 /fonts/cm/utilityfonts/half |
Initial commit
Diffstat (limited to 'fonts/cm/utilityfonts/half')
-rw-r--r-- | fonts/cm/utilityfonts/half/aphalf.mf | 3 | ||||
-rw-r--r-- | fonts/cm/utilityfonts/half/ddhalf.mf | 3 | ||||
-rw-r--r-- | fonts/cm/utilityfonts/half/ddralf.mf | 3 | ||||
-rw-r--r-- | fonts/cm/utilityfonts/half/halftone.mf | 45 | ||||
-rw-r--r-- | fonts/cm/utilityfonts/half/imhalf.mf | 3 | ||||
-rw-r--r-- | fonts/cm/utilityfonts/half/imralf.mf | 3 |
6 files changed, 60 insertions, 0 deletions
diff --git a/fonts/cm/utilityfonts/half/aphalf.mf b/fonts/cm/utilityfonts/half/aphalf.mf new file mode 100644 index 0000000000..6f386e63da --- /dev/null +++ b/fonts/cm/utilityfonts/half/aphalf.mf @@ -0,0 +1,3 @@ +% Halftone font for APS +mode:=aps; +input halftone diff --git a/fonts/cm/utilityfonts/half/ddhalf.mf b/fonts/cm/utilityfonts/half/ddhalf.mf new file mode 100644 index 0000000000..70bb1a8f92 --- /dev/null +++ b/fonts/cm/utilityfonts/half/ddhalf.mf @@ -0,0 +1,3 @@ +% Halftone font for Datadisk +mode:=DD; +input halftone diff --git a/fonts/cm/utilityfonts/half/ddralf.mf b/fonts/cm/utilityfonts/half/ddralf.mf new file mode 100644 index 0000000000..a754ee9774 --- /dev/null +++ b/fonts/cm/utilityfonts/half/ddralf.mf @@ -0,0 +1,3 @@ +% Halftone font for Datadisk +mode:=DD; +input ralftone diff --git a/fonts/cm/utilityfonts/half/halftone.mf b/fonts/cm/utilityfonts/half/halftone.mf new file mode 100644 index 0000000000..d93a540e5e --- /dev/null +++ b/fonts/cm/utilityfonts/half/halftone.mf @@ -0,0 +1,45 @@ +% halftone font with 65 levels of gray, characters "0" (white) to "p" (black) + +pair p[]; % the pixels in order (first p0 becomes black, then p1, etc) +p0=(1,1); +p8=(2,0); +p16=(1,0); +p24=(0,0); +p32=(3,-1); +p40=(2,-1); +p48=(1,-1); +p56=(2,-2); +transform r; r=identity rotatedaround ((1.5,1.5),90); + +for i=0 step 8 until 56: + p[i+2]=p[i] transformed r; + p[i+6]=p[i+2] transformed r; + p[i+5]=p[i+6] transformed r; + p[i+1]=p[i] shifted (4,4); + p[i+3]=p[i+2] shifted (4,4); + p[i+7]=p[i+6] shifted (4,4); + p[i+4]=p[i+5] shifted (4,4); + endfor + +for i=32 step 1 until 63: + p[i] := (xpart p[i] mod 8, ypart p[i] mod 8); +endfor + +mode_setup; +designsize:=64/pt; % that's 64 pixels + +def makebox(text t)= enddef; % shut off boxes + +picture prevchar; + +prevchar=nullpicture; +for i=0 upto 64: + beginchar(i+ASCII"0",designsize/8,designsize/8,0); + currentpicture:=prevchar; + if i>0: fill unitsquare shifted p[i-1]; fi + prevchar:=currentpicture; + endchar; + endfor + +font_quad=designsize/8; +end diff --git a/fonts/cm/utilityfonts/half/imhalf.mf b/fonts/cm/utilityfonts/half/imhalf.mf new file mode 100644 index 0000000000..1cd246f8d5 --- /dev/null +++ b/fonts/cm/utilityfonts/half/imhalf.mf @@ -0,0 +1,3 @@ +% Halftone font for Imagen +mode:=imagen; +input halftone diff --git a/fonts/cm/utilityfonts/half/imralf.mf b/fonts/cm/utilityfonts/half/imralf.mf new file mode 100644 index 0000000000..b2ef9b1b75 --- /dev/null +++ b/fonts/cm/utilityfonts/half/imralf.mf @@ -0,0 +1,3 @@ +% Halftone font for Imagen +mode:=imagen; +input ralftone |