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: ZapfDingbats in svg (fo:instream-foreign-object)
Date Tue, 08 Apr 2008 10:17:51 GMT
Executive summary (because the stuff below is a technical): As a
work-around, use "Arial Unicode MS" or another TrueType font that's
installed on your system and contains the dingbat characters.

Interesting case. The SVG text painting is all new for FOP 0.95beta.
Zapf Dingbats used to be painted as a shape (rather than text). I've
read somewhere that the Sun JVM uses its own Lucida font to paint dingbat
characters but it appears that only a subset is available. What font was
used exactly in 0.94 to paint the dingbats I don't know.

Now in 0.95beta, the PDFTextPainter tries to paint all text as text but
in the case of ZapfDingbats (which I didn't test it appears) this
approach hits a limitation of the JVM perhaps. At any rate, on my
Windows XP the Sun JVM (1.4, 1.5 and 6) does not list Zapf Dingbats in
its font list and that's the precondition for the font to work inside
SVG (because Batik relies on that).

String[] fonts = GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames();
for (int i = 0, c = fonts.length; i < c; i++) {

Zapf Dingbats is usually not installed on a Windows XP so I installed it
manually. But that didn't even help. The Sun JVM seems to be ignoring
Zapf Dingbats, even if I put it under jre/lib/fonts. Maybe that's
because it's a symbolic font.

Anyway, I didn't manage to get Java to recognize ZapfDingbats so I
looked for alternatives. Fonts like Arial Unicode MS or DejaVu Sans have
the necessary glyphs.

The alternative is to tell the PDF SVG support to paint the text as
shapes which is suboptimal. Anyway, that can be done in the config file:
<renderer mime="application/postscript">
  <xml-handler namespace="http://www.w3.org/2000/svg">


On 08.04.2008 10:17:45 Pascal Sancho wrote:
> Hi list,
> I try to convert the simple attached FO file into PDF:
> A ZapfDingbats character (&#x2704;) enbedded in a SVG snippet.
> FOP 0.94: I get cissors (expected)
> FOP 0.95b and FOP trunk (rev 645786): I get a '#' instead of cissors.
> Note that the character is correctly rendered when nested directly in a
> fo:block.
> Any idea?
> Pascal

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