-------- Original Message --------
Subject: Re: How to find out why fop needs a certain font?
Date: Thu, 20 Dec 2012 23:32:04 +0000
From: Luis Bernardo <lmpmberna...@gmail.com>
To: Alexey Neyman <sti...@att.net>
With SVG, fonts are more complicated. The font used in the SVG needs to
be installed in the system and needs to be configured in fop.xconf too.
The warning you got usually happens when the font is in the system but
not configured in fop.xconf, which looking at your example does not seem
to be the case...
If you want to get to the bottom of the matter please indicate what
version of fop you are using and what OS. Also, the use of metrics-url
is not needed anymore (and is not recommended) so you can remove that. I
see you refer to the font file TimesNewRoman.ttf without specifying a
font-base path (which only works if you have the file in the same
directory you have your *.fo file). Is that font file an exact copy of
the installed font in the system of the same name?
On 12/20/12 6:44 PM, Alexey Neyman wrote:
Hi Luis,
No, it is not the case. In the FO I am using, fo:root has a font-family
specified, and that font family is described in the fop.cfg.
Actually, I traced this warning down to the watermark image specified for
the background. However, that SVG does not refer to 'Serif' font, either. Can
somebody please explain how does FOP treat the fonts in the included SVG
files?
I even tried to add a substitution from font-family="Serif" to font-
family="Times New Roman", it did not help either.
Here is the reduced FO file that exhibits the issue:
[[[
<?xml version="1.0"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="Times New
Roman">
<fo:layout-master-set>
<fo:simple-page-master master-name="draft">
<fo:region-body background-image="url(draft.svg)"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="draft">
<fo:flow flow-name="xsl-region-body">
<fo:block/>
</fo:flow>
</fo:page-sequence>
</fo:root>
]]]
And here is the draft.svg:
[[[
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="80 80 600 600"
version="1.1" width="5in" height="5in">
<text font-weight="normal" xml:space="preserve"
transform="matrix(0.70710678,-0.70710678,0.70710678,0.70710678,0,0)"
font-size="250px" y="640" x="-315" font-family="'Times New Roman'"
fill="#f2f2f2">Draft</text>
</svg>
]]]
And fop.cfg:
[[[
<?xml version="1.0"?>
<fop version="1.0">
<renderers>
<renderer mime="application/pdf">
<fonts>
<font kerning="yes" metrics-url="TimesNewRoman.metric" embed-
url="TimesNewRoman.ttf">
<font-triplet name="Times New Roman" weight="normal"
style="normal"/>
</font>
</fonts>
</renderer>
</renderers>
</fop>
]]]
Regards,
Alexey.
On Wednesday, December 19, 2012 04:45:31 pm Luis Bernardo wrote:
This is of no consequence although is it puzzling at first. If you
specify a global font-family in the fo root element I think the warning
goes away. I think what you are seeing has been discussed here:
http://apache-fop.1065347.n5.nabble.com/ZapfDingbats-and-Symbol-not-found-w
hereas-they-are-not-needed-td31330.html
On 12/19/12 11:05 PM, Alexey Neyman wrote:
Hi all,
I see the following warning message reported by FOP:
$ fop -c fop.cfg -dpi 150 apiguide.fo apiguide.pdf
Dec 19, 2012 2:59:02 PM org.apache.fop.events.LoggingEventListener
processEvent
WARNING: Font "Serif,normal,400" not found. Substituting with
"any,normal,400".
...
However, apiguide.fo does not contain any references to 'serif' font:
$ grep -i serif apiguide.fo
$
Why does FOP need 'Serif' font? Is there some built-in expectation that
'Serif' font must be always available?
Regards,
Alexey.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org