From: Darren D. <dd...@co...> - 2007-09-28 13:25:21
|
Hi Jouni, On Thursday 13 September 2007 02:38:25 am Jouni K. Sepp=E4nen wrote: > The usetex support in pdf is now a little better, so I am enabling it > now. At least it is more entertaining than NotImplementedError... > > I have fixed some of the biggest problems (the broken font embedding > causing crashes of Preview.app, and the lack of virtual font support). > It still makes some assumptions about the TeX distribution: you need > kpsewhich and pdftex.map, so on TeX Live or (I presume) teTeX you are > fine, but I have no idea about Windows. > > Transformations of Type-1 fonts are not implemented, so if you try to > use $\alpha$ with Times, TeX typesets an alpha from Symbol and slants > it, but you get the non-slanted version. Fixing this (and adding > subsetting support) probably requires a complete Type-1 parser. > > There is support for baseline alignment, but it is based on finding the > baseline of the lowest character, so subscripts will throw it off. A > good solution will require some TeX magic. > > Reports of bugs (or successes) are welcome. I tried the following, with the latest svn checkout and usetex=3DTrue: plot([1,2]) savefig('test.pdf') and I get an error, the tail end is: /usr/lib64/python2.5/site-packages/matplotlib/backends/backend_pdf.py in=20 writeFonts(self) 468 elif filename.endswith('.pfb') or=20 filename.endswith('.pfa'): 469 # a Type 1 font; limited support for now =2D-> 470 fontdictObject =3D self.embedType1(filename,=20 self.fontInfo[Fx]) 471 else: 472 realpath, stat_key =3D get_realpath_and_stat(filena= me) /usr/lib64/python2.5/site-packages/matplotlib/backends/backend_pdf.py in=20 embedType1(self, filename, fontinfo) 501 fh.close() 502 =2D-> 503 fh =3D open(fontinfo.afmfile, 'rb') 504 matplotlib.verbose.report( 505 'Reading metrics from ' + fontinfo.afmfile, 'debug') IOError: [Errno 2] No such file or directory: '' Darren |