xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vincent Hennebert <vhenneb...@gmail.com>
Subject Re: Missing Font for SVG to PDF Output
Date Tue, 19 Apr 2011 10:07:45 GMT
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


Mime
View raw message