[cl-pdf-devel] Re: CL-PDF won't compile on CMUCL
Marc Battyani
marc.battyani at fractalconcept.com
Fri Dec 26 11:02:18 UTC 2003
> I'm not sure if that's a CL-PDF bug or a CMUCL bug, but as it is, CL-PDF
> won't parse the font metrics correctly. The parsing fails with a
> parse-error condition in get-afm-number.
>
> It fails because:
>
> PDF> (parse-integer "FontBBox -113 -250 749 801" :start 8 :junk-allowed t)
> -113
> 14
> PDF>
>
> You'll notice that it has skipped over the whitespace past the first
> number. This confuses the logic in get-afm-number, which doesn't expect
> that.
It's a CMUCL problem but it has been corrected (thanks to Adam Warner) so
try a more recent version or an older one before they changed the
parse-integer behavior) The (rather hot) debate can be followed on the CMUCL
dev mailing list.
> To quote the hyperspec:
>
> parse-integer expects an optional sign (+ or -) followed by a a
> non-empty sequence of digits to be interpreted in the specified
> radix. Optional leading and trailing whitespace[1] is ignored.
>
> I'm afraid that 'ignored' can mean both "parsed" and "left unparsed", so
> I guess get-afm-number should be ready for that.
There has been some debate on this issue. Both interpretations are correct
w.r.t. the standard. But all the implentations including the old CMUCL
choosed to stop at the first whitespace.
Marc
More information about the cl-pdf-devel
mailing list