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

Attachment: FOUserAgent-getFontBaseURL-Deprecation.diff
Description: Binary data

Reply via email to