I tried that.  I can set the font base in code, but
the fonts will not embed.   The only way I've got them
to embed is if I point to them in my font config file
by pointing to them using an absolute path
"file://c:/..", which I can't do, due to the fact that
I can't change the path for every server.  If you want
to embed the fonts does it have to be done using the
config file or is it possible to do it in code. 
Thanks again for your  help.

Thanks,
Mike

--- Jeremias Maerki <[EMAIL PROTECTED]> wrote:

> Ah, you wanted to use a relative path on the font
> base setting, not on
> the individual paths. Shouldn't really be a problem
> as long as you know
> where your "current directory" is (new
> File(".").getCanonicalPath()).
> But if you know the absolute base directory, it's
> better set that.
> 
> Something like...
> 
> FopFactory fopFactory = ....
>
fopFactory.setFontBaseURL("file:///C:/something/fonts");
> 
> ...should do the trick.
> 
> HTH
> 
> On 14.01.2008 18:34:05 Michael Burke wrote:
> > Hi Jeremias,
> > 
> > Thanks for responding so quickly.  Is it possible
> to
> > set the font base path relatively?  Reason being,
> is
> > this will be moved to many development, QA and
> > Production machines so we won't alway know the
> path
> > absolute path. If we can't do this in the config
> file.
> >  Is it possible to do it in code?  I've set the
> > FOPFactory.setFontBasePath to the path of where
> our
> > font and font metrics reside.  However it does not
> > embed the fonts.  Any help would be greatly
> > appreciated.
> > 
> > Thanks,
> > Michael Burke
> > --- Jeremias Maerki <[EMAIL PROTECTED]>
> wrote:
> > 
> > > Here's a minimal config file demonstrating
> relative
> > > fonts. You will
> > > simply need to adjust the font-base setting
> > > (glb12.ttf is a font that's
> > > found in the FOP source distribution).
> > > 
> > > test.xconf:
> > > 
> > > <?xml version="1.0"?>
> > > <fop version="1.0">
> > >  
> > >
> >
>
<font-base>C:\Dev\FOP\main\trunk-clean\test\resources\fonts</font-base>
> > >   <renderers>
> > >     <renderer mime="application/pdf">
> > >       <fonts>
> > >         <font embed-url="glb12.ttf">
> > >           <font-triplet name="Gladiator"
> > > style="normal" weight="normal"/>
> > >           <font-triplet name="Gladiator"
> > > style="normal" weight="bold"/>
> > >         </font>
> > >       </fonts>
> > >     </renderer>
> > >   </renderers>
> > > </fop>
> > > 
> > > A minimal FO file (relfont.fo):
> > > 
> > > <?xml version="1.0" ?>
> > > <fo:root
> > > xmlns:fo="http://www.w3.org/1999/XSL/Format";>
> > >   <fo:layout-master-set>
> > >     <fo:simple-page-master master-name="first"
> > > page-height="29.7cm" page-width="21cm"
> > >       margin="2cm">
> > >       <fo:region-body/>
> > >     </fo:simple-page-master>
> > >   </fo:layout-master-set>
> > > 
> > >   <fo:page-sequence master-reference="first">
> > >     <fo:flow flow-name="xsl-region-body">
> > >       <fo:block font-family="Gladiator"
> > > font-size="14pt">The quick brown fox jumps over
> the
> > > lazy dog. (using Gladiator font)</fo:block>
> > >     </fo:flow>
> > >   </fo:page-sequence>
> > > </fo:root>
> > > 
> > > Command-line: fop -c test.xconf -fo relfont.fo
> -pdf
> > > out.pdf
> > > 
> > > Tested with FOP 0.94. Works like a charm. Good
> luck!
> > > 
> > > On 14.01.2008 15:32:49 mpbjr30 wrote:
> > > > 
> > > > Hi Everyone,
> > > > 
> > > > I've just upgraded to 0.94 version of FOP.  Is
> > > there any example of
> > > > embedding fonts in the config file using
> relative
> > > paths?  I've tried
> > > > everything and I can't see to get it to work. 
> Any
> > > help would be greatly
> > > > appreciated .
> > > > 
> > > > Thanks,
> > > > Mike
> > > > -- 
> > > > View this message in context:
> > >
> >
>
http://www.nabble.com/Embedded-Fonts-Relative-Path-0.94-tp14802580p14802580.html
> > > > Sent from the FOP - Users mailing list archive
> at
> > > Nabble.com.
> > > 
> > > 
> > > Jeremias Maerki
> > > 
> > > 
> > >
> >
>
---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > > [EMAIL PROTECTED]
> > > For additional commands, e-mail:
> > > [EMAIL PROTECTED]
> > > 
> > > 
> > 
> > 
> > 
> >      
>
____________________________________________________________________________________
> > Never miss a thing.  Make Yahoo your home page. 
> > http://www.yahoo.com/r/hs
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 
> 
> 
> Jeremias Maerki
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 



      
____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to