xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthias Reischenbacher <matthias8...@gmx.at>
Subject Re: Symbol and Wingdings Font support
Date Fri, 05 Mar 2010 18:43:40 GMT
Hi Jeremias,

>> 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
> automatically.
>
> [1]<HOME>/.fop/fop-fonts.cache

Thanks for the tip, that was the problem also in my case.

>> 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.

Using &#xF057; did work as you said. Actually I had inserted the unicode 
character myself. The original SVG file contained the letter "W" instead 
of the unicode character. Would it be possible (and valid) to map the 
letter to its representation in the Symbol font? Doing this actually 
works inside fo:block, but I'm aware of what you said in your last post 
about the differences in font handling between Batik and FOP.

Thanks for you help!

Regards,
Matthias Reischenbacher

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


Mime
View raw message