Hi,

Am 14.01.2013 12:21, schrieb Brendan Jurd:
On 14 January 2013 18:26, Andreas Lehmkuehler <[email protected]> wrote:
OK, it seems to be your environment. Let me guess you are using OpenJDK7,
aren't you?

Partially correct.  OpenJDK yes, but 6 rather than 7.

I'm experiencing some issues with fonts after installing fedora
17
which comes with an OpneJDK7. I've switched to the "official" oracle jdk7
and
everything works as expected.

Right.  That might explain why I could see the text on Windows -- that
machine was on sun-jdk and both Gentoo and Ubuntu were on openjdk.
Any leads on how the choice of VM is affecting fonts in pdfbox?  Is
there a workaround?
Not that I know

As I mentioned in the OP, the PDFRenderer library does manage to
render the text with openjdk (and it copes with embedded TTF subsets
too).  Unfortunately it isn't isn't suitable for my project because it
doesn't handle group 4 TIFFs, and the developers seem to have lost
interest in the project.  Would it be useful/practical to look at how
they have handled fonts, and do something similar?
PDFBox relies on the JDK when it comes to render fonts and there are several
issue to do so. Subsets of TTFs aren't wellformed according to the TTF spec
and are rejected by the JDK font loader. Additionally there are some other
limitations/bugs in the loader which lead to the more or less poor results.
Good news is we are working on a JDK independent solution. The idea is to
extract the glyph information to render the font. But it is not that easy
and still takes some time, see [1] for further details.
BTW: AFAIK other PDF libraries are using a similar implementation.

Cheers,
BJ


BR
Andreas Lehmkühler

[1] https://issues.apache.org/jira/browse/PDFBOX-490

Reply via email to