Eric Firing wrote: > Michael Droettboom wrote: >> 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? Potentially on both counts. Hinting will not be converted, and since TT and PS have slightly different rendering models, there is the potential for rounding error etc. (though I don't know how real of a problem that is.) Also, Type 3 is an ASCII format, so if the file weren't subsetted, the size would certainly be larger. So a lot depends on the ratio of glyphs in the original font to glyphs in the figure, obviously. Of course, we could have an "auto" mode, where whichever is ultimately smaller is written out. > > It looks like fonttools has been untouched since 2002, correct? I wasn't able to find anything newer either. > >> >> 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? If hinting is a requirement, yes, if the PS file is to be used on a lo-res printer or screen. Somewhat of a side case, maybe.
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