summaryrefslogtreecommitdiff
path: root/info/digests/texhax/txh/labrec.txh
blob: c4400f902218177610ce92e7f0f6166ba7ffdabf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
Date: Fri, 7 Aug 87 10:19:38 EST
From: crl@maxwell.physics.purdue.edu (Charles R. LaBrec)
To: TEXHAX@score.stanford.edu
Subject: Mode definitions for LN03 and LN03+

I have recently been playing with metafont for an LN03, and have come
up with something that seem to produce acceptable output, but is by no
means "completely" tested.  The problem with the write-white LN03 is
that you cannot use a one-pixel wide line ever, since it becomes far,
far too light.  This is why my previous version of the LN03 mode used
a "blacker" parameter that was very big.  From metafont 1.3, I started
using the write-white cmbase, but even this didn't provide a wide
enough line in various places.  It was really obvious for things that
used only the light_rule.nib pen.  This fact made me notice that even
though all sorts of parameters were set to a minimum of two, the pens
that were saved could have widths of one.  I thus decided to try to
modify cmbase further, setting minimum pencircle widths of two.  I
enclose the decln mode I've used, along with a diff of the write-white
version of cmbase.mf.  I am VERY interested in comments/suggestions as
to whether everyone thinks this solution is valid/produces good
output.  If so, then perhaps metafont should get a new mode parameter
which is the minimum pen{circle/square} scaling, so that such things
could be more easily handled in base files.

Charles LaBrec
crl @ maxwell.physics.purdue.edu

% decln mode: for the DEC LN03 (Ricoh engine, a write-white device)
mode_def decln =	% decln mode
 proofing:=0;		% no, we're not making proofs
 fontmaking:=1;		% yes, we are making a font
 tracingtitles:=0;	% no, don't show titles in the log
 pixels_per_inch:=300;
 blacker:=0.2;		% make pens a bit blacker
 fillin:=-0.2;		% darken diagonals a bit
 o_correction:=0.5;	% don't overshoot as much
 enddef;

*** /tmp/,RCSt1007354	Fri Aug  7 09:53:44 1987
--- cmbase.mf	Fri Aug  7 09:52:44 1987
***************
*** 385,391
   penlabels(1,2,3,4,5,6,7); enddef;
  
  def left_angle(expr breadth) =
!  pickup pencircle scaled breadth;
   x1=x3=good.x(w-u)+eps; lft x2=hround u-eps;
   top y1=h+eps; .5[y1,y3]=y2=good.y .5[-d+eps,h];
   draw z1--z2--z3;  % diagonals

--- 385,391 -----
   penlabels(1,2,3,4,5,6,7); enddef;
  
  def left_angle(expr breadth) =
!  pickup pencircle scaled max(breadth,2);	% WRITE WHITE
   x1=x3=good.x(w-u)+eps; lft x2=hround u-eps;
   top y1=h+eps; .5[y1,y3]=y2=good.y .5[-d+eps,h];
   draw z1--z2--z3;  % diagonals
***************
*** 392,398
   labels(1,2,3); enddef;
  
  def right_angle(expr breadth) =
!  pickup pencircle scaled breadth;
   x1=x3=good.x u-eps; rt x2=hround(w-u)+eps;
   top y1=h+eps; .5[y1,y3]=y2=good.y .5[-d+eps,h];
   draw z1--z2--z3;  % diagonals

--- 392,398 -----
   labels(1,2,3); enddef;
  
  def right_angle(expr breadth) =
!  pickup pencircle scaled max(breadth,2);	% WRITE WHITE
   x1=x3=good.x u-eps; rt x2=hround(w-u)+eps;
   top y1=h+eps; .5[y1,y3]=y2=good.y .5[-d+eps,h];
   draw z1--z2--z3;  % diagonals
***************
*** 399,405
   labels(1,2,3); enddef;
  
  def big_slash(expr breadth) =
