Hi Jörg On Jan 18, 2008 9:47 AM, Joerg Lehmann <[EMAIL PROTECTED]> wrote: > Note, however, that teTeX is no longer developed and thus all > Linux distributions, sooner or later, will make the move to the TeX Live > distribution. >
Oh yes, I realise that. However, I think there will be people running
teTeX for many years to come.
> > I think for the moment, it would be easier for me to downgrade PyX. I
> > have been happily using PyX since v0.5 without ever running into this
> > problem before.
>
> First of all, you're using an unreleased version and you should not
> expect that everything works perfectly.
Of course you are right. I realise that there will be a certain amount
of pain to be expected from following the development version ;)
> Having said that, I'm still a
> bit surprised about your problems with the generated PDF file - the stub
> data written by PyX should be good enough. And in fact, I also use the
> SVN trunk of PyX without any problems even without AFM files for the
> bluesky cm fonts.
>
> It would be helpful if you could provide us with a minimal example file
> for which this sort of error occurs.
>
Attached is a minimal example file: pyx-cm-test.py, which illustrates
the problem. This produces the following warnings from PyX:
We are about to extract font information for the Type 1 font
'CMR10' from its pfb file. This is bad practice (and it's slow).
You should use an afm file instead.
We are about to extract font information for the Type 1 font
'CMMI10' from its pfb file. This is bad practice (and it's
slow). You should use an afm file instead.
Auto-guessing of font information for font 'CMMI10' failed.
We're writing stub data instead.
PyX generates a PDF (attached as pyx-cm-test.pdf) that looks OK, but
it causes acroread to throw up a warning dialog box:
"The font CMMI10 contains a bad /BBox"
This wouldn't normally bother me, since I usually use other PDF
viewers. However, I do use the Adobe Reader for presentations, since
it is the only one that supports javascript and embedded movies and
the like. It would be a bit embarrassing to have these warning dialogs
popping up in the middle of my talks!
Since my system does have afm files for other fonts, I tried switching
to txfonts, instead of CM. However, this gave me even more problems. I
attach another minimal example: pyx-txfonts-test.py, together with the
resultant traceback that I get: pyx-traceback.txt
The weird thing is that the strings '/' and '=' both work on their
own, but the combination '/=' does not!
Cheers
Will
--
Dr William Henney, Centro de Radioastronomía y Astrofísica,
Universidad Nacional Autónoma de México, Campus Morelia
import pyx
pyx.text.set(mode="latex")
string1 = r'Hello $a = x + \alpha$'
c = pyx.canvas.canvas()
c.text(0, 0, string1)
c.writePDFfile("pyx-cm-test")
import pyx
pyx.text.set(mode="latex")
pyx.text.preamble(r"""\usepackage{txfonts}""")
string1 = r'$=/$' # this works
string2 = r'=/' # this fails
string3 = r'=' # this works
string4 = r'/' # this works
c = pyx.canvas.canvas()
c.text(0, 0, string2)
c.writePDFfile("pyx-txfonts-test")
Traceback (most recent call last):
File "/tmp/pyx-txfonts-test.py", line 12, in <module>
c.writePDFfile("pyx-txfonts-test")
File "/usr/lib64/python2.5/site-packages/pyx/canvas.py", line 288, in
wrappedindocument
return method(d, file)
File "/usr/lib64/python2.5/site-packages/pyx/document.py", line 171, in
writePDFfile
pdfwriter.PDFwriter(self, _outputstream(file, "pdf"), **kwargs)
File "/usr/lib64/python2.5/site-packages/pyx/pdfwriter.py", line 314, in
__init__
registry.write(file, self, catalog)
File "/usr/lib64/python2.5/site-packages/pyx/pdfwriter.py", line 77, in write
object.write(file, writer, self)
File "/usr/lib64/python2.5/site-packages/pyx/font/font.py", line 200, in write
file.write("%i" % self.metric.width_ds(encoding[i]))
File "/usr/lib64/python2.5/site-packages/pyx/font/afmfile.py", line 1359, in
width_ds
return self.charmetricsdict[glyphname].widths[0][0]
KeyError
pyx-cm-test.pdf
Description: Adobe PDF document
------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________ PyX-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/pyx-user
