Michael Droettboom wrote:
> [I've been discussing this off-list with John Hunter, and I thought I'd 
> summarize that conversation in case anyone else on this list has any 
> thoughts or suggestions.]
> 
> I've started working on the problem of reducing Postscript output file 
> sizes by saving out only the glyphs that are used in the figure.  There 
> are (at least) two alternative approaches:
> 
> 1. Subset the Truetype font into another Truetype font and embed it as 
> we do now.  This could theoretically be done with fonttools/ttx.  
> Writing out .ttf files looks to be rather complex, and there's a lot of 
> griping about the format itself to be found on the 'net.  John also 
> mentioned that he'd prefer not to add the requirement of fonttools to 
> the mix from past experience.
> 
> 2. Convert the Truetype font to a Type 3 font (which is basically a set 
> of standard Postscript commands).  There is a small C application 
> (http://www.this.net/~frank/ttconv.tar.gz) that converts TTF to Type 3 
> that looks to work quite well.  Some modifications would have to be made 
> to actually subset the font and to integrate with Python etc., but it's 
> fairly straightforward code, and the licensing is amenable to including 
> it in the matplotlib source tree.
> 
> Clearly, I'm leaning toward option #2, but thought I'd open it to the 
> crowd to see if there are any other options or opinions on the matter.

I'm very glad to hear that you are working on this, and option #2 sounds 
good to me.  Is the potential advantage of #1 better ultimate rendering 
quality?  Or smaller file size?

It looks like fonttools has been untouched since 2002, correct?

> 
> The plan is to make the choice of the existing or new behavior be an 
> option, with the default TBD.

Is there any reason *not* to do the subsetting?

Eric
> 
> Cheers,
> Mike

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to