xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremias Maerki <...@jeremias-maerki.ch>
Subject Re: Font naming and fonts used in SVG external graphics
Date Wed, 06 Feb 2008 19:52:48 GMT
On 06.02.2008 18:44:13 Justus-bulk wrote:
> > On 05.02.2008 20:26:55 Justus-bulk wrote:
> >
> >> - There seems to be an issue with Fop embedding fonts required by SVG:
> >>   Font names that both Batik and Fop process correctly are not
> >>   necessarily processed correctly by Fop if they occur in embedded
> >>   SVG.
> What could it be then?
> I do in fact run Linux. Let me know how I can help; are there any
> debugging options, or you might instrument the code with debug
> statements and send me diffs or a tarball so I can test it... Or maybe
> I'm doing something stupid?
> For kicks, I attach my fop-fonts.cache. Perhaps you find a clue
> there...

Actually, this is a good topic, one that I didn't think about. Please
delete the cache file and check if it gets any better. :-) Maybe there's
some unwanted side-effect after the update. Maybe we should include a
version number somehow so we can trigger an automatic garbage removal if
we have improvements in this area. Deleting the cache file is my first

If that does not already fix the problem:

If you want to do something on your side, I'd like to point you to

If you set a breakpoint in the findFonts() method you can see what Batik
uses internally. The possible mismatch between the O/S, Batik and FOP
comes from this: Batik mostly uses Java's font subsystem to work with
fonts. If we generate PDF we have to use PDF's infrastructure and the
Java2D fonts are not a good source for all the font data we need. That's
why we have our own font subsystem. Now, the findFonts() method tries to
map the OS/Java font to a font in FOP's font subsystem. If the names
and styles match, it works. If they don't, a fallback is used which
leads to the problems you describe. It would be helpful if you could
identify what's coming from Batik and what FOP's answer is.

You can also set the org.apache.fop.fonts logging category to FINE level
to see how FOP registers the fonts it finds.

Jeremias Maerki

To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org

View raw message