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: Symbol and Wingdings Font support
Date Fri, 05 Mar 2010 14:44:13 GMT
Hi Matthias

On 05.03.2010 15:22:02 Matthias Reischenbacher wrote:
> Hi,
> I've tested the new support for Symbol and Wingdings fonts with the 
> latest FOP trunk and wanted to share with you two observations:
> 1. In my fop config file font auto detection is enabled. Nevertheless 
> Wingdings and Symbol fonts are not automatically detected inside the 
> Windows Fonts folder. I had to copy the .ttf files inside the folder 
> where my font base url is pointing to 
> (fopFactory.getFontManager().setFontBaseURL()). Then it worked just 
> fine. Generating the font metrics was not necessary and neither did I 
> have to declare the fonts explicitly in the fop config file.

I noticed something similar myself lately. Took me hours to track down.
In the end, it was this: FOP's font cache file [1] was still carrying
the information that Symbol and Wingdings have not been loaded
successfully (with the previous FOP version). That's why FOP won't load
the font. Once you delete the cache file I expect FOP to find the two
fonts in the Windows Fonts folder. Maybe I should have changed the
serialization version number for the font cache so it is deleted

[1] <HOME>/.fop/fop-fonts.cache

> 2. I've also tried to use the Symbol font inside SVGs, especially with 
> the Ohm-character. But the Ohm-character is not displayed correctly 
> because a fallback is done to Helvetica. That's strange because when 
> inserting the ohm-Symbol as normal text inside a fo:block element it 
> worked without any problem. I'm attaching a sample SVG file. Could you 
> please tell me if I'm doing something wrong or if this is a FOP bug?

You're using the Ohm Glyph from Unicode: &#x2126; But FOP does not
currently map the Symbol TTF font into the right Unicode codepoints
where possible (we'd probably need a heuristic for that). Instead
everything is mapped into F020 to F0FF and 0020 to 00FF. I expect
&#xF057; to work for the Ohm symbol. Not optimal, I know. Using 2126
with the Arial Unicode MS should work, though.

Please note, that Batik (SVG) works a little differently from FOP
(XSL-FO) in the font area. We've tried to get as much equal behaviour as
possible but there are limits. As a rule of thumb, fonts to be used
inside SVG need to be installed both with FOP and with the operating
system (so AWT/Java2D has it available).

> Thanks & Regards,
> Matthias Reischenbacher

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