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

2007-02-17 Thread Nicolas Grilly
On 2/17/07, Paul Barrett <[EMAIL PROTECTED]> wrote: > That's fine with me. > > On 2/16/07, Edin Salkovic <[EMAIL PROTECTED]> wrote: > > From the above it's clear that FreeType *never* explicitly supported > > the glyph->char mapping, but exactly the opposite. > > > > In conclusion, I agree with Nic

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

2007-02-17 Thread Paul Barrett
That's fine with me. -- Paul On 2/16/07, Edin Salkovic <[EMAIL PROTECTED]> wrote: > On 2/14/07, Paul Barrett <[EMAIL PROTECTED]> wrote: > > and second reply: > > > > If my memory ser ves me correctly - or if the implementation has > > changed over the past few years - get_charmap() is a wrapper

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

2007-02-16 Thread Edin Salkovic
On 2/14/07, Paul Barrett <[EMAIL PROTECTED]> wrote: > and second reply: > > If my memory ser ves me correctly - or if the implementation has > changed over the past few years - get_charmap() is a wrapper on the > FreeType method. FreeType had no reverse mapping and creating one may > have caused p

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

2007-02-15 Thread Evgeniy Stepanov
On Thursday 15 February 2007 21:41, Nicolas Grilly wrote: > On 2/14/07, Paul Barrett <[EMAIL PROTECTED]> wrote: > > My first reply: > > > > I suggest that this patch not be applied, since this was the intended > > behavior when the font manager was implemented. The standard behavior > > for indic

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

2007-02-15 Thread Nicolas Grilly
On 2/14/07, Paul Barrett <[EMAIL PROTECTED]> wrote: > My first reply: > > I suggest that this patch not be applied, since this was the intended > behavior when the font manager was implemented. The standard behavior > for indicating a missing character is to print a square. In addition, > if a s

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

2007-02-15 Thread Nicolas Grilly
> I don't remember why we did it this way originally, or if was you or I > who did it, but if it is correct that the mapping is sometimes many > codes point to one one glyph index, but there each glyph index must > point to a single character code (the latter must be correct, right?) > then reversi

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

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] [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, 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 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 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
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

[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