Found the bug and fixed it in FOP Trunk:
http://svn.apache.org/viewvc?rev=596724&view=rev
Thanks for spotting that.
Jeremias Maerki
On 20.11.2007 15:34:46 Dmitri Ilyin wrote:
> i put this font registration part in my fop.xconf file.
>
> <font metrics-url="fop/arial.xml" kerning="yes"
> embed-url="fop/arial.ttf">
> <font-triplet name="Arial" style="normal" weight="normal"/>
> <font-triplet name="ArialMT" style="normal" weight="normal"/>
> </font>
> The file "fop/arial.xml" is in the classpath.
>
> I register URI Resolver like here:
>
> fopFactory.setURIResolver(new URIResolver() {
>
> public Source resolve(String href, String base) throws
> TransformerException {
> if (logger.isDebugEnabled()) {
> logger.debug("FOP resolving url: " + href);
> }
> return new StreamSource(Thread.currentThread
> ().getContextClassLoader().getResourceAsStream(href));
> }
> });
> Unfortunatly i don't get much infos: Just message from the exeption: 'Cannot
> load font. No font URIs available.'
> I see in the logs that the resolver will be called.
> I was not sure how and i register the resolver on fop factory. It worked
> this way with FOP 0.93.
>
> The resolver was used also for resolving URI from the XSLT sheet. This way i
> could put all resources (XSLT, Pics, and Fonts) in classpath.
>
> than you in advance
> Dmitri
>
> 2007/11/20, Jeremias Maerki <[EMAIL PROTECTED]>:
> >
> > Do you have more details what exactly doesn't work (exceptions,
> > stacktraces)? Plugging in a custom URIResolver should still work like
> > before.
> >
> > Jeremias Maerki
> >
> >
> >
> > On 19.11.2007 12:13:00 Dmitri Ilyin wrote:
> > > Hi,
> > >
> > > The Font Loading has changed singnificant in the version 0.94.
> > >
> > > I have some problems with new Implementation. I used 0.93 and has my own
> > > URIResolver configured, that has me allowed to load my Fonts as
> > Resource.
> > > Now Fop awaits the URLs (Paths) to resolve to find the Fonts. But i have
> > not
> > > found how can i do it by my self. Old method, just set URIResolver not
> > > worked for me any more.
> > >
> > > Is it possible to load fonts as resource?
> > >
> > > thans a lot
> > > Dmitri
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]