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 pverdret <ph...@xgs-france.com> on 2006/08/18 11:20:47 UTC
Problem for registering new fonts with FOP (svn-trunk)
I'm unable to register new fonts with FOP (svn-trunk).
The metrics file are generated with this command line:
""java" -cp "C:\Documents and
Settings\pverdret\workspace\FOP\build\fop.jar;C:\Documents and Setti
ngs\pverdret\workspace\FOP\build\fop-sandbox.jar;C:\Documents and
Settings\pverdret\workspace\FOP\bu
ild\fop-hyph.jar;C:\Documents and
Settings\pverdret\workspace\FOP\lib\xml-apis-1.3.02.jar;C:\Documen
ts and Settings\pverdret\workspace\FOP\lib\xercesImpl-2.7.1.jar;C:\Documents
and Settings\pverdret\w
orkspace\FOP\lib\xalan-2.7.0.jar;C:\Documents and
Settings\pverdret\workspace\FOP\lib\serializer-2.7
.0.jar;C:\Documents and
Settings\pverdret\workspace\FOP\lib\batik-all-1.6.jar;C:\Documents and Setti
ngs\pverdret\workspace\FOP\lib\xmlgraphics-commons-1.1-snapshot.jar;C:\Documents
and Settings\pverdr
et\workspace\FOP\lib\avalon-framework-4.2.0.jar;C:\Documents and
Settings\pverdret\workspace\FOP\lib
\commons-io-1.1.jar;C:\Documents and
Settings\pverdret\workspace\FOP\lib\commons-logging-1.0.4.jar;C
:\Documents and
Settings\pverdret\workspace\FOP\lib\jimi-1.0.jar;C:\Documents and
Settings\pverdret\
workspace\FOP\lib\jai_core.jar;C:\Documents and
Settings\pverdret\workspace\FOP\lib\jai_codec.jar;C:
\Documents and Settings\pverdret\workspace\FOP\lib\fop-hyph.jar;"
org.apache.fop.fonts.apps.TTFRead
er -enc ansi C:/WINNT/fonts/ARIAL.TTF templates/ARIAL.xml
TTF Reader for Apache FOP svn-trunk
Parsing font...
Reading C:/WINNT/fonts/ARIAL.TTF...
Number of glyphs in font: 1674
3 cmap tables
CMAP format: 4
Creating xml font file...
Creating WinAnsi encoded metrics...
Writing xml font file templates\ARIAL.xml...
This font contains no embedding license restrictions.
XML font metrics file successfully created.
In my configuration file i've added the following lines:
<font metrics-url="file:///e:/3CO/templates/Arial.xml" kerning="yes"
embed-url="file:///c:/WINNT/fonts/Arial.ttf">
<font-triplet name="Arial" style="normal" weight="normal"/>
</font>
Here is an excerpt of FO test file:
<fo:inline font-family="Arial" font-weight="normal" font-style="normal">
Arial-normal-normal font
</fo:inline>
I use the following command line for my test:
$ bin/fop.bat -v -x -c templates/3co.xml -fo test_arial.fo -pdf 1.pdf
"java" -cp "C:\Documents and
Settings\pverdret\workspace\FOP\build\fop.jar;C:\Documents and Settin
gs\pverdret\workspace\FOP\build\fop-sandbox.jar;C:\Documents and
Settings\pverdret\workspace\FOP\bui
ld\fop-hyph.jar;C:\Documents and
Settings\pverdret\workspace\FOP\lib\xml-apis-1.3.02.jar;C:\Document
s and Settings\pverdret\workspace\FOP\lib\xercesImpl-2.7.1.jar;C:\Documents
and Settings\pverdret\wo
rkspace\FOP\lib\xalan-2.7.0.jar;C:\Documents and
Settings\pverdret\workspace\FOP\lib\serializer-2.7.
0.jar;C:\Documents and
Settings\pverdret\workspace\FOP\lib\batik-all-1.6.jar;C:\Documents and
Settin
gs\pverdret\workspace\FOP\lib\xmlgraphics-commons-1.1-snapshot.jar;C:\Documents
and Settings\pverdre
t\workspace\FOP\lib\avalon-framework-4.2.0.jar;C:\Documents and
Settings\pverdret\workspace\FOP\lib\
commons-io-1.1.jar;C:\Documents and
Settings\pverdret\workspace\FOP\lib\commons-logging-1.0.4.jar;C:
\Documents and Settings\pverdret\workspace\FOP\lib\jimi-1.0.jar;C:\Documents
and Settings\pverdret\w
orkspace\FOP\lib\jai_core.jar;C:\Documents and
Settings\pverdret\workspace\FOP\lib\jai_codec.jar;C:\
Documents and Settings\pverdret\workspace\FOP\lib\fop-hyph.jar;"
org.apache.fop.cli.Main -v -x -c te
mplates/3co.xml -fo test_arial.fo -pdf 1.pdf
FOP Version svn-trunk
[INFO] FOP - Input mode:
[INFO] FOP - FO
[INFO] FOP - fo input file: test_arial.fo
[INFO] FOP - Output mode:
[INFO] FOP - application/pdf
[INFO] FOP - output file: 1.pdf
[INFO] FOP - OPTIONS
[INFO] FOP - user configuration file: templates\3co.xml
[WARN] FontInfo - Font 'Arial,normal,400' not found. Substituting with
default font.
[WARN] FontInfo - Font 'ArialNarrow,normal,400' not found. Substituting with
default font.
Thank for your help,
--
Philippe Verdret
--
View this message in context: http://www.nabble.com/Problem-for-registering-new-fonts-with-FOP-%28svn-trunk%29-tf2126206.html#a5866467
Sent from the FOP - Users forum at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Problem for registering new fonts with FOP (svn-trunk)
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
On 22.08.2006 11:22:53 pverdret wrote:
>
>
> Jeremias Maerki-2 wrote:
> >
> >
> > On 22.08.2006 10:42:03 pverdret wrote:
> >>
> >>
> >> Andreas L Delmelle wrote:
> >> >
> >> > On Aug 18, 2006, at 11:20, pverdret wrote:
> >> >
> >> > Hi,
> >> >
> >> >>
> >> >> I'm unable to register new fonts with FOP (svn-trunk).
> >> >> <snip />
> >> >> In my configuration file i've added the following lines:
> >> >>
> >> >>
> >> >> <font metrics-url="file:///e:/3CO/templates/Arial.xml" kerning="yes"
> >> >> embed-url="file:///c:/WINNT/fonts/Arial.ttf">
> >> >> <font-triplet name="Arial" style="normal" weight="normal"/>
> >> >> </font>
> >> >
> >> > Where did you add this line precisely?
> >> >
> >> > It needs to be added as a child node to the renderer, as described
> >> here:
> >> > http://xmlgraphics.apache.org/fop/0.92/configuration.html#renderers
> >> >
> >>
> >> I tested two possibilities: in the fop.xconf file, and in a specific
> >> configuration file. Both failed.
> >
> > That's not what Andreas asked. Please post the full configuration file.
> > That should make it easier.
> >
> >
> > Jeremias Maerki
> >
>
> The configuration file used with the -c option:
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
>
> <!-- TODO: use proper config -->
>
> <configuration>
>
> <fonts>
> <!-- TODO: use proper config -->
>
> <font metrics-url="file:///e:/3CO/templates/Arial.xml" kerning="yes"
> embed-url="file:///c:/WINNT/fonts/Arial.ttf">
> <font-triplet name="Arial" style="normal" weight="normal"/>
> </font>
>
> <font metrics-url="file:///e:/3CO/templates/ARIALN.xml" kerning="yes"
> embed-url="file:///c:/WINNT/fonts/ARIALN.ttf">
> <font-triplet name="ArialNarrow" style="normal" weight="normal"/>
> </font>
>
> </fonts>
>
> </configuration>
The above will certainly not work. The structure of the configuration
file has to be the one as shown in the fop.xconf below. The file below,
if used with the -c parameter, should work. I was able to make it work
when I adjusted the paths to my local setup.
> And the fop.xconf content:
>
> http://www.nabble.com/user-files/235713/fop.xconf fop.xconf
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Problem for registering new fonts with FOP (svn-trunk)
Posted by pverdret <ph...@xgs-france.com>.
Andreas L Delmelle wrote:
>
> On Aug 22, 2006, at 11:22, pverdret wrote:
>
> Hi,
>
> <snip />
>>
>> The configuration file used with the -c option:
>>
>> <?xml version="1.0" encoding="ISO-8859-1"?>
>>
>> <!-- TODO: use proper config -->
>>
>> <configuration>
>>
>> <fonts>
>
> That explains it. Have another look at this page and compare:
>
> http://xmlgraphics.apache.org/fop/0.92/configuration.html#renderers
>
> In FOP 0.92 and up, the fonts need to be added as children to the
> renderer configuration(s).
>
> <snip />
>
>>
>> And the fop.xconf content:
>
> Note that fop.xconf is not used by FOP, unless you were to specify it
> as the configuration file to be used on the command-line. It is
> provided as an example of what a typical configuration file looks like.
>
> Simplest solution: copy it, add your font-entries at the right
> location in there, then use the resulting file as configuration.
>
> Should work.
>
> HTH!
>
> Andreas
>
that works!
Many thanks,
Philippe
--
View this message in context: http://www.nabble.com/Problem-for-registering-new-fonts-with-FOP-%28svn-trunk%29-tf2126206.html#a5922817
Sent from the FOP - Users forum at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Problem for registering new fonts with FOP (svn-trunk)
Posted by Andreas L Delmelle <a_...@pandora.be>.
On Aug 22, 2006, at 11:22, pverdret wrote:
Hi,
<snip />
>
> The configuration file used with the -c option:
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
>
> <!-- TODO: use proper config -->
>
> <configuration>
>
> <fonts>
That explains it. Have another look at this page and compare:
http://xmlgraphics.apache.org/fop/0.92/configuration.html#renderers
In FOP 0.92 and up, the fonts need to be added as children to the
renderer configuration(s).
<snip />
>
> And the fop.xconf content:
Note that fop.xconf is not used by FOP, unless you were to specify it
as the configuration file to be used on the command-line. It is
provided as an example of what a typical configuration file looks like.
Simplest solution: copy it, add your font-entries at the right
location in there, then use the resulting file as configuration.
Should work.
HTH!
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Problem for registering new fonts with FOP (svn-trunk)
Posted by Chris Bowditch <bo...@hotmail.com>.
pverdret wrote:
>
>
> The configuration file used with the -c option:
The below file is an old format file which works with v0.20.5.
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
>
> <!-- TODO: use proper config -->
>
> <configuration>
>
> <fonts>
> <!-- TODO: use proper config -->
>
> <font metrics-url="file:///e:/3CO/templates/Arial.xml" kerning="yes"
> embed-url="file:///c:/WINNT/fonts/Arial.ttf">
> <font-triplet name="Arial" style="normal" weight="normal"/>
> </font>
<snip/>
> And the fop.xconf content:
If you are using FOP 0.9x then the -c option needs to refer to fop.xconf.
>
> http://www.nabble.com/user-files/235713/fop.xconf fop.xconf
>
> Philippe
>
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Problem for registering new fonts with FOP (svn-trunk)
Posted by pverdret <ph...@xgs-france.com>.
Jeremias Maerki-2 wrote:
>
>
> On 22.08.2006 10:42:03 pverdret wrote:
>>
>>
>> Andreas L Delmelle wrote:
>> >
>> > On Aug 18, 2006, at 11:20, pverdret wrote:
>> >
>> > Hi,
>> >
>> >>
>> >> I'm unable to register new fonts with FOP (svn-trunk).
>> >> <snip />
>> >> In my configuration file i've added the following lines:
>> >>
>> >>
>> >> <font metrics-url="file:///e:/3CO/templates/Arial.xml" kerning="yes"
>> >> embed-url="file:///c:/WINNT/fonts/Arial.ttf">
>> >> <font-triplet name="Arial" style="normal" weight="normal"/>
>> >> </font>
>> >
>> > Where did you add this line precisely?
>> >
>> > It needs to be added as a child node to the renderer, as described
>> here:
>> > http://xmlgraphics.apache.org/fop/0.92/configuration.html#renderers
>> >
>>
>> I tested two possibilities: in the fop.xconf file, and in a specific
>> configuration file. Both failed.
>
> That's not what Andreas asked. Please post the full configuration file.
> That should make it easier.
>
>
> Jeremias Maerki
>
The configuration file used with the -c option:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- TODO: use proper config -->
<configuration>
<fonts>
<!-- TODO: use proper config -->
<font metrics-url="file:///e:/3CO/templates/Arial.xml" kerning="yes"
embed-url="file:///c:/WINNT/fonts/Arial.ttf">
<font-triplet name="Arial" style="normal" weight="normal"/>
</font>
<font metrics-url="file:///e:/3CO/templates/ARIALN.xml" kerning="yes"
embed-url="file:///c:/WINNT/fonts/ARIALN.ttf">
<font-triplet name="ArialNarrow" style="normal" weight="normal"/>
</font>
</fonts>
</configuration>
And the fop.xconf content:
http://www.nabble.com/user-files/235713/fop.xconf fop.xconf
Philippe
--
View this message in context: http://www.nabble.com/Problem-for-registering-new-fonts-with-FOP-%28svn-trunk%29-tf2126206.html#a5922143
Sent from the FOP - Users forum at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Problem for registering new fonts with FOP (svn-trunk)
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
On 22.08.2006 10:42:03 pverdret wrote:
>
>
> Andreas L Delmelle wrote:
> >
> > On Aug 18, 2006, at 11:20, pverdret wrote:
> >
> > Hi,
> >
> >>
> >> I'm unable to register new fonts with FOP (svn-trunk).
> >> <snip />
> >> In my configuration file i've added the following lines:
> >>
> >>
> >> <font metrics-url="file:///e:/3CO/templates/Arial.xml" kerning="yes"
> >> embed-url="file:///c:/WINNT/fonts/Arial.ttf">
> >> <font-triplet name="Arial" style="normal" weight="normal"/>
> >> </font>
> >
> > Where did you add this line precisely?
> >
> > It needs to be added as a child node to the renderer, as described here:
> > http://xmlgraphics.apache.org/fop/0.92/configuration.html#renderers
> >
>
> I tested two possibilities: in the fop.xconf file, and in a specific
> configuration file. Both failed.
That's not what Andreas asked. Please post the full configuration file.
That should make it easier.
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Problem for registering new fonts with FOP (svn-trunk)
Posted by pverdret <ph...@xgs-france.com>.
Andreas L Delmelle wrote:
>
> On Aug 18, 2006, at 11:20, pverdret wrote:
>
> Hi,
>
>>
>> I'm unable to register new fonts with FOP (svn-trunk).
>> <snip />
>> In my configuration file i've added the following lines:
>>
>>
>> <font metrics-url="file:///e:/3CO/templates/Arial.xml" kerning="yes"
>> embed-url="file:///c:/WINNT/fonts/Arial.ttf">
>> <font-triplet name="Arial" style="normal" weight="normal"/>
>> </font>
>
> Where did you add this line precisely?
>
> It needs to be added as a child node to the renderer, as described here:
> http://xmlgraphics.apache.org/fop/0.92/configuration.html#renderers
>
I tested two possibilities: in the fop.xconf file, and in a specific
configuration file. Both failed.
Philippe
--
View this message in context: http://www.nabble.com/Problem-for-registering-new-fonts-with-FOP-%28svn-trunk%29-tf2126206.html#a5921620
Sent from the FOP - Users forum at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Problem for registering new fonts with FOP (svn-trunk)
Posted by Andreas L Delmelle <a_...@pandora.be>.
On Aug 18, 2006, at 11:20, pverdret wrote:
Hi,
>
> I'm unable to register new fonts with FOP (svn-trunk).
> <snip />
> In my configuration file i've added the following lines:
>
>
> <font metrics-url="file:///e:/3CO/templates/Arial.xml" kerning="yes"
> embed-url="file:///c:/WINNT/fonts/Arial.ttf">
> <font-triplet name="Arial" style="normal" weight="normal"/>
> </font>
Where did you add this line precisely?
It needs to be added as a child node to the renderer, as described here:
http://xmlgraphics.apache.org/fop/0.92/configuration.html#renderers
HTH!
Cheers,
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org