38 |
|
|
39 |
|
int cheight = 32*SSS; /* character height */ |
40 |
|
double aspect = 1.67; /* height/width character aspect */ |
41 |
+ |
double spacing = 0.0; /* character spacing */ |
42 |
|
int cwidth; /* computed character width */ |
43 |
|
|
44 |
|
unsigned char *ourbitmap; /* our output bitmap */ |
116 |
|
case 'a': /* aspect ratio */ |
117 |
|
aspect = atof(argv[++an]); |
118 |
|
break; |
119 |
+ |
case 's': /* spacing */ |
120 |
+ |
spacing = atof(argv[++an]); |
121 |
+ |
break; |
122 |
|
default:; |
123 |
|
unkopt: |
124 |
|
fprintf(stderr, "%s: unknown option: %s\n", |
195 |
|
maxline = len; |
196 |
|
strncpy(curl->s, buf, len); |
197 |
|
curl->s[len] = '\0'; |
198 |
< |
len = uniftext(curl->sp, curl->s, ourfont); |
198 |
> |
if (spacing < 0.0) |
199 |
> |
len = squeeztext(curl->sp, curl->s, ourfont, |
200 |
> |
(int)(spacing*-256.0)); |
201 |
> |
else if (spacing > 0.0) |
202 |
> |
len = proptext(curl->sp, curl->s, ourfont, |
203 |
> |
(int)(spacing*256.0), 3); |
204 |
> |
else |
205 |
> |
len = uniftext(curl->sp, curl->s, ourfont); |
206 |
|
if (len > maxwidth) |
207 |
|
maxwidth = len; |
208 |
|
curl->next = ourtext; |
238 |
|
ourtext->sp = (short *)malloc(sizeof(short)*(maxline+1)); |
239 |
|
if (ourtext->sp == NULL) |
240 |
|
goto memerr; |
241 |
< |
maxwidth = squeeztext(ourtext->sp, ourtext->s, ourfont, 50); |
241 |
> |
if (spacing < 0.0) |
242 |
> |
maxwidth = squeeztext(ourtext->sp, ourtext->s, ourfont, |
243 |
> |
(int)(spacing*-256.0)); |
244 |
> |
else if (spacing > 0.0) |
245 |
> |
maxwidth = proptext(ourtext->sp, ourtext->s, ourfont, |
246 |
> |
(int)(spacing*256.0), 3); |
247 |
> |
else |
248 |
> |
maxwidth = uniftext(ourtext->sp, ourtext->s, ourfont); |
249 |
|
nlines = 1; |
250 |
|
return; |
251 |
|
memerr: |