Re: [matplotlib-devel] Patch for enhancement of PDF backend

2007-02-14 Thread Jouni K . Seppänen
"Nicolas Grilly" <[EMAIL PROTECTED]> writes: > Here is a patch I promised some time ago, to improve the PDF backend. Thanks; on first look this seems really nice! So far I have one request to you and one to John: Nicolas: would it be easy for you to strip the ^M (carriage-return) characters from

[matplotlib-devel] [PATCH] don't print undefined glyphs in ps backend

2007-02-14 Thread Evgeniy Stepanov
Hi, currently, PS backend does not work well with some fonts. For instance, it displays a dotted square instead of whitespace with Arial, and some strange dots instead of whitespace with Times New Roman. This patch fixes it by omitting glyphs named ".notdef" from PS output. diff -urN matplotlib-0

Re: [matplotlib-devel] Patch for enhancement of PDF backend

2007-02-14 Thread John Hunter
On 2/14/07, Nicolas Grilly <[EMAIL PROTECTED]> wrote: > I hope there is no license issue with the AFM files. I'm pretty sure > I've seen them integrated in some TeX distributions. Apparently all we have to do is include the README along with the licensing terms. You probably should do that in th

Re: [matplotlib-devel] Patch for enhancement of PDF backend

2007-02-14 Thread Nicolas Grilly
On 2/14/07, John Hunter <[EMAIL PROTECTED]> wrote: > Apparently all we have to do is include the README along with the > licensing terms. You probably should do that in the the same > directory the fonts live to ensure that they are always distributed > together. We also have a licenses directory

Re: [matplotlib-devel] [PATCH] don't print undefined glyphs in ps backend

2007-02-14 Thread Evgeniy Stepanov
Sorry, I was too hasty. The patch is wrong, here is the real reason: FT2Font.get_charmap() returns a mapping from glyph index to character code. This looks like a very bad design decision to me, because several character codes can correspond to one glyph. For example, in Times New Roman, both 0x

Re: [matplotlib-devel] [PATCH] don't print undefined glyphs in ps backend

2007-02-14 Thread Nicolas Grilly
On 2/14/07, Evgeniy Stepanov <[EMAIL PROTECTED]> wrote: > FT2Font.get_charmap() returns a mapping from glyph index to character code. > This looks like a very bad design decision to me, because several character > codes can correspond to one glyph. For example, in Times New Roman, both 0x32 > (spac

Re: [matplotlib-devel] [PATCH] don't print undefined glyphs in ps backend

2007-02-14 Thread Evgeniy Stepanov
On Wednesday 14 February 2007 21:53, Nicolas Grilly wrote: > On 2/14/07, Evgeniy Stepanov <[EMAIL PROTECTED]> wrote: > > FT2Font.get_charmap() returns a mapping from glyph index to character > > code. This looks like a very bad design decision to me, because several > > character codes can correspo

Re: [matplotlib-devel] [PATCH] don't print undefined glyphs in ps backend

2007-02-14 Thread John Hunter
On 2/14/07, Evgeniy Stepanov <[EMAIL PROTECTED]> wrote: > I also prefer the first way. Here is the patch. Please re-check at least the > changes to mathtext.py, I could miss something. mathtext_demo.py still works, > but it obviously does not test all the changes. Thanks for looking into this --

Re: [matplotlib-devel] [PATCH] don't print undefined glyphs in ps backend

2007-02-14 Thread Paul Barrett
John, I still feel this way, but maybe I should change my tune and let the changes go in. -- Paul On 2/14/07, John Hunter <[EMAIL PROTECTED]> wrote: > On 2/14/07, Evgeniy Stepanov <[EMAIL PROTECTED]> wrote: > > > I also prefer the first way. Here is the patch. Please re-check at least the > > c

Re: [matplotlib-devel] [PATCH] don't print undefined glyphs in ps backend

2007-02-14 Thread John Hunter
On 2/14/07, Paul Barrett <[EMAIL PROTECTED]> wrote: > I still feel this way, but maybe I should change my tune and let the > changes go in. What do you think about the comments made earlier in this thread: > FT2Font.get_charmap() returns a mapping from glyph index to character code. > This looks

Re: [matplotlib-devel] Matplotlib Cocoaagg backend

2007-02-14 Thread Charlie Moad
On 2/14/07, Michiel Jan Laurens de Hoon <[EMAIL PROTECTED]> wrote: > Dear Charles, > > I was trying to use your cocoa-agg backend for matplotlib, but it seems > to have a problem to read Matplotlib.nib. Opening this nib with > Interface Builder also gives an error. It appears that the problem is >

Re: [matplotlib-devel] [PATCH] don't print undefined glyphs in ps backend

2007-02-14 Thread Paul Barrett
On 2/14/07, John Hunter <[EMAIL PROTECTED]> wrote: > On 2/14/07, Paul Barrett <[EMAIL PROTECTED]> wrote: > > > I still feel this way, but maybe I should change my tune and let the > > changes go in. > > What do you think about the comments made earlier in this thread: My first reply: I suggest t