xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Bruns <michael.br...@1und1.de>
Subject Re: Problems integrating fonts type1
Date Thu, 16 Nov 2006 11:39:22 GMT
Hi Sabine,

On 16.11.2006 11:40, sabine wrote:
> Hi ,
> 
> [...]
>> Not sure, but specifying a drive letter in the url makes it absolute,
>> doesn't it? If you set the <font-base> element appropriately, specifying
>> the URL just like that: "path/to/my/font.pfb" should work.
>>
>>   
> Specifying a <font-base> element did not work either. What does it mean
> "path/to/my/font.pfb". Where does the path starts?
> 
> Now I'm setting my font-base through fopFactory.setFontBaseUrl(String
> url) like:
> 
> main class:
> ...
>  Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, foUserAgent, out);
> fopFactory.setUserConfig("config/fop.xconf");
> 
>            File file = new File("fonts/AWSBS___.PFM");
>            System.out.println(file.exists());     //result is true...
>            fopFactory.setFontBaseURL(file.getAbsolutePath());
> 
>            System.out.println(foUserAgent.getFontBaseURL());
> 
> ...
> 
> But still. It's is not working

I've once had the same problems, but I solved them in the end:

I don't use the <font-base>-tag in my config file at all, but instead I
use setFontBaseURL() at runtime - just like you mentioned above. The
only difference is that I manually added "file:" to the path, i.e. in
your case I would call setFontBaseURL("file:" + file.getAbsolutePath()).

That finally did the trick, and I hope it works for you, too. :-)

HTH,

Michael

---------------------------------------------------------------------
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