168 |
|
else |
169 |
|
xsiz = ysiz/pictaspect + 0.5; |
170 |
|
cheight = ysiz/nlines; |
171 |
< |
cwidth = cheight/aspect + 0.5; |
171 |
> |
cwidth = cheight/aspect; |
172 |
|
} else { |
173 |
|
if (ysiz <= 0) |
174 |
|
ysiz = cheight*nlines; |
175 |
|
pictaspect = (double)ysiz/xsiz; |
176 |
|
aspect = pictaspect*maxwidth/(256*nlines); |
177 |
|
cheight = ysiz/nlines; |
178 |
< |
cwidth = cheight/aspect + 0.5; |
178 |
> |
cwidth = cheight/aspect; |
179 |
|
} |
180 |
|
} else { /* reverse orientation */ |
181 |
|
if (ysiz <= 0) { |
191 |
|
else |
192 |
|
xsiz = ysiz/pictaspect + 0.5; |
193 |
|
cheight = xsiz/nlines; |
194 |
< |
cwidth = cheight/aspect + 0.5; |
194 |
> |
cwidth = cheight/aspect; |
195 |
|
} else { |
196 |
|
if (xsiz <= 0) |
197 |
|
xsiz = cheight*nlines; |
198 |
|
pictaspect = (double)ysiz/xsiz; |
199 |
|
aspect = maxwidth/(256*nlines*pictaspect); |
200 |
|
cheight = xsiz/nlines; |
201 |
< |
cwidth = cheight/aspect + 0.5; |
201 |
> |
cwidth = cheight/aspect; |
202 |
|
} |
203 |
|
} |
204 |
|
if (xsiz % SSS) |
239 |
|
curl->s[len] = '\0'; |
240 |
|
if (spacing < -1./256.) |
241 |
|
len = squeeztext(curl->sp, curl->s, ourfont, |
242 |
< |
(int)(spacing*-256.0)); |
242 |
> |
(int)(spacing*-256.)); |
243 |
|
else if (spacing > 1./256.) |
244 |
|
len = proptext(curl->sp, curl->s, ourfont, |
245 |
< |
(int)(spacing*256.0), 3); |
245 |
> |
(int)(spacing*256.), 3); |
246 |
|
else |
247 |
|
len = uniftext(curl->sp, curl->s, ourfont); |
248 |
|
if (len > maxwidth) |
280 |
|
ourtext->sp = (short *)malloc(sizeof(short)*(maxline+1)); |
281 |
|
if (ourtext->sp == NULL) |
282 |
|
goto memerr; |
283 |
< |
if (spacing < 0.0) |
283 |
> |
if (spacing < -1./256.) |
284 |
|
maxwidth = squeeztext(ourtext->sp, ourtext->s, ourfont, |
285 |
< |
(int)(spacing*-256.0)); |
286 |
< |
else if (spacing > 0.0) |
285 |
> |
(int)(spacing*-256.)); |
286 |
> |
else if (spacing > 1./256.) |
287 |
|
maxwidth = proptext(ourtext->sp, ourtext->s, ourfont, |
288 |
< |
(int)(spacing*256.0), 3); |
288 |
> |
(int)(spacing*256.), 3); |
289 |
|
else |
290 |
|
maxwidth = uniftext(ourtext->sp, ourtext->s, ourfont); |
291 |
|
nlines = 1; |