[reportlab-users] parseAFMFile sfsc1200.afm
Robin Becker
robin at reportlab.com
Wed Sep 7 04:58:27 EDT 2005
Gregor Horvath wrote:
> hi,
>
> Gregor Horvath wrote:
>
> > Robin Becker schrieb:
> >
> >> I'm not sure; I'll have a look at the original parseafm.c code and
> >> also at any docs I can find from Adobe. I don't think it's a major
> >> problem to fix as python won't really care if it is an int or float,
> >> but I think some of our accelerator code might want it to be an int.
> >
> >
> > Thanks for the info.
> > For a quick and dirty workaround, I changed line 91 of
> > /usr/lib/python2.2/site-packages/reportlab/pdfbase/pdfmetrics.py
> >
> > to
> >
> > -->
> > width = int(float(r))
> > <--
> >
> > It works.
> >
>
> I just tested the same workaround on windows and it fails (works on Linux):
>
> pdfmetrics.registerFont(justFont)
> File "E:\Programme\python24\reportlab\pdfbase\pdfmetrics.py", line
> 587, in registerFont
> font.widths)
> TypeError: an integer is required
>
> Anyone an idea why?
>
> --
> Greg
....
it's likely that the afm files come with a line ending that isn't nice on Linux.
But if it were a conversion problem I would expect the error to happen in
parseAfmFile.
The _rl_accel setFontInfo call is failing. Was that available under windows
and what versions etc etc.
We're passing in the ascent and descent as well, but they would/should cause a
problem under windows as well.
--
Robin Becker
More information about the reportlab-users
mailing list