!  adjust_fit(-letter_fit#,-letter_fit#); pickup pencircle scaled breadth;
   rt x1=hround(w-u); lft x2=hround u; top y1=h+eps; bot y2=1-d-eps;
   draw z1--z2;  % diagonal
   labels(1,2); enddef;

--- 399,405 -----
   labels(1,2,3); enddef;
  
  def big_slash(expr breadth) =
!  adjust_fit(-letter_fit#,-letter_fit#); pickup pencircle scaled max(breadth,2); % WRITE WHITE
   rt x1=hround(w-u); lft x2=hround u; top y1=h+eps; bot y2=1-d-eps;
   draw z1--z2;  % diagonal
   labels(1,2); enddef;
***************
*** 405,411
   labels(1,2); enddef;
  
  def big_blash(expr breadth) =
!  adjust_fit(-letter_fit#,-letter_fit#); pickup pencircle scaled breadth;
   lft x1=hround u; rt x2=hround(w-u); top y1=h+eps; bot y2=1-d-eps;
   draw z1--z2;  % diagonal
   labels(1,2); enddef;

--- 405,411 -----
   labels(1,2); enddef;
  
  def big_blash(expr breadth) =
!  adjust_fit(-letter_fit#,-letter_fit#); pickup pencircle scaled max(breadth,2); % WRITE WHITE
   lft x1=hround u; rt x2=hround(w-u); top y1=h+eps; bot y2=1-d-eps;
   draw z1--z2;  % diagonal
   labels(1,2); enddef;
***************
*** 536,541
   forsuffixes $=fine,crisp,tiny:
  %%% fine $ %%%% temporary formatting convention for MFT
    if $>fudged.hair: $:=fudged.hair; fi
    $.breadth:=$;
    pickup if $=0: nullpen else: pencircle scaled $; $:=$-eps fi;
    $.nib:=savepen; breadth_[$.nib]:=$;

--- 536,542 -----
   forsuffixes $=fine,crisp,tiny:
  %%% fine $ %%%% temporary formatting convention for MFT
    if $>fudged.hair: $:=fudged.hair; fi
+   if $>0: $:=max($,2); fi				% WRITE WHITE
    $.breadth:=$;
    pickup if $=0: nullpen else: pencircle scaled $; $:=$-eps fi;
    $.nib:=savepen; breadth_[$.nib]:=$;
***************
*** 546,551
   if flare<vround flare: flare:=vround flare; fi
   forsuffixes $=vair,bar,slab,cap_bar,cap_band,vair',vstem,cap_vstem,bold:
    if $<min_Vround: $:=min_Vround; fi endfor
   pickup pencircle scaled rule_thickness; rule.nib:=savepen;
   math_axis:=good.y(math_axis#*hppp);
   pickup pencircle scaled if hefty:(.6[vair,fudged.hair]) else:fudged.hair fi;

--- 547,559 -----
   if flare<vround flare: flare:=vround flare; fi
   forsuffixes $=vair,bar,slab,cap_bar,cap_band,vair',vstem,cap_vstem,bold:
    if $<min_Vround: $:=min_Vround; fi endfor
+  pickup pencircle scaled max(if hefty:(.6[vair,fudged.hair]) else:fudged.hair fi,2);	% WRITE WHITE
+  light_rule.nib:=savepen;
+  pickup pencircle xscaled max(cap_curve+dw,2) yscaled max(cap_hair,2) rotated 30;	% WRITE WHITE
+  heavy_cal.nib:=savepen;
+  forsuffixes $=thin_join,hair,curve,flare,dot_size,cap_hair,cap_curve,cap_stem,
+   vair,bar,slab,cap_bar,cap_band,stem',cap_stem',vair',fudged.hair,
+   fudged.stem,fudged.cap_stem,rule_thickness: $:=max($,2); endfor % "WRITE WHITE" ONLY!
   pickup pencircle scaled rule_thickness; rule.nib:=savepen;
   math_axis:=good.y(math_axis#*hppp);
   pickup pencircle xscaled cap_curve yscaled cap_hair rotated 30;
***************
*** 548,555
    if $<min_Vround: $:=min_Vround; fi endfor
   pickup pencircle scaled rule_thickness; rule.nib:=savepen;
   math_axis:=good.y(math_axis#*hppp);
-  pickup pencircle scaled if hefty:(.6[vair,fudged.hair]) else:fudged.hair fi;
-  light_rule.nib:=savepen;
   pickup pencircle xscaled cap_curve yscaled cap_hair rotated 30;
   cal.nib:=savepen;
   pair cal.extension; cal.extension:=(.75cap_curve,0) rotated 30;

--- 556,561 -----
    fudged.stem,fudged.cap_stem,rule_thickness: $:=max($,2); endfor % "WRITE WHITE" ONLY!
   pickup pencircle scaled rule_thickness; rule.nib:=savepen;
   math_axis:=good.y(math_axis#*hppp);
   pickup pencircle xscaled cap_curve yscaled cap_hair rotated 30;
   cal.nib:=savepen;
   pair cal.extension; cal.extension:=(.75cap_curve,0) rotated 30;
***************
*** 561,568
   med_cal.nib:=savepen;
   pickup pencircle xscaled stem yscaled cap_hair rotated 30;
   light_cal.nib:=savepen;
-  pickup pencircle xscaled(cap_curve+dw) yscaled cap_hair rotated 30;
-  heavy_cal.nib:=savepen;
   bot_flourish_line:=-.5u-o;
   pair bend; bend=(.5u,0);
   pair flourish_change; flourish_change=(4u,.2asc_height);

--- 567,572 -----
   med_cal.nib:=savepen;
   pickup pencircle xscaled stem yscaled cap_hair rotated 30;
   light_cal.nib:=savepen;
   bot_flourish_line:=-.5u-o;
   pair bend; bend=(.5u,0);
   pair flourish_change; flourish_change=(4u,.2asc_height);
***************
*** 576,584
   body_depth:=desc_depth+body_height-asc_height;
   shrink_fit:=1+hround(2letter_fit#*hppp)-2letter_fit;
   if not string mode: if mode<=smoke: shrink_fit:=0; fi fi
- forsuffixes $=thin_join,hair,curve,flare,dot_size,cap_hair,cap_curve,
-  vair,bar,slab,cap_bar,cap_band,stem',cap_stem',vair',fudged.hair,
-  fudged.stem,fudged.cap_stem: $:=max($,2); endfor % "WRITE WHITE" ONLY!
   enddef;
  
  def shiftdef(suffix $)(expr delta) =

--- 580,585 -----
   body_depth:=desc_depth+body_height-asc_height;
   shrink_fit:=1+hround(2letter_fit#*hppp)-2letter_fit;
   if not string mode: if mode<=smoke: shrink_fit:=0; fi fi
   enddef;
  
  def shiftdef(suffix $)(expr delta) =
-------