[cairo] Type1 subsetting code enabled
Kristian Høgsberg
krh at bitplanet.net
Thu May 18 23:41:26 PDT 2006
Hello,
I finally figured out the last couple of corner cases of the Type1
font format and was able to complete the handling of composite glyphs.
With that in place, I believe the Type1 subsetting code is pretty
solid and I'm now of the opinion that we should probably just enable
it for 1.2 too. It's sitting in the type1-subsetting branch in my
cairo repository:
http://gitweb.freedesktop.org/?p=users-krh-cairo;a=log;h=type1-subsetting
This is branched off of the truetype-subsetting branch so in case we
decide to hold off on the type1 subsetting, it's easy to just only
pull the truetype code.
Remaining issues with the Type1 code:
- like the truetype code, this code was written for a different
subsetting framework, and could benefit from a simplification /
cleanup
- many type1 glyphs use subroutines for drawing common parts of the
outline and for many type1 fonts, most of the data is actually in the
subroutine section of the font. The current code doesn't touch the
subroutine section at all, but it should probably prune unused
subroutines from the font for further space savings.
- as for the truetype and type3 case, we output a subset for every
scale of the font used by the document; clearly not optimal.
- both the truetype and type1 subsetting code depend on freetype, but
at this point dependencies are very superficial and it wouldn't take
much to make both just work with the raw font data instead, which
should make it possible to have the code work with other font
backends... I think... I'm not sure what win32 and atsui can provide.
I put up a couple of test documents here:
http://people.freedesktop.org/~krh/yow.pdf
http://people.freedesktop.org/~krh/yow.ps
cheers,
Kristian
More information about the cairo
mailing list