You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Jeremias Maerki <de...@jeremias-maerki.ch> on 2009/03/10 16:40:35 UTC

Proposal: FOUserAgent.getFontBaseURL() deprecation?

While working on URI resolution for AFP fonts, I've stumbled over
FOUserAgent.getFontBaseURL(). I found that a strange thing now that we
have the FontManager (attached to the FopFactory). Well, getFontBaseURL
() has been there for some time but FOUserAgent.setFontBaseURL was
introduced by: http://svn.eu.apache.org/viewvc?view=rev&revision=542237

Looks like I didn't really notice that when I processed that patch.
Anyway, getFontBaseURL() is only called once by DefaultFontResolver. I
don't really see the benefit to have a per-FOUserAgent font base URL. So
I would like to propose to deprecate get/setFontBaseURL() on FOUserAgent.
The attached patch illustrated what I'd like to do.

I think: if we ever get to the point where we can refactor the font
subsystem so the fonts are only parsed once by the font manager and not
per rendering run, the font base URL on the user agent level will not
make any sense anyway.

Sensible? Or am I missing anything with the font base URL on the user
agent level?

---===---

BTW, while testing the AFP font stuff I noticed that it's currently not
possible to use a non-file URL as font base URL. I get a MalformedURLException
in FOURIResolver.checkBaseURL(). That's not the idea. I'm going to look
into that.


Jeremias Maerki

Re: Proposal: FOUserAgent.getFontBaseURL() deprecation?

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Done as proposed: http://svn.apache.org/viewvc?rev=757341&view=rev

On 10.03.2009 16:40:35 Jeremias Maerki wrote:
> While working on URI resolution for AFP fonts, I've stumbled over
> FOUserAgent.getFontBaseURL(). I found that a strange thing now that we
> have the FontManager (attached to the FopFactory). Well, getFontBaseURL
> () has been there for some time but FOUserAgent.setFontBaseURL was
> introduced by: http://svn.eu.apache.org/viewvc?view=rev&revision=542237
> 
> Looks like I didn't really notice that when I processed that patch.
> Anyway, getFontBaseURL() is only called once by DefaultFontResolver. I
> don't really see the benefit to have a per-FOUserAgent font base URL. So
> I would like to propose to deprecate get/setFontBaseURL() on FOUserAgent.
> The attached patch illustrated what I'd like to do.
> 
> I think: if we ever get to the point where we can refactor the font
> subsystem so the fonts are only parsed once by the font manager and not
> per rendering run, the font base URL on the user agent level will not
> make any sense anyway.
> 
> Sensible? Or am I missing anything with the font base URL on the user
> agent level?

<snip/> 



Jeremias Maerki