freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Devel] PDF Font embedding


From: Leonard Rosenthol
Subject: Re: [Devel] PDF Font embedding
Date: Sun, 21 Mar 2004 08:36:02 -0500

At 02:58 AM 3/21/2004, Salman Khilji wrote:
"I wrote for my former employer the code for using FreeType to get the
information necessary to embed fonts in PDF files.  I've been meaning to
rewrite it and add it to the FreeType distro"

I was wondering if this work is available as this is precisely what I would
like to do.

I am aware of at least two existing open source projects that use FT as part of the PDF generation code, as well as many other commercial solutions. However, in both cases, they only perform full embedding of the fonts and not subsetting.

In fact, I just completed a new PDF "font engine" myself PARTIALLY based on FT...The reason for partially is the comment above - FT doesn't provide enough information to the caller to be able to do font subsetting :(. So in my case, I use FT to load fonts, get metrics, get outlines (for text->outline conversion), and rendering - BUT I also have a completely different code path for when I do subsetting. (which is actually kind of funny, since after the font data is subset, the subset font goes back into FT for embedding ;).


I am working on an open source C++ based PDF library (similar to iText Java
PDF library).

As the official commercial licensor of iText - I'd LOVE to see a C++ port of iText!!! Please let me/us know of the URL for your project when it gets to that point...And I'd be happy to help out.


While I thought about "stealing" the font parsing,/subsetting code from iText
and simply porting it to C++, I think using FreeType may be better.

If all you want to do is get enough font information for text layout and font embedding/subsetting - Paulo's code in iText is top notch! I've ported parts of it myself for use in my project.

However, there is nothing in iText today for rendering or outline retrieval - it doesn't deal with those pieces of the font data. So if you want/need those - you'll want FT!


Leonard
---------------------------------------------------------------------------
Leonard Rosenthol                            <mailto:address@hidden>
Chief Technical Officer                      <http://www.pdfsages.com>
PDF Sages, Inc.                              215-629-3700 (voice)
                                             215-629-0789 (fax)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]