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 Skhay <kh...@gmail.com> on 2010/09/09 18:13:01 UTC

Re: FOP finds a specific font only once

Hi,

Even i am facing a similar issue, where i have copied the .conf file in my
local drive and renamed as userconfig.xml and also copied verdana.xml and
verdana.ttf file in the same location.

Also added the following in fonts tag in userconfig.xml:


		          <font-triplet name="Verdana" style="normal" weight="normal"/>
        

While executing it, error is thrown saying 

"Missing metrics-version attribute - please regenerate the font metrics file
with a more recent version of FOP."

So i am trying to run the following command to generate the metrics file:


java -cp
build/fop.jar;lib/avalon-framework-4.2.0.jar;lib/xml-apis-1.3.04.jar;lib/xercesImpl-2.7.1.jar;lib/xalan-2.7.0.jar;lib/commons-logging-1.0.4.jar;lib/commons-io-1.3.1.jar;lib/xmlgraphics-commons-1.3.1.jar;lib/serializer-2.7.0.jar 
org.apache.fop.fonts.apps.TTFReader C:\Fonts\VERDANA.TTF 
C:\Fonts\verdana.xml

Iam getting error in command prompt as Class path specification required and
'build' is not recognised.

Can some one help me with this so that i can use the custom font Verdana in
the PDF?



Regards
Skhay

 


Arian Hojat wrote:
> 
> When using a specific font, you might want to specific where all your
> fonts
> are located (not sure if the default config file does this by default).
> So goto your fop folder and goto the /conf folder and copy that fop.xconf
> file and rename it user_config.xml or something, then goto the <fonts>
> section in there and add inside of it:
> 
> <auto-detect/>
> Then run on command line, run
> $ fop -c "c:\dev\fop\conf\user_config.xml" rpa.fo rpa.pdf
> 
> it should work, but if it bothers u too much about other font files when
> creating the pdf ...
> 
> Then try copying and pasting the ttf font Verdana in a custom folder, and
> instead specifying that folder with the lone fonts you use in there:
> <directory recursive="true">C:/dev/fop/conf/fonts</directory>
> 
> 
> Arian
> 
> 
> On Tue, Jan 26, 2010 at 10:26 AM, Alexiev <ni...@alexiev.net> wrote:
> 
>>
>> P.S. I forgot to state that I'm using FOP 0.95, and the font is
>> configured
>> in
>> the XSL like this:
>>
>> <fo:flow flow-name="xsl-region-body" font-family="Verdana">
>> > ...
>> > </fo:flow>
>>  >
> 
> 

-- 
View this message in context: http://old.nabble.com/FOP-finds-a-specific-font-only-once-tp27324247p29649088.html
Sent from the FOP - Users mailing list archive 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: FOP finds a specific font only once

Posted by Chris Bowditch <bo...@hotmail.com>.
Skhay wrote:
> Hi,

Hi,

> 
> Even i am facing a similar issue, where i have copied the .conf file in my
> local drive and renamed as userconfig.xml and also copied verdana.xml and
> verdana.ttf file in the same location.
> 
> Also added the following in fonts tag in userconfig.xml:

Which version of FOP are you using?

> 
> 
> 		          <font-triplet name="Verdana" style="normal" weight="normal"/>
>         
> 
> While executing it, error is thrown saying 
> 
> "Missing metrics-version attribute - please regenerate the font metrics file
> with a more recent version of FOP."
> 
> So i am trying to run the following command to generate the metrics file:

If you are using a FOP version >= 0.95 then theres no need to generate a 
metrics file, just specify embed-url to the .TTF or .PFB File and thats 
all you need.

> 
> 
> java -cp
> build/fop.jar;lib/avalon-framework-4.2.0.jar;lib/xml-apis-1.3.04.jar;lib/xercesImpl-2.7.1.jar;lib/xalan-2.7.0.jar;lib/commons-logging-1.0.4.jar;lib/commons-io-1.3.1.jar;lib/xmlgraphics-commons-1.3.1.jar;lib/serializer-2.7.0.jar 
> org.apache.fop.fonts.apps.TTFReader C:\Fonts\VERDANA.TTF 
> C:\Fonts\verdana.xml
> 
> Iam getting error in command prompt as Class path specification required and
> 'build' is not recognised.
> 
> Can some one help me with this so that i can use the custom font Verdana in
> the PDF?

<snip/>

Chris

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