] >Date Index
Re: [wmx] Rotated.C has a charset bugcannam
- Tue Feb 01 10:32:47 2000
Lasse Rasinen <email@example.com> writes:
> On line 208 or so, we have the following code snippet:
> /* we only want printing characters ... */
> if (min_char<32) min_char = 32;
> if (max_char>126) max_char = 126;
Oh yes! Interesting.
> And actually are the semantics of max_char and min_char?
> I mean, if they are defined, the font has characters on
> those locations
I'd have thought so, yes. On the other hand it seems a bit
unlikely that the author would have included those tests if
he hadn't already seen some case in which it failed otherwise?
A quick grep for min_char suggests that it's not actually
tested against when drawing characters, only when generating
the rotated versions in the first place -- so maybe it's just
because that bit was rather slow when the code was originally
written, so saving half the time at the expense of all those
funny foreign languages seemed desirable.
Anyway, I'd be surprised if omitting those tests really did
break anything. I guess to be cautious one could only render
those characters in the ISO-8859-1 range (32-127, 160-255) as
there are relatively few national character sets (outside of
MS Windows) that use the 0-31 or 128-159 ranges. But I don't
see why we shouldn't render everything and just let the blank
characters render blank.