From: <jk...@ik...> - 2007-07-10 19:20:08
|
"John Hunter" <jd...@gm...> writes: > On 7/10/07, Michael Droettboom <md...@st...> wrote: > >> The comparison is just over the PDF files, old way (Truetype embedding) >> vs. new way (Type 3 subsetting). > > This must be dominated by some weird outliers. I'm seeing great > results with the canonical "simple_plot" > > -rw-r--r-- 1 johnh research 19352 Jul 10 12:11 new.ps > -rw-r--r-- 1 johnh research 144227 Jul 10 12:11 old.ps Probably the difference is just that you are comparing PS files while Michael was comparing PDF files, where the internal gzip compression reduces the file size. Even in PDF files you can get large gains if you use several different fonts (which can easily happen with math formulas) or you have very big fonts (such as some fonts that come with Mac OS X). I'm seeing a bug on OS X, whose file system is by default case-preserving but not case-sensitive: 458 -> fontdictObject = self.embedTTF( 459 filename, self.used_characters[filename]) Here self.used_characters has a key starting with '/Users/jks/...' but filename is '/users/jks/...'. I'm not sure how to fix this cleanly. I though os.path.normcase would help, but it doesn't: >>> normcase('/users'); normcase('/Users') '/users' '/Users' > In any case, excellent work! Yes, very good! This is a much-needed feature for the PS and PDF backends. -- Jouni K. Seppänen http://www.iki.fi/jks |