On Thu, 2009-07-23 at 02:02 +0200, Martin Schröder wrote: > > Fonts. I did a quick modification to the concept of the hello world > > example that takes an existing PDF and adds some text to it. The size > > of the PDF file tripled for a short line of text. I am assuming this > > is because I embedded a new font when I added the text. If this is not > > true... maybe this doesn't matter so much. Anyways, is there a way to > > get the font(s) that are already embedded in a existing PDF and reuse > > them? > > If you intend to use a lot of of fonts (or want to include pdfs with > fonts), you should look at pdftex/luatex. We've spent years on getting > subsetting etc. right, especially with included pdfs.
PdfTex is full GPL, isn't it? Pity (as far as I'm concerned) since that means we can't re-use or library-ify any of the font parsing and subsetting code unless that code is explicitly re-licensed to dual GPL/LGPL by its author(s) :S I'm increasingly irritated by the lack of a good standalone open source library for font subsetting and parsing. Freetype is designed to make it hard to get at the guts of it for this sort of use, and it's not really built to handle subsetting and such anyway. I'd really like to move toward a shared library for font subsetting for cairo, pdftex, Scribus, PoDoFo, etc, but feel somewhat hobbled by the full-GPL-only nature of most of the existing subsetting implementations. > PS: I'm not dissing PoDoFo - these are simply areas where other > applications already deliver what's needed. I think people need to be less defensive about their software ;-) There are _often_ cases where others' is a better fit for somebody's needs than one's own. For example, PoDoFo's design makes it good for low-level PDF inspection and editing and for the creation of PDFs with complex or custom constructs that higher level tools may not understand or support. On the other hand, both in design and in current implementation state it's not ideal for simple generation of new PDF documents, it's a terrible choice for high level typesetting and layout, and it's not great at working with fonts. I'll recommend Cairo over PoDoFo for a bunch of uses. I don't have much experience with pdftex, but even so it'd be one of the first things that'd come to mind for document processing needs (gee, surprising that). I didn't even know about luatex - but it seems like a pretty good idea. Lua is a good choice of language, too. I've had enough experience working with one common/popular embedding language, Python, to know how shocking it is when you want to embed it. -- Craig Ringer ------------------------------------------------------------------------------ _______________________________________________ Podofo-users mailing list Podofo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/podofo-users