Re: [matplotlib-devel] Question about ft2font.get_charmap

2006-11-05 Thread Paul Barrett
On 11/5/06, Nicolas Grilly <[EMAIL PROTECTED]> wrote: > In module ft2font, the method FT2Font.get_charmap returns a dict that > maps glyph indices to char codes. > > I don't understand the purpose of this mapping, and why the method > doesn't return the reverse mapping, i.e. char codes mapped to gl

Re: [matplotlib-devel] PDF backend

2006-11-05 Thread John Hunter
> "Jouni" == Jouni K Seppanen <[EMAIL PROTECTED]> writes: Jouni> OK. Was it just that you don't want to require mpl users to Jouni> install fonttools, or were there other problems with it? One problem was that it was large compared to mpl at the time, and mpl was pure python. So it c

Re: [matplotlib-devel] PDF backend

2006-11-05 Thread Jouni K Seppanen
John Hunter <[EMAIL PROTECTED]> writes: > FYI, matplotlib used to depend on fonttools, but we found the > dependency too onerous and booted it and wrote our own, lighter > freetype support. So I would be reluctant to reintroduce this > dependency. OK. Was it just that you don't want to require m

Re: [matplotlib-devel] A question about cbook.is_string_like

2006-11-05 Thread Jouni K Seppanen
"Nicolas Grilly" <[EMAIL PROTECTED]> writes: [about is_string_like] > But in this function, I don't like the idea to try an operation on a > string, and wait for an exception in order to know if we really have a > string or not. It's not very efficient, nor very beautiful. I wouldn't worry about

Re: [matplotlib-devel] PDF backend

2006-11-05 Thread John Hunter
> "Jouni" == Jouni K Seppanen <[EMAIL PROTECTED]> writes: Jouni> able to do font subsetting. I was going to look into the Jouni> Fonttools library by Just van Rossum, but lately I've been Jouni> too busy with other things to. FYI, matplotlib used to depend on fonttools, but we fou

[matplotlib-devel] PDF backend (was: A question about cbook.is_string_like)

2006-11-05 Thread Jouni K Seppanen
Andrew Straw <[EMAIL PROTECTED]> writes: > When I get back to that manuscript (ahem), I'll probably try to bang > the PDF backend further into shape. What bits need to be > added/fixed? Is the PDF backend TODO list documented anywhere? > where? The TODO list is in the comments of backend_pdf.py:

[matplotlib-devel] Question about ft2font.get_charmap

2006-11-05 Thread Nicolas Grilly
In module ft2font, the method FT2Font.get_charmap returns a dict that maps glyph indices to char codes. I don't understand the purpose of this mapping, and why the method doesn't return the reverse mapping, i.e. char codes mapped to glyph indices. For example, in backend_ps.py, line 754, the char

Re: [matplotlib-devel] A question about cbook.is_string_like

2006-11-05 Thread John Hunter
> "Nicolas" == Nicolas Grilly <[EMAIL PROTECTED]> writes: Nicolas> But in this function, I don't like the idea to try an Nicolas> operation on a string, and wait for an exception in order Nicolas> to know if we really have a string or not. It's not very Nicolas> efficient, nor v

Re: [matplotlib-devel] A question about cbook.is_string_like

2006-11-05 Thread John Hunter
> "Andrew" == Andrew Straw <[EMAIL PROTECTED]> writes: Andrew> BTW, what's the "official" status of the PDF backend? Last Andrew> I checked (a month or so ago), it seemed to work fine, has Andrew> a couple of Python 2.4-isms, but was generally great. I Andrew> was surprised tha

Re: [matplotlib-devel] A question about cbook.is_string_like

2006-11-05 Thread Nicolas Grilly
On 11/5/06, Andrew Straw <[EMAIL PROTECTED]> wrote: > BTW, what's the "official" status of the PDF backend? Last I checked (a > month or so ago), it seemed to work fine, has a couple of Python > 2.4-isms, but was generally great. I was surprised that it didn't appear > to make it onto the list of o

Re: [matplotlib-devel] A question about cbook.is_string_like

2006-11-05 Thread Nicolas Grilly
Hi Andrew, Andrew Straw <[EMAIL PROTECTED]> wrote: > I'm not speaking with the authority of one who actually wrote the > function or uses it, so I don't know the specific reasons, if there are > any. However, this kind of thing is common (and encouraged) practice in > Python. It's a use of "duck t

Re: [matplotlib-devel] A question about cbook.is_string_like

2006-11-05 Thread Nicolas Grilly
Hi Gaƫl, Gael Varoquaux <[EMAIL PROTECTED]> wrote: > I am all for a good PDF backend, but you should be aware that under > unices you can tell matplotlib to use a distiller, as illustrated in: > http://www.mail-archive.com/matplotlib-devel@lists.sourceforge.net/msg00160.html Yes, I know it's poss

Re: [matplotlib-devel] A question about cbook.is_string_like

2006-11-05 Thread Gael Varoquaux
On Sun, Nov 05, 2006 at 09:27:54AM -0800, Andrew Straw wrote: > When I get back to that manuscript (ahem), I'll probably try to bang > the PDF backend further into shape. That would be great for pdf generation under windows, where you can hardly assume the user has xpdf or epstopdf installed. It h

Re: [matplotlib-devel] A question about cbook.is_string_like

2006-11-05 Thread Andrew Straw
Gael Varoquaux wrote: > On Sun, Nov 05, 2006 at 06:07:50PM +0100, Nicolas Grilly wrote: > >> I'm hacking the PDF backend because I need this format to import >> charts in ConTeXt (this is TeX macro package, similar to LaTeX, we use >> to produce PDF reports). >> > > I am all for a good PDF

Re: [matplotlib-devel] A question about cbook.is_string_like

2006-11-05 Thread Gael Varoquaux
On Sun, Nov 05, 2006 at 06:07:50PM +0100, Nicolas Grilly wrote: > I'm hacking the PDF backend because I need this format to import > charts in ConTeXt (this is TeX macro package, similar to LaTeX, we use > to produce PDF reports). I am all for a good PDF backend, but you should be aware that under

[matplotlib-devel] A question about cbook.is_string_like

2006-11-05 Thread Nicolas Grilly
Hello everybody, I'm in the process of replacing R by matplotlib to plot all of our charts. I'm hacking the PDF backend because I need this format to import charts in ConTeXt (this is TeX macro package, similar to LaTeX, we use to produce PDF reports). My first question, very basic, is why funct