You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Tom Browder <to...@gmail.com> on 2011/04/14 01:33:57 UTC

Missing Font for SVG to PDF Output

I have been happily using fop 1 (Linux, Ubuntu, x86_64) with my custom
fonts for some time and have had no problems using my Linux Libertine
and Biolinum fonts (ttf format).  Now I have started using svg for
equations and am having some problems.

First I started getting some mysterious font families mentioned in the
fop output while generating pdf, to wit:

Apr 13, 2011 4:09:16 PM org.apache.fop.events.LoggingEventListener processEvent
WARNING: Glyph "?" (0x2264, lessequal) not available in font "Helvetica".

I kept adding new substitutions to the <substtutions/> element in my
FOP configuration file until I eliminated all such warnings.

My remaining problem is the equation's italic text is still rendered
as sans-serif instead of serif as desired!

I understand there is some issue with fonts for Batik versus fop, but
I have ensured my Libertine font is in the system fontconfig so I
assume a disconnect between fop and batik is not the problem (but I
don't know that is true).

I can get the desired font on output if I simplify my equation some
but I can see no reason why that is so.

Does anyone have any suggestions?

Thanks so much.

-Tom

Thomas M. Browder, Jr.
Niceville, Florida
USA

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


Re: Missing Font for SVG to PDF Output

Posted by Tom Browder <to...@gmail.com>.
On Tue, Apr 19, 2011 at 05:07, Vincent Hennebert <vh...@gmail.com> wrote:
...
> Make sure that the family name you declare in fop.xconf matches the name
> under which the font is known on the system.
>
> Let’s take the font ‘Linux Libertine’ as an example. Java would know
> this font under that name. Since Batik uses the Java font system, it
> will also use that name and pass it on to FOP. So you must have
> a font-triplet in your fop.xconf that matches that name:
>    <font embed-url="libertine.ttf">
>      <font-triplet name="Linux Libertine" style="normal" weight="normal"/>
>    </font>
>
> If you use something else, FOP will find no match for ‘Linux Libertine’
> and will fall back to a default font.
>
> You can use the java.awt.GraphicsEnvironment.getAvailableFontFamilyNames
> method to know under which names Java registers the fonts on your
> system. Of course, be sure to also use those names in the SVG file.

Vincent, thanks.

I had already fixed the problem by reverting to a font that was known
to all by the same name, but your explanation helps clear up why the
problem was there in the first place.  I had played shorthand games
with the the Libertine font and that's what got me in trouble.

Best regards,

-Tom

Thomas M. Browder, Jr.
Niceville, Florida
USA



>
>
> On 14/04/11 00:33, Tom Browder wrote:
>> I have been happily using fop 1 (Linux, Ubuntu, x86_64) with my custom
>> fonts for some time and have had no problems using my Linux Libertine
>> and Biolinum fonts (ttf format).  Now I have started using svg for
>> equations and am having some problems.
>>
>> First I started getting some mysterious font families mentioned in the
>> fop output while generating pdf, to wit:
>>
>> Apr 13, 2011 4:09:16 PM org.apache.fop.events.LoggingEventListener processEvent
>> WARNING: Glyph "?" (0x2264, lessequal) not available in font "Helvetica".
>>
>> I kept adding new substitutions to the <substtutions/> element in my
>> FOP configuration file until I eliminated all such warnings.
>>
>> My remaining problem is the equation's italic text is still rendered
>> as sans-serif instead of serif as desired!
>>
>> I understand there is some issue with fonts for Batik versus fop, but
>> I have ensured my Libertine font is in the system fontconfig so I
>> assume a disconnect between fop and batik is not the problem (but I
>> don't know that is true).
>>
>> I can get the desired font on output if I simplify my equation some
>> but I can see no reason why that is so.
>>
>> Does anyone have any suggestions?
>>
>> Thanks so much.
>>
>> -Tom
>>
>> Thomas M. Browder, Jr.
>> Niceville, Florida
>> USA
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>

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


Re: Missing Font for SVG to PDF Output

Posted by Vincent Hennebert <vh...@gmail.com>.
Hi Tom,

Make sure that the family name you declare in fop.xconf matches the name
under which the font is known on the system.

Let’s take the font ‘Linux Libertine’ as an example. Java would know
this font under that name. Since Batik uses the Java font system, it
will also use that name and pass it on to FOP. So you must have
a font-triplet in your fop.xconf that matches that name:
    <font embed-url="libertine.ttf">
      <font-triplet name="Linux Libertine" style="normal" weight="normal"/>
    </font>

If you use something else, FOP will find no match for ‘Linux Libertine’
and will fall back to a default font.

You can use the java.awt.GraphicsEnvironment.getAvailableFontFamilyNames
method to know under which names Java registers the fonts on your
system. Of course, be sure to also use those names in the SVG file.

HTH,
Vincent


On 14/04/11 00:33, Tom Browder wrote:
> I have been happily using fop 1 (Linux, Ubuntu, x86_64) with my custom
> fonts for some time and have had no problems using my Linux Libertine
> and Biolinum fonts (ttf format).  Now I have started using svg for
> equations and am having some problems.
> 
> First I started getting some mysterious font families mentioned in the
> fop output while generating pdf, to wit:
> 
> Apr 13, 2011 4:09:16 PM org.apache.fop.events.LoggingEventListener processEvent
> WARNING: Glyph "?" (0x2264, lessequal) not available in font "Helvetica".
> 
> I kept adding new substitutions to the <substtutions/> element in my
> FOP configuration file until I eliminated all such warnings.
> 
> My remaining problem is the equation's italic text is still rendered
> as sans-serif instead of serif as desired!
> 
> I understand there is some issue with fonts for Batik versus fop, but
> I have ensured my Libertine font is in the system fontconfig so I
> assume a disconnect between fop and batik is not the problem (but I
> don't know that is true).
> 
> I can get the desired font on output if I simplify my equation some
> but I can see no reason why that is so.
> 
> Does anyone have any suggestions?
> 
> Thanks so much.
> 
> -Tom
> 
> Thomas M. Browder, Jr.
> Niceville, Florida
> USA
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 

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